Skip to content

Commit

Permalink
made db call changes in transferChatAfterVerificationProcess function
Browse files Browse the repository at this point in the history
  • Loading branch information
bhardwajdisha committed Sep 14, 2023
1 parent 3c6a843 commit bc5c95c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apps/meteor/app/livechat/server/lib/Helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,10 @@ export const dispatchInquiryQueued = async (inquiry: ILivechatInquiryRecord, age
}
};

export const forwardRoomToAgent = async (room: IOmnichannelRoom, transferData: TransferData) => {
export const forwardRoomToAgent = async (
room: Pick<IOmnichannelRoom, '_id' | 'v' | 'servedBy' | 'open' | 'departmentId'>,
transferData: TransferData,
) => {
if (!room?.open) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export class OmnichannelVerification extends ServiceClassInternal implements IOm

async transferChatAfterVerificationProcess(roomId: IRoom['_id']): Promise<void> {
try {
const room = await LivechatRooms.findOneById(roomId, {
const room = await LivechatRooms.findOneById<Pick<IOmnichannelRoom, '_id' | 'v' | 'servedBy' | 'open' | 'departmentId'>>(roomId, {
projection: {
_id: 1,
v: 1,
Expand Down

0 comments on commit bc5c95c

Please sign in to comment.