Merge branch 'goutamnextflow' of https://git.lynkedup.cloud/Goutam/lynkeduppro-crm into goutamnextflow

This commit is contained in:
2026-07-23 13:21:40 +05:30
2 changed files with 17 additions and 5 deletions
+13 -1
View File
@@ -207,9 +207,21 @@ export class CrmMessagingAdapter implements MessagingAdapter {
await this.sdk.command("crm.messenger.channel.leave", { threadId });
}
async addMember(threadId: string, userId: string): Promise<void> {
await this.sdk.command("crm.messenger.participant.add", { threadId, userId });
}
async removeMember(threadId: string, userId: string): Promise<void> {
await this.sdk.command("crm.messenger.participant.remove", { threadId, userId });
}
async renameConversation(threadId: string, subject: string): Promise<void> {
await this.sdk.command("crm.messenger.group.rename", { threadId, subject });
}
async listMembers(threadId: string): Promise<Person[]> {
const rows = await this.sdk.query<Array<{ userId: string; displayName: string; role: string }>>("crm.messenger.members", { threadId });
return rows.map((r) => ({ id: r.userId, name: r.displayName, kind: "staff" as const }));
return rows.map((r) => ({ id: r.userId, name: r.displayName, kind: r.role === "CUSTOMER" ? "customer" : "staff" }));
}
// ── polling fallback (no socket) ───────────────────────────────