stream-chat-react 11.23.4 → 11.23.5
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/{Window-e020d384.js → Window-609dd77f.js} +1 -1
- package/dist/browser.full-bundle.js +6 -5
- package/dist/browser.full-bundle.js.map +1 -1
- package/dist/browser.full-bundle.min.js +2 -2
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/components/ChannelList/ChannelList.js +1 -1
- package/dist/components/Chat/hooks/useCreateChatClient.d.ts +4 -2
- package/dist/components/Chat/hooks/useCreateChatClient.d.ts.map +1 -1
- package/dist/components/Chat/hooks/useCreateChatClient.js +5 -4
- package/dist/components/Emojis/index.cjs.js +1 -1
- package/dist/index.cjs.js +6 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -51244,7 +51244,7 @@ var UnMemoizedChannelList = function (props) {
|
|
|
51244
51244
|
channel: item,
|
|
51245
51245
|
// forces the update of preview component on channel update
|
|
51246
51246
|
channelUpdateCount: channelUpdateCount,
|
|
51247
|
-
key: item.
|
|
51247
|
+
key: item.cid,
|
|
51248
51248
|
Preview: Preview,
|
|
51249
51249
|
setActiveChannel: setActiveChannel,
|
|
51250
51250
|
watchers: watchers,
|
|
@@ -64996,7 +64996,7 @@ var StreamChatReact = (function (exports, React$2, ReactDOM, streamChat, Picker)
|
|
|
64996
64996
|
channel: item,
|
|
64997
64997
|
// forces the update of preview component on channel update
|
|
64998
64998
|
channelUpdateCount: channelUpdateCount,
|
|
64999
|
-
key: item.
|
|
64999
|
+
key: item.cid,
|
|
65000
65000
|
Preview: Preview,
|
|
65001
65001
|
setActiveChannel: setActiveChannel,
|
|
65002
65002
|
watchers: watchers,
|
|
@@ -65027,7 +65027,7 @@ var StreamChatReact = (function (exports, React$2, ReactDOM, streamChat, Picker)
|
|
|
65027
65027
|
|
|
65028
65028
|
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
|
|
65029
65029
|
|
|
65030
|
-
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '11.23.
|
|
65030
|
+
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '11.23.5';
|
|
65031
65031
|
|
|
65032
65032
|
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var useChat = function (_a) {
|
|
65033
65033
|
var _b, _c;
|
|
@@ -65250,14 +65250,15 @@ var StreamChatReact = (function (exports, React$2, ReactDOM, streamChat, Picker)
|
|
|
65250
65250
|
* React hook to create, connect and return `StreamChat` client.
|
|
65251
65251
|
*/
|
|
65252
65252
|
var useCreateChatClient = function (_a) {
|
|
65253
|
-
var apiKey = _a.apiKey, tokenOrProvider = _a.tokenOrProvider, userData = _a.userData;
|
|
65253
|
+
var apiKey = _a.apiKey, options = _a.options, tokenOrProvider = _a.tokenOrProvider, userData = _a.userData;
|
|
65254
65254
|
var _b = React$2.useState(null), chatClient = _b[0], setChatClient = _b[1];
|
|
65255
65255
|
var _c = React$2.useState(userData), cachedUserData = _c[0], setCachedUserData = _c[1];
|
|
65256
65256
|
if (userData.id !== cachedUserData.id) {
|
|
65257
65257
|
setCachedUserData(userData);
|
|
65258
65258
|
}
|
|
65259
|
+
var cachedOptions = React$2.useState(options)[0];
|
|
65259
65260
|
React$2.useEffect(function () {
|
|
65260
|
-
var client = new streamChat.StreamChat(apiKey);
|
|
65261
|
+
var client = new streamChat.StreamChat(apiKey, undefined, cachedOptions);
|
|
65261
65262
|
var didUserConnectInterrupt = false;
|
|
65262
65263
|
var connectionPromise = client.connectUser(cachedUserData, tokenOrProvider).then(function () {
|
|
65263
65264
|
if (!didUserConnectInterrupt)
|
|
@@ -65272,7 +65273,7 @@ var StreamChatReact = (function (exports, React$2, ReactDOM, streamChat, Picker)
|
|
|
65272
65273
|
console.log("Connection for user \"".concat(cachedUserData.id, "\" has been closed"));
|
|
65273
65274
|
});
|
|
65274
65275
|
};
|
|
65275
|
-
}, [apiKey, cachedUserData, tokenOrProvider]);
|
|
65276
|
+
}, [apiKey, cachedUserData, cachedOptions, tokenOrProvider]);
|
|
65276
65277
|
return chatClient;
|
|
65277
65278
|
};
|
|
65278
65279
|
|