Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions apps/meteor/app/apps/server/bridges/livechat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,18 @@ export class AppLivechatBridge extends LivechatBridge {
return true;
}

protected async findRoomsByAgentId(agentId: string, appId: string): Promise<ILivechatRoom[]> {
Comment thread
lmauromb marked this conversation as resolved.
Resolved
Comment thread
lmauromb marked this conversation as resolved.
Resolved
this.orch.debugLog(`The App ${appId} is looking for livechat rooms. for agent ${agentId}`);
Comment thread
lmauromb marked this conversation as resolved.
Resolved

if (!agentId) {
Comment thread
lmauromb marked this conversation as resolved.
Resolved
return [];
}

const result = await LivechatRooms.findOpenByAgent(agentId).toArray();
Comment thread
lmauromb marked this conversation as resolved.
Resolved

return Promise.all((result as unknown as ILivechatRoom[]).map((room) => this.orch.getConverters()?.get('rooms').convertRoom(room)));
}

protected async findRooms(visitor: IVisitor, departmentId: string | null, appId: string): Promise<Array<ILivechatRoom>> {
this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`);

Expand Down