stream-chat-react 13.6.3 → 13.6.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.
@@ -19707,7 +19707,8 @@ var MessageActions = (props) => {
19707
19707
  const message = propMessage || contextMessage;
19708
19708
  const isMine = mine ? mine() : isMyMessage();
19709
19709
  const isMuted = (0, import_react111.useCallback)(() => isUserMuted(message, mutes), [message, mutes]);
19710
- const dialogId = `message-actions--${message.id}`;
19710
+ const dialogIdNamespace = threadList ? "-thread-" : "";
19711
+ const dialogId = `message-actions${dialogIdNamespace}--${message.id}`;
19711
19712
  const dialog = useDialog({ id: dialogId });
19712
19713
  const dialogIsOpen = useDialogIsOpen(dialogId);
19713
19714
  const messageActions = getMessageActions2();
@@ -23714,10 +23715,11 @@ var ReactionSelectorWithButton = ({
23714
23715
  ReactionIcon: ReactionIcon2
23715
23716
  }) => {
23716
23717
  const { t } = useTranslationContext("ReactionSelectorWithButton");
23717
- const { isMyMessage, message } = useMessageContext("MessageOptions");
23718
+ const { isMyMessage, message, threadList } = useMessageContext("MessageOptions");
23718
23719
  const { ReactionSelector: ReactionSelector2 = ReactionSelector } = useComponentContext("MessageOptions");
23719
23720
  const buttonRef = (0, import_react124.useRef)(null);
23720
- const dialogId = `reaction-selector--${message.id}`;
23721
+ const dialogIdNamespace = threadList ? "-thread-" : "";
23722
+ const dialogId = `reaction-selector${dialogIdNamespace}--${message.id}`;
23721
23723
  const dialog = useDialog({ id: dialogId });
23722
23724
  const dialogIsOpen = useDialogIsOpen(dialogId);
23723
23725
  return /* @__PURE__ */ import_react124.default.createElement(import_react124.default.Fragment, null, /* @__PURE__ */ import_react124.default.createElement(
@@ -23761,9 +23763,12 @@ var UnMemoizedMessageOptions = (props) => {
23761
23763
  threadList
23762
23764
  } = useMessageContext("MessageOptions");
23763
23765
  const { t } = useTranslationContext("MessageOptions");
23764
- const messageActionsDialogIsOpen = useDialogIsOpen(`message-actions--${message.id}`);
23766
+ const dialogIdNamespace = threadList ? "-thread-" : "";
23767
+ const messageActionsDialogIsOpen = useDialogIsOpen(
23768
+ `message-actions${dialogIdNamespace}--${message.id}`
23769
+ );
23765
23770
  const reactionSelectorDialogIsOpen = useDialogIsOpen(
23766
- `reaction-selector--${message.id}`
23771
+ `reaction-selector${dialogIdNamespace}--${message.id}`
23767
23772
  );
23768
23773
  const handleOpenThread = propHandleOpenThread || contextHandleOpenThread;
23769
23774
  const messageActions = getMessageActions2();
@@ -34069,12 +34074,14 @@ var useAttachmentSelectorActionsFiltered = (original) => {
34069
34074
  } = useComponentContext();
34070
34075
  const { channelCapabilities } = useChannelStateContext();
34071
34076
  const messageComposer = useMessageComposer();
34077
+ const channelConfig = messageComposer.channel.getConfig();
34072
34078
  return original.filter((action) => {
34073
- if (action.type === "uploadFile") return channelCapabilities["upload-file"];
34079
+ if (action.type === "uploadFile")
34080
+ return channelCapabilities["upload-file"] && channelConfig?.uploads;
34074
34081
  if (action.type === "createPoll")
34075
- return channelCapabilities["send-poll"] && !messageComposer.threadId;
34082
+ return channelCapabilities["send-poll"] && !messageComposer.threadId && channelConfig?.polls;
34076
34083
  if (action.type === "addLocation") {
34077
- return messageComposer.config.location.enabled && !messageComposer.threadId;
34084
+ return channelConfig?.shared_locations && !messageComposer.threadId;
34078
34085
  }
34079
34086
  return true;
34080
34087
  }).map((action) => {
@@ -38024,7 +38031,7 @@ var useChat = ({
38024
38031
  };
38025
38032
  (0, import_react282.useEffect)(() => {
38026
38033
  if (!client) return;
38027
- const version = "13.6.3";
38034
+ const version = "13.6.5";
38028
38035
  const userAgent = client.getUserAgent();
38029
38036
  if (!userAgent.includes("stream-chat-react")) {
38030
38037
  client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);