stream-chat
Advanced tools
Comparing version 7.1.0 to 7.2.0
@@ -58,3 +58,3 @@ /// <reference types="node" /> | ||
/** | ||
* getConfig - Get the configs for this channel type | ||
* getConfig - Get the config for this channel id (cid) | ||
* | ||
@@ -61,0 +61,0 @@ * @return {Record<string, unknown>} |
@@ -26,5 +26,3 @@ /// <reference types="node" /> | ||
key: string; | ||
listeners: { | ||
[key: string]: Array<(event: Event<StreamChatGenerics>) => void>; | ||
}; | ||
listeners: Record<string, Array<(event: Event<StreamChatGenerics>) => void>>; | ||
logger: Logger; | ||
@@ -60,2 +58,3 @@ /** | ||
defaultWSTimeout: number; | ||
private nextRequestAbortController; | ||
/** | ||
@@ -495,3 +494,3 @@ * Initialize a client | ||
}): Promise<GetRateLimitsResponse>; | ||
_addChannelConfig(channelState: ChannelAPIResponse<StreamChatGenerics>): void; | ||
_addChannelConfig({ cid, config }: ChannelResponse<StreamChatGenerics>): void; | ||
/** | ||
@@ -1293,3 +1292,7 @@ * channel - Returns a new channel with the given type, id and custom data | ||
listPushProviders(): Promise<APIResponse & PushProviderListResponse>; | ||
/** | ||
* creates an abort controller that will be used by the next HTTP Request. | ||
*/ | ||
createAbortControllerForNextRequest(): AbortController; | ||
} | ||
//# sourceMappingURL=client.d.ts.map |
{ | ||
"name": "stream-chat", | ||
"version": "7.1.0", | ||
"version": "7.2.0", | ||
"description": "JS SDK for the Stream Chat API", | ||
@@ -5,0 +5,0 @@ "author": "GetStream", |
@@ -148,3 +148,3 @@ import { ChannelState } from './channel_state'; | ||
/** | ||
* getConfig - Get the configs for this channel type | ||
* getConfig - Get the config for this channel id (cid) | ||
* | ||
@@ -155,3 +155,3 @@ * @return {Record<string, unknown>} | ||
const client = this.getClient(); | ||
return client.configs[this.type]; | ||
return client.configs[this.cid]; | ||
} | ||
@@ -1011,3 +1011,3 @@ | ||
this.getClient()._addChannelConfig(state); | ||
this.getClient()._addChannelConfig(state.channel); | ||
@@ -1479,7 +1479,8 @@ // add any messages to our channel state | ||
if (state.members) { | ||
for (const member of state.members) { | ||
this.state.members = state.members.reduce((acc, member) => { | ||
if (member.user) { | ||
this.state.members[member.user.id] = member; | ||
acc[member.user.id] = member; | ||
} | ||
} | ||
return acc; | ||
}, {} as ChannelState<StreamChatGenerics>['members']); | ||
} | ||
@@ -1486,0 +1487,0 @@ |
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
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 too big to display
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
4880326
51376