stream-chat 8.25.0 → 8.25.1
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/browser.es.js +5 -19
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +5 -19
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +5 -19
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +5 -19
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +1 -0
- package/src/client.ts +0 -13
package/dist/browser.js
CHANGED
|
@@ -3170,7 +3170,8 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3170
3170
|
if ((_message$user2 = message.user) !== null && _message$user2 !== void 0 && _message$user2.id && this.getClient().userMuteStatus(message.user.id)) return false;
|
|
3171
3171
|
if (message.type === 'system') return false; // Return false if channel doesn't allow read events.
|
|
3172
3172
|
|
|
3173
|
-
if (Array.isArray((_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.own_capabilities) && !((_this$data5 = this.data) !== null && _this$data5 !== void 0 && _this$data5.own_capabilities.includes('read-events'))) return false;
|
|
3173
|
+
if (Array.isArray((_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.own_capabilities) && !((_this$data5 = this.data) !== null && _this$data5 !== void 0 && _this$data5.own_capabilities.includes('read-events'))) return false; // FIXME: see #1265, adjust and count new messages even when the channel is muted
|
|
3174
|
+
|
|
3174
3175
|
if (this.muteStatus().muted) return false;
|
|
3175
3176
|
return true;
|
|
3176
3177
|
}
|
|
@@ -8412,8 +8413,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8412
8413
|
key: "_handleClientEvent",
|
|
8413
8414
|
value: function _handleClientEvent(event) {
|
|
8414
8415
|
var _event$me,
|
|
8415
|
-
|
|
8416
|
-
|
|
8416
|
+
_event$me2,
|
|
8417
|
+
_this3 = this;
|
|
8417
8418
|
|
|
8418
8419
|
var client = this;
|
|
8419
8420
|
var postListenerCallbacks = [];
|
|
@@ -8438,21 +8439,6 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8438
8439
|
}
|
|
8439
8440
|
|
|
8440
8441
|
if (event.type === 'notification.channel_mutes_updated' && (_event$me = event.me) !== null && _event$me !== void 0 && _event$me.channel_mutes) {
|
|
8441
|
-
var currentMutedChannelIds = [];
|
|
8442
|
-
var nextMutedChannelIds = [];
|
|
8443
|
-
this.mutedChannels.forEach(function (mute) {
|
|
8444
|
-
return mute.channel && currentMutedChannelIds.push(mute.channel.cid);
|
|
8445
|
-
});
|
|
8446
|
-
event.me.channel_mutes.forEach(function (mute) {
|
|
8447
|
-
return mute.channel && nextMutedChannelIds.push(mute.channel.cid);
|
|
8448
|
-
});
|
|
8449
|
-
/** Set the unread count of un-muted channels to 0, which is the behaviour of backend */
|
|
8450
|
-
|
|
8451
|
-
currentMutedChannelIds.forEach(function (cid) {
|
|
8452
|
-
if (!nextMutedChannelIds.includes(cid) && _this3.activeChannels[cid]) {
|
|
8453
|
-
_this3.activeChannels[cid].state.unreadCount = 0;
|
|
8454
|
-
}
|
|
8455
|
-
});
|
|
8456
8442
|
this.mutedChannels = event.me.channel_mutes;
|
|
8457
8443
|
}
|
|
8458
8444
|
|
|
@@ -11139,7 +11125,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11139
11125
|
}, {
|
|
11140
11126
|
key: "getUserAgent",
|
|
11141
11127
|
value: function getUserAgent() {
|
|
11142
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.25.
|
|
11128
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.25.1");
|
|
11143
11129
|
}
|
|
11144
11130
|
}, {
|
|
11145
11131
|
key: "setUserAgent",
|