reply message from thread and room

This commit is contained in:
grimhilt
2023-04-14 20:54:44 +02:00
parent 7ad22e55c1
commit 4799e477be
10 changed files with 117 additions and 20 deletions

View File

@@ -20,7 +20,7 @@ const boxId = 1;
jest.mock("../../db/utils/mail", () => {
return {
findRoomByOwner: jest.fn(),
getAddresseId: jest.fn(),
getAddressId: jest.fn(),
getUserIdOfMailbox: jest.fn(),
};
});
@@ -38,7 +38,7 @@ jest.mock("../../db/message/saveMessage-db", () => {
getThreadInfoOnId: jest.fn(),
};
});
import { getAddresseId, getUserIdOfMailbox, findRoomByOwner } from "../../db/utils/mail";
import { getAddressId, getUserIdOfMailbox, findRoomByOwner } from "../../db/utils/mail";
import {
createRoom,
registerMessageInRoom,
@@ -69,7 +69,7 @@ import { AttrsWithEnvelopeTest, createReplyWithSameMembers } from "../test-utils
// if only me reply -> channel
beforeAll(async () => {
mocked(getAddresseId).mockImplementation(db.getAddresseId);
mocked(getAddressId).mockImplementation(db.getAddressId);
mocked(getUserIdOfMailbox).mockImplementation(db.getUserIdOfMailbox);
mocked(findRoomByOwner).mockImplementation(db.findRoomByOwner);