@azure/communication-react 1.35.0 → 2.0.0
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/dist-cjs/communication-react/index.js +7 -6
- 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-stateful-client/src/EventSubscriber.js +6 -5
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
- package/package.json +2 -2
|
@@ -178,7 +178,7 @@ function getDefaultExportFromCjs (x) {
|
|
|
178
178
|
// Copyright (c) Microsoft Corporation.
|
|
179
179
|
// Licensed under the MIT License.
|
|
180
180
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
|
181
|
-
var telemetryVersion = '
|
|
181
|
+
var telemetryVersion = '2.0.0';
|
|
182
182
|
|
|
183
183
|
|
|
184
184
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
|
@@ -24350,15 +24350,15 @@ class EventSubscriber {
|
|
|
24350
24350
|
this.chatContext.createThreadIfNotExist(event.threadId);
|
|
24351
24351
|
this.chatContext.setParticipants(event.threadId, participantsToAdd);
|
|
24352
24352
|
});
|
|
24353
|
-
this.fetchLastParticipantMessage(event.threadId, 'participantAdded');
|
|
24353
|
+
this.fetchLastParticipantMessage(event.threadId, 'participantAdded', event.addedOn);
|
|
24354
24354
|
};
|
|
24355
24355
|
// This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
|
|
24356
24356
|
// Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
|
|
24357
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$y(this, void 0, void 0, function* () {
|
|
24357
|
+
this.fetchLastParticipantMessage = (threadId, actionType, actionTimestamp) => __awaiter$y(this, void 0, void 0, function* () {
|
|
24358
24358
|
var _a, e_1, _b, _c;
|
|
24359
24359
|
try {
|
|
24360
24360
|
for (var _d = true, _e = __asyncValues$1(this.chatClient.getChatThreadClient(threadId).listMessages({
|
|
24361
|
-
startTime: new Date(
|
|
24361
|
+
startTime: new Date(actionTimestamp.getTime() - maxSyncTimeInMs)
|
|
24362
24362
|
})), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
24363
24363
|
_c = _f.value;
|
|
24364
24364
|
_d = false;
|
|
@@ -24386,7 +24386,7 @@ class EventSubscriber {
|
|
|
24386
24386
|
const currentUserId = toFlatCommunicationIdentifier(this.chatContext.getState().userId);
|
|
24387
24387
|
const wasCurrentUserRemoved = participantIds.find(id => toFlatCommunicationIdentifier(id) === currentUserId);
|
|
24388
24388
|
if (!wasCurrentUserRemoved) {
|
|
24389
|
-
this.fetchLastParticipantMessage(event.threadId, 'participantRemoved');
|
|
24389
|
+
this.fetchLastParticipantMessage(event.threadId, 'participantRemoved', event.removedOn);
|
|
24390
24390
|
}
|
|
24391
24391
|
};
|
|
24392
24392
|
this.onReadReceiptReceived = (event) => {
|
|
@@ -24397,9 +24397,10 @@ class EventSubscriber {
|
|
|
24397
24397
|
});
|
|
24398
24398
|
};
|
|
24399
24399
|
this.onTypingIndicatorReceived = (typingIndicator) => {
|
|
24400
|
+
const receivedTypingIndicator = Object.assign(Object.assign({}, typingIndicator), { receivedOn: new Date() });
|
|
24400
24401
|
this.chatContext.batch(() => {
|
|
24401
24402
|
this.chatContext.createThreadIfNotExist(typingIndicator.threadId);
|
|
24402
|
-
this.chatContext.addTypingIndicator(typingIndicator.threadId,
|
|
24403
|
+
this.chatContext.addTypingIndicator(typingIndicator.threadId, receivedTypingIndicator);
|
|
24403
24404
|
});
|
|
24404
24405
|
};
|
|
24405
24406
|
this.onChatThreadCreated = (event) => {
|