minor changes
This commit is contained in:
@@ -128,7 +128,7 @@ export async function getMessages(roomId: number) {
|
||||
return await execQueryAsync(query, values);
|
||||
}
|
||||
|
||||
export async function getMembers(roomId) {
|
||||
export async function getMembers(roomId: number) {
|
||||
const query = `
|
||||
SELECT
|
||||
address.address_id AS id,
|
||||
|
||||
@@ -120,7 +120,7 @@ async function saveFromParsedData(parsed: ParsedMail, messageId: number) {
|
||||
});
|
||||
});
|
||||
} else if (key == "attachments") {
|
||||
// todo
|
||||
// todo attachments
|
||||
} else if (["date", "messageId", "headers", "headerLines"].includes(key)) {
|
||||
// messageId and date are already saved
|
||||
// other field are not important and can be retrieved in source
|
||||
|
||||
@@ -146,6 +146,7 @@ describe("saveMessage", () => {
|
||||
|
||||
await register.save();
|
||||
|
||||
// the owner of the room will be the recipient (not us)
|
||||
expect(createOrRegisterOnExistence).toHaveBeenCalledWith(db.users[1].id, RoomType.DM);
|
||||
});
|
||||
it("should create a GROUP when there is a new first message from us to multiple recipients", async () => {
|
||||
|
||||
@@ -29,7 +29,7 @@ export default class saveMessageDatabase {
|
||||
this.rooms = [];
|
||||
this.messages = [];
|
||||
this.room_message = [];
|
||||
this.users = generateUsers(5); // todo
|
||||
this.users = _users;
|
||||
this.roomId = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user