stream-chat-react 13.13.4 → 13.13.6
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/components/Chat/hooks/useChat.js +1 -1
- package/dist/components/MessageList/hooks/useMarkRead.js +2 -0
- package/dist/experimental/index.browser.cjs.map +2 -2
- package/dist/experimental/index.node.cjs.map +2 -2
- package/dist/i18n/utils.js +4 -2
- package/dist/index.browser.cjs +3 -2
- package/dist/index.browser.cjs.map +2 -2
- package/dist/index.node.cjs +3 -2
- package/dist/index.node.cjs.map +2 -2
- package/dist/plugins/Emojis/index.browser.cjs.map +2 -2
- package/dist/plugins/Emojis/index.node.cjs.map +2 -2
- package/package.json +1 -1
package/dist/index.node.cjs
CHANGED
|
@@ -1466,7 +1466,7 @@ function getDateString({
|
|
|
1466
1466
|
}
|
|
1467
1467
|
var predefinedFormatters = {
|
|
1468
1468
|
durationFormatter: (streamI18n) => (value, _, { format, withSuffix }) => {
|
|
1469
|
-
if (format &&
|
|
1469
|
+
if (format && import_dayjs.default.isDayjs(streamI18n.DateTimeParser)) {
|
|
1470
1470
|
return streamI18n.DateTimeParser.duration(value).format(
|
|
1471
1471
|
format
|
|
1472
1472
|
);
|
|
@@ -30511,6 +30511,7 @@ var useMarkRead = ({
|
|
|
30511
30511
|
const { markRead, setChannelUnreadUiState } = useChannelActionContext("useMarkRead");
|
|
30512
30512
|
const { channel } = useChannelStateContext("useMarkRead");
|
|
30513
30513
|
(0, import_react173.useEffect)(() => {
|
|
30514
|
+
if (!channel.getConfig()?.read_events) return;
|
|
30514
30515
|
const shouldMarkRead = () => !document.hidden && !wasMarkedUnread && !messageListIsThread && isMessageListScrolledToBottom && client.user?.id && !hasReadLastMessage(channel, client.user.id);
|
|
30515
30516
|
const onVisibilityChange = () => {
|
|
30516
30517
|
if (shouldMarkRead()) markRead();
|
|
@@ -39288,7 +39289,7 @@ var useChat = ({
|
|
|
39288
39289
|
};
|
|
39289
39290
|
(0, import_react289.useEffect)(() => {
|
|
39290
39291
|
if (!client) return;
|
|
39291
|
-
const version = "13.13.
|
|
39292
|
+
const version = "13.13.6";
|
|
39292
39293
|
const userAgent = client.getUserAgent();
|
|
39293
39294
|
if (!userAgent.includes("stream-chat-react")) {
|
|
39294
39295
|
client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
|