From 271d94c617a706e0929050d8c559ab76619aaddf Mon Sep 17 00:00:00 2001 From: Kevin Aleman Date: Tue, 7 Jun 2022 13:47:23 -0600 Subject: [PATCH] oops --- apps/meteor/app/models/server/raw/LivechatInquiry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/meteor/app/models/server/raw/LivechatInquiry.ts b/apps/meteor/app/models/server/raw/LivechatInquiry.ts index 788404a3c4a7..4bc8c278180f 100644 --- a/apps/meteor/app/models/server/raw/LivechatInquiry.ts +++ b/apps/meteor/app/models/server/raw/LivechatInquiry.ts @@ -35,12 +35,12 @@ export class LivechatInquiryRaw extends BaseRaw { return this.updateOne({ rid }, { $set: { lastMessage: message } }); } - async findNextAndLock(queue?: string): Promise { + async findNextAndLock(department?: string): Promise { const date = new Date(); const result = await this.col.findOneAndUpdate( { status: LivechatInquiryStatus.QUEUED, - ...(queue && { queue }), + ...(department && { department }), $or: [ { locked: true,