stream-chat
Advanced tools
Comparing version 8.14.1 to 8.14.2
@@ -47,3 +47,4 @@ export declare const EVENT_MAP: { | ||
'transport.changed': boolean; | ||
'capabilities.changed': boolean; | ||
}; | ||
//# sourceMappingURL=events.d.ts.map |
{ | ||
"name": "stream-chat", | ||
"version": "8.14.1", | ||
"version": "8.14.2", | ||
"description": "JS SDK for the Stream Chat API", | ||
@@ -5,0 +5,0 @@ "author": "GetStream", |
@@ -1029,5 +1029,16 @@ import { ChannelState } from './channel_state'; | ||
const areCapabilitiesChanged = | ||
[...(state.channel.own_capabilities || [])].sort().join() !== | ||
[...(Array.isArray(this.data?.own_capabilities) ? (this.data?.own_capabilities as string[]) : [])].sort().join(); | ||
this.data = state.channel; | ||
this.offlineMode = false; | ||
if (areCapabilitiesChanged) { | ||
this.getClient().dispatchEvent({ | ||
type: 'capabilities.changed', | ||
cid: this.cid, | ||
own_capabilities: state.channel.own_capabilities, | ||
}); | ||
} | ||
this.getClient().dispatchEvent({ | ||
@@ -1355,2 +1366,6 @@ type: 'channels.queried', | ||
if (event.channel) { | ||
const isFrozenChanged = event.channel?.frozen !== undefined && event.channel.frozen !== channel.data?.frozen; | ||
if (isFrozenChanged) { | ||
this.query({ state: false, messages: { limit: 0 }, watchers: { limit: 0 } }); | ||
} | ||
channel.data = { | ||
@@ -1485,3 +1500,5 @@ ...event.channel, | ||
} | ||
this.state.watcher_count = state.watcher_count || 0; | ||
if (state.watcher_count !== undefined) { | ||
this.state.watcher_count = state.watcher_count; | ||
} | ||
// convert the arrays into objects for easier syncing... | ||
@@ -1488,0 +1505,0 @@ if (state.watchers) { |
@@ -49,2 +49,3 @@ export const EVENT_MAP = { | ||
'transport.changed': true, | ||
'capabilities.changed': true, | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5115919
53283