diff --git a/package-lock.json b/package-lock.json index f0cfac7..b7ea607 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@huggingface/transformers": "^4.2.0", "@imgly/background-removal": "^1.7.0", "@insignia/iios-kernel-client": "^0.1.4", - "@insignia/iios-messaging-ui": "^0.1.7", + "@insignia/iios-messaging-ui": "^0.1.8", "@photo-gallery/sdk": "file:./vendor/photo-gallery-sdk", "@tensorflow-models/coco-ssd": "^2.2.3", "@tensorflow/tfjs": "^4.22.0", @@ -1087,9 +1087,9 @@ } }, "node_modules/@insignia/iios-messaging-ui": { - "version": "0.1.7", - "resolved": "https://git.lynkedup.cloud/api/packages/insignia/npm/%40insignia%2Fiios-messaging-ui/-/0.1.7/iios-messaging-ui-0.1.7.tgz", - "integrity": "sha512-ZE4fLeSTSa5AFZnvSRT7G/TEaw+Jm5qH8rWaDjns6Vu9zBnDTVYdF8CMEisBrtgSDj+jDQBo9xlwZmr++5qehw==", + "version": "0.1.8", + "resolved": "https://git.lynkedup.cloud/api/packages/insignia/npm/%40insignia%2Fiios-messaging-ui/-/0.1.8/iios-messaging-ui-0.1.8.tgz", + "integrity": "sha512-djLQtX69f8p/2v7m2qhDU7AjCsvt3mz8qzTqf7CSTVsFu1mzMZTLfdq7e4DJzZ0syw76Rhzqrhw+RysiQEpDCg==", "peerDependencies": { "@insignia/iios-kernel-client": "*", "react": ">=18", diff --git a/package.json b/package.json index 83f029c..2ed2a6d 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@huggingface/transformers": "^4.2.0", "@imgly/background-removal": "^1.7.0", "@insignia/iios-kernel-client": "^0.1.4", - "@insignia/iios-messaging-ui": "^0.1.7", + "@insignia/iios-messaging-ui": "^0.1.8", "@photo-gallery/sdk": "file:./vendor/photo-gallery-sdk", "@tensorflow-models/coco-ssd": "^2.2.3", "@tensorflow/tfjs": "^4.22.0", diff --git a/src/lib/crm-messaging-adapter.ts b/src/lib/crm-messaging-adapter.ts index 791b3b6..f1c4aca 100644 --- a/src/lib/crm-messaging-adapter.ts +++ b/src/lib/crm-messaging-adapter.ts @@ -7,6 +7,7 @@ import type { Attachment, + BulkAddResult, ChannelSummary, ChannelVisibility, Conversation, @@ -247,6 +248,12 @@ export class CrmMessagingAdapter implements MessagingAdapter { await this.sdk.command("crm.messenger.participant.add", { threadId, userId }); } + /** Bulk import (e.g. everyone from another channel). IIOS governs both ends: you must belong to + * the source channel to read its roster, and OPA re-checks who may add to this thread. */ + async addMembers(threadId: string, userIds: string[]): Promise { + return this.sdk.command("crm.messenger.participant.addMany", { threadId, userIds }); + } + async removeMember(threadId: string, userId: string): Promise { await this.sdk.command("crm.messenger.participant.remove", { threadId, userId }); }