@azure/communication-react 1.10.0-alpha-202311082116 → 1.10.0-alpha-202311090013
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +4 -2
- package/dist/dist-cjs/communication-react/index.js +18 -7
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -2
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +3 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +5 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +7 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/package.json +1 -1
@@ -4258,7 +4258,8 @@ export declare type ChatHandlers = {
|
|
4258
4258
|
onRemoveParticipant: (userId: string) => Promise<void>;
|
4259
4259
|
updateThreadTopicName: (topicName: string) => Promise<void>;
|
4260
4260
|
onLoadPreviousChatMessages: (messagesToLoad: number) => Promise<boolean>;
|
4261
|
-
onUpdateMessage: (messageId: string, content: string,
|
4261
|
+
onUpdateMessage: (messageId: string, content: string, options?: {
|
4262
|
+
metadata?: Record<string, string>;
|
4262
4263
|
attachedFilesMetadata?: FileMetadata[];
|
4263
4264
|
}) => Promise<void>;
|
4264
4265
|
onDeleteMessage: (messageId: string) => Promise<void>;
|
@@ -9725,7 +9726,8 @@ export declare interface UnsupportedOperatingSystemStrings {
|
|
9725
9726
|
* @public
|
9726
9727
|
* Callback function run when a message is updated.
|
9727
9728
|
*/
|
9728
|
-
export declare type UpdateMessageCallback = (messageId: string, content: string,
|
9729
|
+
export declare type UpdateMessageCallback = (messageId: string, content: string, options?: {
|
9730
|
+
metadata?: Record<string, string>;
|
9729
9731
|
attachedFilesMetadata?: FileMetadata[];
|
9730
9732
|
}) => Promise<void>;
|
9731
9733
|
|
@@ -177,7 +177,7 @@ const _isValidIdentifier = (identifier) => {
|
|
177
177
|
// Copyright (c) Microsoft Corporation.
|
178
178
|
// Licensed under the MIT License.
|
179
179
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
180
|
-
var telemetryVersion = '1.10.0-alpha-
|
180
|
+
var telemetryVersion = '1.10.0-alpha-202311090013';
|
181
181
|
|
182
182
|
// Copyright (c) Microsoft Corporation.
|
183
183
|
/**
|
@@ -19158,8 +19158,8 @@ const createDefaultChatHandlers = memoizeOne__default["default"]((chatClient, ch
|
|
19158
19158
|
};
|
19159
19159
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
19160
19160
|
}),
|
19161
|
-
onUpdateMessage: (messageId, content,
|
19162
|
-
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
19161
|
+
onUpdateMessage: (messageId, content, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
19162
|
+
const updatedMetadata = (options === null || options === void 0 ? void 0 : options.metadata) ? Object.assign({}, options.metadata) : {};
|
19163
19163
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
19164
19164
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
19165
19165
|
}),
|
@@ -21644,7 +21644,11 @@ class AzureCommunicationChatAdapter {
|
|
21644
21644
|
return __awaiter$k(this, void 0, void 0, function* () {
|
21645
21645
|
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
21646
21646
|
/* @conditional-compile-remove(file-sharing) */
|
21647
|
-
|
21647
|
+
const updatedOptions = options
|
21648
|
+
? { attachedFilesMetadata: options.attachedFilesMetadata, metadata: metadata }
|
21649
|
+
: {};
|
21650
|
+
/* @conditional-compile-remove(file-sharing) */
|
21651
|
+
return yield this.handlers.onUpdateMessage(messageId, content, updatedOptions);
|
21648
21652
|
}));
|
21649
21653
|
});
|
21650
21654
|
}
|
@@ -22314,7 +22318,13 @@ const createCompositeHandlers$1 = memoizeOne__default["default"]((adapter) => ({
|
|
22314
22318
|
onTyping: adapter.sendTypingIndicator,
|
22315
22319
|
onRemoveParticipant: adapter.removeParticipant,
|
22316
22320
|
updateThreadTopicName: adapter.setTopic,
|
22317
|
-
onUpdateMessage:
|
22321
|
+
onUpdateMessage: (messageId, content, options) => {
|
22322
|
+
const metadata = options === null || options === void 0 ? void 0 : options.metadata;
|
22323
|
+
/* @conditional-compile-remove(file-sharing) */
|
22324
|
+
const updatedOptions = (options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) ? Object.assign({}, options.attachedFilesMetadata) : {};
|
22325
|
+
return adapter.updateMessage(messageId, content, metadata,
|
22326
|
+
/* @conditional-compile-remove(file-sharing) */ updatedOptions);
|
22327
|
+
},
|
22318
22328
|
onDeleteMessage: adapter.deleteMessage
|
22319
22329
|
}));
|
22320
22330
|
|
@@ -32452,9 +32462,10 @@ class AzureCommunicationCallWithChatAdapter {
|
|
32452
32462
|
});
|
32453
32463
|
}
|
32454
32464
|
/** Update an existing message. */
|
32455
|
-
updateMessage(messageId, content, metadata) {
|
32465
|
+
updateMessage(messageId, content, metadata, options) {
|
32456
32466
|
return __awaiter$2(this, void 0, void 0, function* () {
|
32457
|
-
return yield this.chatAdapter.updateMessage(messageId, content, metadata
|
32467
|
+
return yield this.chatAdapter.updateMessage(messageId, content, metadata,
|
32468
|
+
/* @conditional-compile-remove(file-sharing) */ options);
|
32458
32469
|
});
|
32459
32470
|
}
|
32460
32471
|
/** Delete an existing message. */
|