stream-chat-angular 4.43.0 → 4.44.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.
@@ -1 +1 @@
1
- export declare const version = "4.43.0";
1
+ export declare const version = "4.44.0";
@@ -356,7 +356,7 @@
356
356
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
357
357
  }
358
358
 
359
- var version = '4.43.0';
359
+ var version = '4.44.0';
360
360
 
361
361
  /**
362
362
  * The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
@@ -1105,16 +1105,30 @@
1105
1105
  if (quotedMessageId === void 0) { quotedMessageId = undefined; }
1106
1106
  if (customData === void 0) { customData = undefined; }
1107
1107
  return __awaiter(this, void 0, void 0, function () {
1108
- var preview, channel, response;
1108
+ var input, preview, channel, response;
1109
1109
  return __generator(this, function (_h) {
1110
1110
  switch (_h.label) {
1111
1111
  case 0:
1112
- preview = createMessagePreview(this.chatClientService.chatClient.user, text, attachments, mentionedUsers, parentId, quotedMessageId, customData);
1112
+ input = {
1113
+ text: text,
1114
+ attachments: attachments,
1115
+ mentionedUsers: mentionedUsers,
1116
+ parentId: parentId,
1117
+ quotedMessageId: quotedMessageId,
1118
+ customData: customData,
1119
+ };
1120
+ if (!this.beforeSendMessage) return [3 /*break*/, 2];
1121
+ return [4 /*yield*/, this.beforeSendMessage(input)];
1122
+ case 1:
1123
+ input = _h.sent();
1124
+ _h.label = 2;
1125
+ case 2:
1126
+ preview = createMessagePreview(this.chatClientService.chatClient.user, input.text, input.attachments, input.mentionedUsers, input.parentId, input.quotedMessageId, input.customData);
1113
1127
  channel = this.activeChannelSubject.getValue();
1114
1128
  preview.readBy = [];
1115
1129
  channel.state.addMessageSorted(preview, true);
1116
- return [4 /*yield*/, this.sendMessageRequest(preview, customData)];
1117
- case 1:
1130
+ return [4 /*yield*/, this.sendMessageRequest(preview, input.customData)];
1131
+ case 3:
1118
1132
  response = _h.sent();
1119
1133
  return [2 /*return*/, response];
1120
1134
  }
@@ -1154,8 +1168,13 @@
1154
1168
  case 0:
1155
1169
  messageToUpdate = Object.assign({}, message);
1156
1170
  delete messageToUpdate.i18n;
1157
- return [4 /*yield*/, this.chatClientService.chatClient.updateMessage(messageToUpdate)];
1171
+ if (!this.beforeUpdateMessage) return [3 /*break*/, 2];
1172
+ return [4 /*yield*/, this.beforeUpdateMessage(messageToUpdate)];
1158
1173
  case 1:
1174
+ messageToUpdate = _h.sent();
1175
+ _h.label = 2;
1176
+ case 2: return [4 /*yield*/, this.chatClientService.chatClient.updateMessage(messageToUpdate)];
1177
+ case 3:
1159
1178
  response = _h.sent();
1160
1179
  channel = (_a = this.channelsSubject
1161
1180
  .getValue()) === null || _a === void 0 ? void 0 : _a.find(function (c) { return c.cid === message.cid; });