stream-chat-react-native-core 5.40.0-rc.2 → 5.40.0
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/README.md +1 -0
- package/lib/commonjs/components/Attachment/Attachment.js +1 -1
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +6 -6
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +5 -5
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +22 -29
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +8 -8
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js +0 -7
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +1 -3
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +0 -3
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +0 -4
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js +0 -2
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +0 -2
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +3 -3
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +27 -0
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +2 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +0 -4
- package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +0 -4
- package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +445 -301
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +2 -0
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +9 -3
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +15 -27
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js +9 -8
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +2 -0
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js +18 -8
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js +46 -3
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +11 -2
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js +13 -3
- package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +2 -0
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js +13 -16
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/{UIComponents/ImageBackground.js → ImageBackground.js} +1 -1
- package/lib/commonjs/components/ImageBackground.js.map +1 -0
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +96 -58
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js +3 -3
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +90 -92
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +39 -39
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js +221 -221
- package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +186 -123
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +168 -48
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +1 -0
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +34 -20
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +44 -180
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +305 -0
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -0
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +16 -4
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +72 -36
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useProcessReactions.js +3 -3
- package/lib/commonjs/components/Message/hooks/useProcessReactions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/messageActions.js +6 -4
- package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +46 -2
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +0 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js +2 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/NativeAttachmentPicker.js +18 -1
- package/lib/commonjs/components/MessageInput/components/NativeAttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js +60 -42
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +3 -1
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js +112 -0
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +87 -0
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +452 -0
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +24 -0
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +305 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +188 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -0
- package/lib/{module/components/MessageMenu/MessageUserReactionsAvatar.js → commonjs/components/MessageOverlay/OverlayReactionsAvatar.js} +6 -5
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsItem.js +166 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsItem.js.map +1 -0
- package/lib/{module/components/MessageMenu → commonjs/components/MessageOverlay}/hooks/useFetchReactions.js +0 -2
- package/lib/commonjs/components/MessageOverlay/hooks/useFetchReactions.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js +34 -0
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -0
- package/lib/commonjs/components/Poll/CreatePollContent.js +386 -0
- package/lib/commonjs/components/Poll/CreatePollContent.js.map +1 -0
- package/lib/commonjs/components/Poll/Poll.js +112 -0
- package/lib/commonjs/components/Poll/Poll.js.map +1 -0
- package/lib/commonjs/components/Poll/components/Button.js +513 -0
- package/lib/commonjs/components/Poll/components/Button.js.map +1 -0
- package/lib/commonjs/components/Poll/components/CreatePollIcon.js +23 -0
- package/lib/commonjs/components/Poll/components/CreatePollIcon.js.map +1 -0
- package/lib/commonjs/components/Poll/components/CreatePollOptions.js +281 -0
- package/lib/commonjs/components/Poll/components/CreatePollOptions.js.map +1 -0
- package/lib/commonjs/components/Poll/components/PollAnswersList.js +154 -0
- package/lib/commonjs/components/Poll/components/PollAnswersList.js.map +1 -0
- package/lib/commonjs/components/Poll/components/PollInputDialog.js +139 -0
- package/lib/commonjs/components/Poll/components/PollInputDialog.js.map +1 -0
- package/lib/commonjs/components/Poll/components/PollModalHeader.js +60 -0
- package/lib/commonjs/components/Poll/components/PollModalHeader.js.map +1 -0
- package/lib/commonjs/components/Poll/components/PollOption.js +209 -0
- package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -0
- package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js +123 -0
- package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -0
- package/lib/commonjs/components/Poll/components/PollResults/PollResultItem.js +152 -0
- package/lib/commonjs/components/Poll/components/PollResults/PollResultItem.js.map +1 -0
- package/lib/commonjs/components/Poll/components/PollResults/PollResults.js +101 -0
- package/lib/commonjs/components/Poll/components/PollResults/PollResults.js.map +1 -0
- package/lib/commonjs/components/Poll/components/PollResults/index.js +37 -0
- package/lib/commonjs/components/Poll/components/PollResults/index.js.map +1 -0
- package/lib/commonjs/components/Poll/components/index.js +92 -0
- package/lib/commonjs/components/Poll/components/index.js.map +1 -0
- package/lib/commonjs/components/Poll/hooks/usePollAnswersPagination.js +129 -0
- package/lib/commonjs/components/Poll/hooks/usePollAnswersPagination.js.map +1 -0
- package/lib/commonjs/components/Poll/hooks/usePollOptionVotesPagination.js +140 -0
- package/lib/commonjs/components/Poll/hooks/usePollOptionVotesPagination.js.map +1 -0
- package/lib/commonjs/components/Poll/hooks/usePollState.js +103 -0
- package/lib/commonjs/components/Poll/hooks/usePollState.js.map +1 -0
- package/lib/commonjs/components/Poll/hooks/usePollStateStore.js +13 -0
- package/lib/commonjs/components/Poll/hooks/usePollStateStore.js.map +1 -0
- package/lib/commonjs/components/Poll/index.js +81 -0
- package/lib/commonjs/components/Poll/index.js.map +1 -0
- package/lib/commonjs/components/ProgressControl/ProgressControl.js +28 -21
- package/lib/commonjs/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/commonjs/components/ProgressControl/WaveProgressBar.js +27 -22
- package/lib/commonjs/components/ProgressControl/WaveProgressBar.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +3 -7
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/{UIComponents → Spinner}/Spinner.js +1 -1
- package/lib/commonjs/components/Spinner/Spinner.js.map +1 -0
- package/lib/commonjs/components/ThreadList/ThreadList.js +8 -7
- package/lib/commonjs/components/ThreadList/ThreadList.js.map +1 -1
- package/lib/commonjs/components/ThreadList/ThreadListItem.js +12 -9
- package/lib/commonjs/components/ThreadList/ThreadListItem.js.map +1 -1
- package/lib/commonjs/components/ThreadList/ThreadListUnreadBanner.js +4 -4
- package/lib/commonjs/components/ThreadList/ThreadListUnreadBanner.js.map +1 -1
- package/lib/commonjs/components/docs/data.js.map +1 -1
- package/lib/commonjs/components/index.js +50 -50
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +13 -1
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +11 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +11 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +11 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +11 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +11 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +11 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/index.js +22 -11
- package/lib/commonjs/contexts/index.js.map +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +11 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +11 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +40 -7
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +10 -2
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +45 -0
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js +27 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +67 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +11 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +14 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +58 -18
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +3 -0
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +11 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/pollContext/createPollContentContext.js +33 -0
- package/lib/commonjs/contexts/pollContext/createPollContentContext.js.map +1 -0
- package/lib/commonjs/contexts/pollContext/index.js +26 -0
- package/lib/commonjs/contexts/pollContext/index.js.map +1 -0
- package/lib/commonjs/contexts/{chatConfigContext/ChatConfigContext.js → pollContext/pollContext.js} +17 -17
- package/lib/commonjs/contexts/pollContext/pollContext.js.map +1 -0
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +11 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +176 -68
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +11 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +11 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +11 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/commonjs/hooks/useStateStore.js.map +1 -1
- package/lib/commonjs/hooks/useTranslatedMessage.js +4 -1
- package/lib/commonjs/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/commonjs/i18n/en.json +34 -0
- package/lib/commonjs/i18n/es.json +38 -0
- package/lib/commonjs/i18n/fr.json +38 -0
- package/lib/commonjs/i18n/he.json +38 -0
- package/lib/commonjs/i18n/hi.json +34 -0
- package/lib/commonjs/i18n/it.json +38 -0
- package/lib/commonjs/i18n/ja.json +34 -0
- package/lib/commonjs/i18n/ko.json +34 -0
- package/lib/commonjs/i18n/nl.json +34 -0
- package/lib/commonjs/i18n/pt-br.json +38 -0
- package/lib/commonjs/i18n/ru.json +42 -0
- package/lib/commonjs/i18n/tr.json +34 -0
- package/lib/commonjs/icons/Back.js +19 -0
- package/lib/commonjs/icons/Back.js.map +1 -0
- package/lib/commonjs/icons/DragHandle.js +21 -0
- package/lib/commonjs/icons/DragHandle.js.map +1 -0
- package/lib/commonjs/icons/PinHeader.js +6 -17
- package/lib/commonjs/icons/PinHeader.js.map +1 -1
- package/lib/commonjs/icons/PollThumbnail.js +19 -0
- package/lib/commonjs/icons/PollThumbnail.js.map +1 -0
- package/lib/commonjs/icons/SendPoll.js +19 -0
- package/lib/commonjs/icons/SendPoll.js.map +1 -0
- package/lib/commonjs/icons/index.js +44 -0
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/index.js +23 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mock-builders/DB/mock.js +82 -79
- package/lib/commonjs/mock-builders/DB/mock.js.map +1 -1
- package/lib/commonjs/native.js +25 -36
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/store/QuickSqliteClient.js +158 -0
- package/lib/commonjs/store/QuickSqliteClient.js.map +1 -0
- package/lib/commonjs/store/apis/addPendingTask.js +5 -5
- package/lib/commonjs/store/apis/addPendingTask.js.map +1 -1
- package/lib/commonjs/store/apis/deleteChannel.js +3 -3
- package/lib/commonjs/store/apis/deleteChannel.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMember.js +3 -3
- package/lib/commonjs/store/apis/deleteMember.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMessage.js +3 -3
- package/lib/commonjs/store/apis/deleteMessage.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMessagesForChannel.js +3 -3
- package/lib/commonjs/store/apis/deleteMessagesForChannel.js.map +1 -1
- package/lib/commonjs/store/apis/deletePendingTask.js +3 -3
- package/lib/commonjs/store/apis/deletePendingTask.js.map +1 -1
- package/lib/commonjs/store/apis/deleteReaction.js +3 -3
- package/lib/commonjs/store/apis/deleteReaction.js.map +1 -1
- package/lib/commonjs/store/apis/deleteReactions.js +2 -2
- package/lib/commonjs/store/apis/deleteReactions.js.map +1 -1
- package/lib/commonjs/store/apis/getAllChannelIds.js +2 -2
- package/lib/commonjs/store/apis/getAllChannelIds.js.map +1 -1
- package/lib/commonjs/store/apis/getAppSettings.js +3 -3
- package/lib/commonjs/store/apis/getAppSettings.js.map +1 -1
- package/lib/commonjs/store/apis/getChannelMessages.js +2 -2
- package/lib/commonjs/store/apis/getChannelMessages.js.map +1 -1
- package/lib/commonjs/store/apis/getChannels.js +2 -2
- package/lib/commonjs/store/apis/getChannels.js.map +1 -1
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js +2 -2
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/getLastSyncedAt.js +3 -3
- package/lib/commonjs/store/apis/getLastSyncedAt.js.map +1 -1
- package/lib/commonjs/store/apis/getMembers.js +2 -2
- package/lib/commonjs/store/apis/getMembers.js.map +1 -1
- package/lib/commonjs/store/apis/getPendingTasks.js +3 -3
- package/lib/commonjs/store/apis/getPendingTasks.js.map +1 -1
- package/lib/commonjs/store/apis/getReactions.js +2 -2
- package/lib/commonjs/store/apis/getReactions.js.map +1 -1
- package/lib/commonjs/store/apis/getReactionsforFilterSort.js +3 -6
- package/lib/commonjs/store/apis/getReactionsforFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/getReads.js +2 -2
- package/lib/commonjs/store/apis/getReads.js.map +1 -1
- package/lib/commonjs/store/apis/index.js +11 -0
- package/lib/commonjs/store/apis/index.js.map +1 -1
- package/lib/commonjs/store/apis/insertReaction.js +3 -3
- package/lib/commonjs/store/apis/insertReaction.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js +3 -3
- package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectChannels.js +3 -3
- package/lib/commonjs/store/apis/queries/selectChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectMembersForChannels.js +3 -3
- package/lib/commonjs/store/apis/queries/selectMembersForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js +3 -3
- package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectReactionsForMessages.js +3 -3
- package/lib/commonjs/store/apis/queries/selectReactionsForMessages.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectReadsForChannels.js +3 -3
- package/lib/commonjs/store/apis/queries/selectReadsForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/updateMessage.js +4 -4
- package/lib/commonjs/store/apis/updateMessage.js.map +1 -1
- package/lib/commonjs/store/apis/updatePollMessage.js +50 -0
- package/lib/commonjs/store/apis/updatePollMessage.js.map +1 -0
- package/lib/commonjs/store/apis/updateReaction.js +3 -3
- package/lib/commonjs/store/apis/updateReaction.js.map +1 -1
- package/lib/commonjs/store/apis/upsertAppSettings.js +3 -3
- package/lib/commonjs/store/apis/upsertAppSettings.js.map +1 -1
- package/lib/commonjs/store/apis/upsertChannelData.js +3 -3
- package/lib/commonjs/store/apis/upsertChannelData.js.map +1 -1
- package/lib/commonjs/store/apis/upsertChannelDataFromChannel.js +2 -2
- package/lib/commonjs/store/apis/upsertChannelDataFromChannel.js.map +1 -1
- package/lib/commonjs/store/apis/upsertChannels.js +3 -3
- package/lib/commonjs/store/apis/upsertChannels.js.map +1 -1
- package/lib/commonjs/store/apis/upsertCidsForQuery.js +3 -3
- package/lib/commonjs/store/apis/upsertCidsForQuery.js.map +1 -1
- package/lib/commonjs/store/apis/upsertMembers.js +3 -3
- package/lib/commonjs/store/apis/upsertMembers.js.map +1 -1
- package/lib/commonjs/store/apis/upsertMessages.js +3 -3
- package/lib/commonjs/store/apis/upsertMessages.js.map +1 -1
- package/lib/commonjs/store/apis/upsertReads.js +3 -3
- package/lib/commonjs/store/apis/upsertReads.js.map +1 -1
- package/lib/commonjs/store/apis/upsertUserSyncStatus.js +3 -3
- package/lib/commonjs/store/apis/upsertUserSyncStatus.js.map +1 -1
- package/lib/commonjs/store/mappers/mapMessageToStorable.js +5 -1
- package/lib/commonjs/store/mappers/mapMessageToStorable.js.map +1 -1
- package/lib/commonjs/store/mappers/mapStorableToMessage.js +5 -1
- package/lib/commonjs/store/mappers/mapStorableToMessage.js.map +1 -1
- package/lib/commonjs/store/schema.js +2 -0
- package/lib/commonjs/store/schema.js.map +1 -1
- package/lib/commonjs/utils/DBSyncManager.js +4 -4
- package/lib/commonjs/utils/DBSyncManager.js.map +1 -1
- package/lib/commonjs/utils/StreamChatRN.js +25 -0
- package/lib/commonjs/utils/StreamChatRN.js.map +1 -0
- package/lib/commonjs/utils/getResizedImageUrl.js +3 -5
- package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +1 -1
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +6 -6
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +5 -5
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +22 -29
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +8 -8
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js +0 -7
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +1 -3
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +0 -3
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +0 -4
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js +0 -2
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +0 -2
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +3 -3
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +27 -0
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +2 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Avatar/Avatar.js +0 -4
- package/lib/module/components/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +0 -4
- package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +445 -301
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js +2 -0
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +9 -3
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +15 -27
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js +9 -8
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +2 -0
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js +18 -8
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js +46 -3
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +11 -2
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/handleEventToSyncDB.js +13 -3
- package/lib/module/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js +2 -0
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js +13 -16
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/{UIComponents/ImageBackground.js → ImageBackground.js} +1 -1
- package/lib/module/components/ImageBackground.js.map +1 -0
- package/lib/module/components/ImageGallery/ImageGallery.js +96 -58
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js +3 -3
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +90 -92
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +39 -39
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
- package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js +221 -221
- package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/module/components/Message/Message.js +186 -123
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +168 -48
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +1 -0
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +34 -20
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +44 -180
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +305 -0
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -0
- package/lib/module/components/Message/hooks/useCreateMessageContext.js +16 -4
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +72 -36
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/module/components/Message/hooks/useProcessReactions.js +3 -3
- package/lib/module/components/Message/hooks/useProcessReactions.js.map +1 -1
- package/lib/module/components/Message/utils/messageActions.js +6 -4
- package/lib/module/components/Message/utils/messageActions.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +46 -2
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +0 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js +2 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js.map +1 -1
- package/lib/module/components/MessageInput/components/NativeAttachmentPicker.js +18 -1
- package/lib/module/components/MessageInput/components/NativeAttachmentPicker.js.map +1 -1
- package/lib/module/components/MessageInput/hooks/useAudioController.js +60 -42
- package/lib/module/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +3 -1
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionList.js +112 -0
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -0
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +87 -0
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -0
- package/lib/module/components/MessageOverlay/MessageOverlay.js +452 -0
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -0
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js +24 -0
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js.map +1 -0
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +305 -0
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -0
- package/lib/module/components/MessageOverlay/OverlayReactions.js +188 -0
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -0
- package/lib/{commonjs/components/MessageMenu/MessageUserReactionsAvatar.js → module/components/MessageOverlay/OverlayReactionsAvatar.js} +6 -5
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
- package/lib/module/components/MessageOverlay/OverlayReactionsItem.js +166 -0
- package/lib/module/components/MessageOverlay/OverlayReactionsItem.js.map +1 -0
- package/lib/{commonjs/components/MessageMenu → module/components/MessageOverlay}/hooks/useFetchReactions.js +0 -2
- package/lib/module/components/MessageOverlay/hooks/useFetchReactions.js.map +1 -0
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js +34 -0
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -0
- package/lib/module/components/Poll/CreatePollContent.js +386 -0
- package/lib/module/components/Poll/CreatePollContent.js.map +1 -0
- package/lib/module/components/Poll/Poll.js +112 -0
- package/lib/module/components/Poll/Poll.js.map +1 -0
- package/lib/module/components/Poll/components/Button.js +513 -0
- package/lib/module/components/Poll/components/Button.js.map +1 -0
- package/lib/module/components/Poll/components/CreatePollIcon.js +23 -0
- package/lib/module/components/Poll/components/CreatePollIcon.js.map +1 -0
- package/lib/module/components/Poll/components/CreatePollOptions.js +281 -0
- package/lib/module/components/Poll/components/CreatePollOptions.js.map +1 -0
- package/lib/module/components/Poll/components/PollAnswersList.js +154 -0
- package/lib/module/components/Poll/components/PollAnswersList.js.map +1 -0
- package/lib/module/components/Poll/components/PollInputDialog.js +139 -0
- package/lib/module/components/Poll/components/PollInputDialog.js.map +1 -0
- package/lib/module/components/Poll/components/PollModalHeader.js +60 -0
- package/lib/module/components/Poll/components/PollModalHeader.js.map +1 -0
- package/lib/module/components/Poll/components/PollOption.js +209 -0
- package/lib/module/components/Poll/components/PollOption.js.map +1 -0
- package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js +123 -0
- package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -0
- package/lib/module/components/Poll/components/PollResults/PollResultItem.js +152 -0
- package/lib/module/components/Poll/components/PollResults/PollResultItem.js.map +1 -0
- package/lib/module/components/Poll/components/PollResults/PollResults.js +101 -0
- package/lib/module/components/Poll/components/PollResults/PollResults.js.map +1 -0
- package/lib/module/components/Poll/components/PollResults/index.js +37 -0
- package/lib/module/components/Poll/components/PollResults/index.js.map +1 -0
- package/lib/module/components/Poll/components/index.js +92 -0
- package/lib/module/components/Poll/components/index.js.map +1 -0
- package/lib/module/components/Poll/hooks/usePollAnswersPagination.js +129 -0
- package/lib/module/components/Poll/hooks/usePollAnswersPagination.js.map +1 -0
- package/lib/module/components/Poll/hooks/usePollOptionVotesPagination.js +140 -0
- package/lib/module/components/Poll/hooks/usePollOptionVotesPagination.js.map +1 -0
- package/lib/module/components/Poll/hooks/usePollState.js +103 -0
- package/lib/module/components/Poll/hooks/usePollState.js.map +1 -0
- package/lib/module/components/Poll/hooks/usePollStateStore.js +13 -0
- package/lib/module/components/Poll/hooks/usePollStateStore.js.map +1 -0
- package/lib/module/components/Poll/index.js +81 -0
- package/lib/module/components/Poll/index.js.map +1 -0
- package/lib/module/components/ProgressControl/ProgressControl.js +28 -21
- package/lib/module/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/module/components/ProgressControl/WaveProgressBar.js +27 -22
- package/lib/module/components/ProgressControl/WaveProgressBar.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +3 -7
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/{UIComponents → Spinner}/Spinner.js +1 -1
- package/lib/module/components/Spinner/Spinner.js.map +1 -0
- package/lib/module/components/ThreadList/ThreadList.js +8 -7
- package/lib/module/components/ThreadList/ThreadList.js.map +1 -1
- package/lib/module/components/ThreadList/ThreadListItem.js +12 -9
- package/lib/module/components/ThreadList/ThreadListItem.js.map +1 -1
- package/lib/module/components/ThreadList/ThreadListUnreadBanner.js +4 -4
- package/lib/module/components/ThreadList/ThreadListUnreadBanner.js.map +1 -1
- package/lib/module/components/docs/data.js.map +1 -1
- package/lib/module/components/index.js +50 -50
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +13 -1
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +11 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +11 -1
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +11 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +11 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +11 -1
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +11 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/index.js +22 -11
- package/lib/module/contexts/index.js.map +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +11 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +11 -1
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +40 -7
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +10 -2
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +45 -0
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js +27 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +67 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
- package/lib/module/contexts/messagesContext/MessagesContext.js +11 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +14 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +58 -18
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +3 -0
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +11 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/pollContext/createPollContentContext.js +33 -0
- package/lib/module/contexts/pollContext/createPollContentContext.js.map +1 -0
- package/lib/module/contexts/pollContext/index.js +26 -0
- package/lib/module/contexts/pollContext/index.js.map +1 -0
- package/lib/module/contexts/{chatConfigContext/ChatConfigContext.js → pollContext/pollContext.js} +17 -17
- package/lib/module/contexts/pollContext/pollContext.js.map +1 -0
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +11 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +176 -68
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +11 -1
- package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +11 -1
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +11 -1
- package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/module/hooks/useStateStore.js.map +1 -1
- package/lib/module/hooks/useTranslatedMessage.js +4 -1
- package/lib/module/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/module/i18n/en.json +34 -0
- package/lib/module/i18n/es.json +38 -0
- package/lib/module/i18n/fr.json +38 -0
- package/lib/module/i18n/he.json +38 -0
- package/lib/module/i18n/hi.json +34 -0
- package/lib/module/i18n/it.json +38 -0
- package/lib/module/i18n/ja.json +34 -0
- package/lib/module/i18n/ko.json +34 -0
- package/lib/module/i18n/nl.json +34 -0
- package/lib/module/i18n/pt-br.json +38 -0
- package/lib/module/i18n/ru.json +42 -0
- package/lib/module/i18n/tr.json +34 -0
- package/lib/module/icons/Back.js +19 -0
- package/lib/module/icons/Back.js.map +1 -0
- package/lib/module/icons/DragHandle.js +21 -0
- package/lib/module/icons/DragHandle.js.map +1 -0
- package/lib/module/icons/PinHeader.js +6 -17
- package/lib/module/icons/PinHeader.js.map +1 -1
- package/lib/module/icons/PollThumbnail.js +19 -0
- package/lib/module/icons/PollThumbnail.js.map +1 -0
- package/lib/module/icons/SendPoll.js +19 -0
- package/lib/module/icons/SendPoll.js.map +1 -0
- package/lib/module/icons/index.js +44 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +23 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/mock-builders/DB/mock.js +82 -79
- package/lib/module/mock-builders/DB/mock.js.map +1 -1
- package/lib/module/native.js +25 -36
- package/lib/module/native.js.map +1 -1
- package/lib/module/store/QuickSqliteClient.js +158 -0
- package/lib/module/store/QuickSqliteClient.js.map +1 -0
- package/lib/module/store/apis/addPendingTask.js +5 -5
- package/lib/module/store/apis/addPendingTask.js.map +1 -1
- package/lib/module/store/apis/deleteChannel.js +3 -3
- package/lib/module/store/apis/deleteChannel.js.map +1 -1
- package/lib/module/store/apis/deleteMember.js +3 -3
- package/lib/module/store/apis/deleteMember.js.map +1 -1
- package/lib/module/store/apis/deleteMessage.js +3 -3
- package/lib/module/store/apis/deleteMessage.js.map +1 -1
- package/lib/module/store/apis/deleteMessagesForChannel.js +3 -3
- package/lib/module/store/apis/deleteMessagesForChannel.js.map +1 -1
- package/lib/module/store/apis/deletePendingTask.js +3 -3
- package/lib/module/store/apis/deletePendingTask.js.map +1 -1
- package/lib/module/store/apis/deleteReaction.js +3 -3
- package/lib/module/store/apis/deleteReaction.js.map +1 -1
- package/lib/module/store/apis/deleteReactions.js +2 -2
- package/lib/module/store/apis/deleteReactions.js.map +1 -1
- package/lib/module/store/apis/getAllChannelIds.js +2 -2
- package/lib/module/store/apis/getAllChannelIds.js.map +1 -1
- package/lib/module/store/apis/getAppSettings.js +3 -3
- package/lib/module/store/apis/getAppSettings.js.map +1 -1
- package/lib/module/store/apis/getChannelMessages.js +2 -2
- package/lib/module/store/apis/getChannelMessages.js.map +1 -1
- package/lib/module/store/apis/getChannels.js +2 -2
- package/lib/module/store/apis/getChannels.js.map +1 -1
- package/lib/module/store/apis/getChannelsForFilterSort.js +2 -2
- package/lib/module/store/apis/getChannelsForFilterSort.js.map +1 -1
- package/lib/module/store/apis/getLastSyncedAt.js +3 -3
- package/lib/module/store/apis/getLastSyncedAt.js.map +1 -1
- package/lib/module/store/apis/getMembers.js +2 -2
- package/lib/module/store/apis/getMembers.js.map +1 -1
- package/lib/module/store/apis/getPendingTasks.js +3 -3
- package/lib/module/store/apis/getPendingTasks.js.map +1 -1
- package/lib/module/store/apis/getReactions.js +2 -2
- package/lib/module/store/apis/getReactions.js.map +1 -1
- package/lib/module/store/apis/getReactionsforFilterSort.js +3 -6
- package/lib/module/store/apis/getReactionsforFilterSort.js.map +1 -1
- package/lib/module/store/apis/getReads.js +2 -2
- package/lib/module/store/apis/getReads.js.map +1 -1
- package/lib/module/store/apis/index.js +11 -0
- package/lib/module/store/apis/index.js.map +1 -1
- package/lib/module/store/apis/insertReaction.js +3 -3
- package/lib/module/store/apis/insertReaction.js.map +1 -1
- package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js +3 -3
- package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
- package/lib/module/store/apis/queries/selectChannels.js +3 -3
- package/lib/module/store/apis/queries/selectChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectMembersForChannels.js +3 -3
- package/lib/module/store/apis/queries/selectMembersForChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectMessagesForChannels.js +3 -3
- package/lib/module/store/apis/queries/selectMessagesForChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectReactionsForMessages.js +3 -3
- package/lib/module/store/apis/queries/selectReactionsForMessages.js.map +1 -1
- package/lib/module/store/apis/queries/selectReadsForChannels.js +3 -3
- package/lib/module/store/apis/queries/selectReadsForChannels.js.map +1 -1
- package/lib/module/store/apis/updateMessage.js +4 -4
- package/lib/module/store/apis/updateMessage.js.map +1 -1
- package/lib/module/store/apis/updatePollMessage.js +50 -0
- package/lib/module/store/apis/updatePollMessage.js.map +1 -0
- package/lib/module/store/apis/updateReaction.js +3 -3
- package/lib/module/store/apis/updateReaction.js.map +1 -1
- package/lib/module/store/apis/upsertAppSettings.js +3 -3
- package/lib/module/store/apis/upsertAppSettings.js.map +1 -1
- package/lib/module/store/apis/upsertChannelData.js +3 -3
- package/lib/module/store/apis/upsertChannelData.js.map +1 -1
- package/lib/module/store/apis/upsertChannelDataFromChannel.js +2 -2
- package/lib/module/store/apis/upsertChannelDataFromChannel.js.map +1 -1
- package/lib/module/store/apis/upsertChannels.js +3 -3
- package/lib/module/store/apis/upsertChannels.js.map +1 -1
- package/lib/module/store/apis/upsertCidsForQuery.js +3 -3
- package/lib/module/store/apis/upsertCidsForQuery.js.map +1 -1
- package/lib/module/store/apis/upsertMembers.js +3 -3
- package/lib/module/store/apis/upsertMembers.js.map +1 -1
- package/lib/module/store/apis/upsertMessages.js +3 -3
- package/lib/module/store/apis/upsertMessages.js.map +1 -1
- package/lib/module/store/apis/upsertReads.js +3 -3
- package/lib/module/store/apis/upsertReads.js.map +1 -1
- package/lib/module/store/apis/upsertUserSyncStatus.js +3 -3
- package/lib/module/store/apis/upsertUserSyncStatus.js.map +1 -1
- package/lib/module/store/mappers/mapMessageToStorable.js +5 -1
- package/lib/module/store/mappers/mapMessageToStorable.js.map +1 -1
- package/lib/module/store/mappers/mapStorableToMessage.js +5 -1
- package/lib/module/store/mappers/mapStorableToMessage.js.map +1 -1
- package/lib/module/store/schema.js +2 -0
- package/lib/module/store/schema.js.map +1 -1
- package/lib/module/utils/DBSyncManager.js +4 -4
- package/lib/module/utils/DBSyncManager.js.map +1 -1
- package/lib/module/utils/StreamChatRN.js +25 -0
- package/lib/module/utils/StreamChatRN.js.map +1 -0
- package/lib/module/utils/getResizedImageUrl.js +3 -5
- package/lib/module/utils/getResizedImageUrl.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Card.d.ts +2 -2
- package/lib/typescript/components/Attachment/Card.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +1 -1
- package/lib/typescript/components/Attachment/FileAttachment.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/Giphy.d.ts +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +1 -2
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +1 -2
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +1 -2
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +1 -2
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +2 -4
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +1 -2
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.d.ts +2 -2
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerItem.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerSelectionBar.d.ts.map +1 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/GroupAvatar.d.ts.map +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +2 -2
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateThreadContext.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +12 -0
- package/lib/typescript/components/ChannelList/ChannelList.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +2 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +5 -1
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts.map +1 -1
- package/lib/typescript/components/Chat/Chat.d.ts +1 -1
- package/lib/typescript/components/Chat/Chat.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/handleEventToSyncDB.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts.map +1 -1
- package/lib/typescript/components/ImageBackground.d.ts.map +1 -0
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts +5 -5
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryVideo.d.ts +5 -5
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryVideo.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +3 -3
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +3 -3
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryOverlay.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/components/ImageGalleryOverlay.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/hooks/useImageGalleryGestures.d.ts +5 -4
- package/lib/typescript/components/ImageGallery/hooks/useImageGalleryGestures.d.ts.map +1 -1
- package/lib/typescript/components/Message/Message.d.ts +40 -4
- package/lib/typescript/components/Message/Message.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +5 -11
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +6 -2
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +2 -1
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +32 -0
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts.map +1 -0
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +6 -5
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useProcessReactions.d.ts +3 -11
- package/lib/typescript/components/Message/hooks/useProcessReactions.d.ts.map +1 -1
- package/lib/typescript/components/Message/utils/messageActions.d.ts +14 -6
- package/lib/typescript/components/Message/utils/messageActions.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/NativeAttachmentPicker.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/hooks/useAudioController.d.ts.map +1 -1
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +14 -0
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts.map +1 -0
- package/lib/typescript/components/{MessageMenu → MessageOverlay}/MessageActionListItem.d.ts +8 -2
- package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts.map +1 -0
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +15 -0
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts.map +1 -0
- package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts +8 -0
- package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts.map +1 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts +36 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts.map +1 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +29 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts.map +1 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts +11 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts.map +1 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactionsItem.d.ts +11 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactionsItem.d.ts.map +1 -0
- package/lib/typescript/components/MessageOverlay/hooks/useFetchReactions.d.ts.map +1 -0
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +11 -0
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts.map +1 -0
- package/lib/typescript/components/Poll/CreatePollContent.d.ts +6 -0
- package/lib/typescript/components/Poll/CreatePollContent.d.ts.map +1 -0
- package/lib/typescript/components/Poll/Poll.d.ts +13 -0
- package/lib/typescript/components/Poll/Poll.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/Button.d.ts +35 -0
- package/lib/typescript/components/Poll/components/Button.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/CreatePollIcon.d.ts +3 -0
- package/lib/typescript/components/Poll/components/CreatePollIcon.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/CreatePollOptions.d.ts +34 -0
- package/lib/typescript/components/Poll/components/CreatePollOptions.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/PollAnswersList.d.ts +15 -0
- package/lib/typescript/components/Poll/components/PollAnswersList.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/PollInputDialog.d.ts +10 -0
- package/lib/typescript/components/Poll/components/PollInputDialog.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/PollModalHeader.d.ts +7 -0
- package/lib/typescript/components/Poll/components/PollModalHeader.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/PollOption.d.ts +16 -0
- package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/PollResults/PollOptionFullResults.d.ts +18 -0
- package/lib/typescript/components/Poll/components/PollResults/PollOptionFullResults.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/PollResults/PollResultItem.d.ts +9 -0
- package/lib/typescript/components/Poll/components/PollResults/PollResultItem.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/PollResults/PollResults.d.ts +10 -0
- package/lib/typescript/components/Poll/components/PollResults/PollResults.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/PollResults/index.d.ts +4 -0
- package/lib/typescript/components/Poll/components/PollResults/index.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/index.d.ts +9 -0
- package/lib/typescript/components/Poll/components/index.d.ts.map +1 -0
- package/lib/typescript/components/Poll/hooks/usePollAnswersPagination.d.ts +29 -0
- package/lib/typescript/components/Poll/hooks/usePollAnswersPagination.d.ts.map +1 -0
- package/lib/typescript/components/Poll/hooks/usePollOptionVotesPagination.d.ts +32 -0
- package/lib/typescript/components/Poll/hooks/usePollOptionVotesPagination.d.ts.map +1 -0
- package/lib/typescript/components/Poll/hooks/usePollState.d.ts +26 -0
- package/lib/typescript/components/Poll/hooks/usePollState.d.ts.map +1 -0
- package/lib/typescript/components/Poll/hooks/usePollStateStore.d.ts +3 -0
- package/lib/typescript/components/Poll/hooks/usePollStateStore.d.ts.map +1 -0
- package/lib/typescript/components/Poll/index.d.ts +8 -0
- package/lib/typescript/components/Poll/index.d.ts.map +1 -0
- package/lib/typescript/components/ProgressControl/ProgressControl.d.ts.map +1 -1
- package/lib/typescript/components/ProgressControl/WaveProgressBar.d.ts.map +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
- package/lib/typescript/components/Spinner/Spinner.d.ts.map +1 -0
- package/lib/typescript/components/ThreadList/ThreadList.d.ts.map +1 -1
- package/lib/typescript/components/ThreadList/ThreadListItem.d.ts.map +1 -1
- package/lib/typescript/components/ThreadList/ThreadListUnreadBanner.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +11 -11
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/contexts/activeChannelsRefContext/ActiveChannelsRefContext.d.ts +11 -0
- package/lib/typescript/contexts/activeChannelsRefContext/ActiveChannelsRefContext.d.ts.map +1 -1
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +18 -2
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +25 -1
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +11 -1
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +11 -1
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts.map +1 -1
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +15 -1
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts.map +1 -1
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +10 -0
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts.map +1 -1
- package/lib/typescript/contexts/index.d.ts +2 -1
- package/lib/typescript/contexts/index.d.ts.map +1 -1
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts +11 -0
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +56 -21
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +22 -3
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +80 -0
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts.map +1 -0
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.d.ts +13 -0
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.d.ts.map +1 -0
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.test.d.ts +2 -0
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.test.d.ts.map +1 -0
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +45 -77
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +27 -2
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts.map +1 -1
- package/lib/typescript/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.d.ts +3 -0
- package/lib/typescript/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.d.ts.map +1 -1
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +11 -1
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts.map +1 -1
- package/lib/typescript/contexts/pollContext/createPollContentContext.d.ts +20 -0
- package/lib/typescript/contexts/pollContext/createPollContentContext.d.ts.map +1 -0
- package/lib/typescript/contexts/pollContext/index.d.ts +3 -0
- package/lib/typescript/contexts/pollContext/index.d.ts.map +1 -0
- package/lib/typescript/contexts/pollContext/pollContext.d.ts +14 -0
- package/lib/typescript/contexts/pollContext/pollContext.d.ts.map +1 -0
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +11 -1
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts.map +1 -1
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +170 -61
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +11 -1
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts.map +1 -1
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +11 -0
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts.map +1 -1
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts +11 -1
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts.map +1 -1
- package/lib/typescript/hooks/useStateStore.d.ts +2 -2
- package/lib/typescript/hooks/useStateStore.d.ts.map +1 -1
- package/lib/typescript/hooks/useTranslatedMessage.d.ts.map +1 -1
- package/lib/typescript/i18n/en.json +34 -0
- package/lib/typescript/i18n/es.json +38 -0
- package/lib/typescript/i18n/fr.json +38 -0
- package/lib/typescript/i18n/he.json +38 -0
- package/lib/typescript/i18n/hi.json +34 -0
- package/lib/typescript/i18n/it.json +38 -0
- package/lib/typescript/i18n/ja.json +34 -0
- package/lib/typescript/i18n/ko.json +34 -0
- package/lib/typescript/i18n/nl.json +34 -0
- package/lib/typescript/i18n/pt-br.json +38 -0
- package/lib/typescript/i18n/ru.json +42 -0
- package/lib/typescript/i18n/tr.json +34 -0
- package/lib/typescript/icons/Back.d.ts +4 -0
- package/lib/typescript/icons/Back.d.ts.map +1 -0
- package/lib/typescript/icons/DragHandle.d.ts +4 -0
- package/lib/typescript/icons/DragHandle.d.ts.map +1 -0
- package/lib/typescript/icons/PinHeader.d.ts +1 -5
- package/lib/typescript/icons/PinHeader.d.ts.map +1 -1
- package/lib/typescript/icons/PollThumbnail.d.ts +4 -0
- package/lib/typescript/icons/PollThumbnail.d.ts.map +1 -0
- package/lib/typescript/icons/SendPoll.d.ts +4 -0
- package/lib/typescript/icons/SendPoll.d.ts.map +1 -0
- package/lib/typescript/icons/index.d.ts +4 -0
- package/lib/typescript/icons/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +3 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/native.d.ts +11 -9
- package/lib/typescript/native.d.ts.map +1 -1
- package/lib/typescript/store/{SqliteClient.d.ts → QuickSqliteClient.d.ts} +5 -6
- package/lib/typescript/store/QuickSqliteClient.d.ts.map +1 -0
- package/lib/typescript/store/apis/getReactionsforFilterSort.d.ts.map +1 -1
- package/lib/typescript/store/apis/index.d.ts +1 -0
- package/lib/typescript/store/apis/index.d.ts.map +1 -1
- package/lib/typescript/store/apis/updatePollMessage.d.ts +7 -0
- package/lib/typescript/store/apis/updatePollMessage.d.ts.map +1 -0
- package/lib/typescript/store/mappers/mapMessageToStorable.d.ts.map +1 -1
- package/lib/typescript/store/mappers/mapStorableToMessage.d.ts.map +1 -1
- package/lib/typescript/store/schema.d.ts +2 -0
- package/lib/typescript/store/schema.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +0 -6
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/utils/StreamChatRN.d.ts +23 -0
- package/lib/typescript/utils/StreamChatRN.d.ts.map +1 -0
- package/lib/typescript/utils/getResizedImageUrl.d.ts +2 -3
- package/lib/typescript/utils/getResizedImageUrl.d.ts.map +1 -1
- package/lib/typescript/utils/i18n/Streami18n.d.ts +34 -0
- package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/__tests__/offline-support/offline-feature.js +5 -5
- package/src/__tests__/offline-support/optimistic-update.js +4 -4
- package/src/components/Attachment/Attachment.tsx +2 -2
- package/src/components/Attachment/Card.tsx +10 -10
- package/src/components/Attachment/FileAttachment.tsx +16 -8
- package/src/components/Attachment/FileAttachmentGroup.tsx +2 -2
- package/src/components/Attachment/Gallery.tsx +17 -20
- package/src/components/Attachment/Giphy.tsx +14 -14
- package/src/components/Attachment/__tests__/Attachment.test.js +2 -4
- package/src/components/Attachment/__tests__/Gallery.test.js +2 -0
- package/src/components/Attachment/utils/buildGallery/buildGallery.ts +1 -10
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +1 -4
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +1 -5
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +1 -6
- package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +6 -13
- package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +1 -5
- package/src/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.tsx +2 -2
- package/src/components/AttachmentPicker/components/AttachmentPickerItem.tsx +1 -1
- package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx +35 -2
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +1 -1
- package/src/components/Avatar/Avatar.tsx +0 -3
- package/src/components/Avatar/GroupAvatar.tsx +0 -4
- package/src/components/Channel/Channel.tsx +159 -60
- package/src/components/Channel/__tests__/ownCapabilities.test.js +57 -57
- package/src/components/Channel/hooks/useCreateChannelContext.ts +2 -0
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +22 -3
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +15 -26
- package/src/components/Channel/hooks/useCreateThreadContext.ts +7 -8
- package/src/components/ChannelList/ChannelList.tsx +17 -0
- package/src/components/ChannelList/ChannelListFooterLoadingIndicator.tsx +1 -1
- package/src/components/ChannelList/__tests__/ChannelList.test.js +5 -5
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +11 -2
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +63 -4
- package/src/components/Chat/Chat.tsx +11 -3
- package/src/components/Chat/__tests__/Chat.test.js +179 -184
- package/src/components/Chat/hooks/handleEventToSyncDB.ts +22 -3
- package/src/components/Chat/hooks/useCreateChatContext.ts +2 -0
- package/src/components/Chat/hooks/useIsOnline.ts +10 -13
- package/src/components/ImageGallery/ImageGallery.tsx +121 -71
- package/src/components/ImageGallery/__tests__/AnimatedVideoGallery.test.tsx +11 -0
- package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +4 -3
- package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx +5 -3
- package/src/components/ImageGallery/__tests__/ImageGalleryGrid.test.tsx +1 -1
- package/src/components/ImageGallery/__tests__/ImageGalleryGridHandle.test.tsx +1 -1
- package/src/components/ImageGallery/__tests__/ImageGalleryHeader.test.tsx +5 -3
- package/src/components/ImageGallery/__tests__/ImageGalleryOverlay.test.tsx +3 -0
- package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx +5 -5
- package/src/components/ImageGallery/components/AnimatedGalleryVideo.tsx +9 -9
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +86 -97
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +44 -46
- package/src/components/ImageGallery/components/ImageGalleryOverlay.tsx +1 -2
- package/src/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.tsx +4 -3
- package/src/components/ImageGallery/hooks/useImageGalleryGestures.tsx +466 -481
- package/src/components/Indicators/LoadingIndicator.tsx +1 -1
- package/src/components/Message/Message.tsx +217 -113
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +0 -1
- package/src/components/Message/MessageSimple/MessageContent.tsx +171 -28
- package/src/components/Message/MessageSimple/MessageDeleted.tsx +1 -1
- package/src/components/Message/MessageSimple/MessageFooter.tsx +1 -1
- package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +66 -21
- package/src/components/Message/MessageSimple/MessageSimple.tsx +55 -247
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +4 -3
- package/src/components/Message/MessageSimple/ReactionList.tsx +398 -0
- package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +2 -1
- package/src/components/Message/MessageSimple/__tests__/MessageTextContainer.test.tsx +3 -3
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessagePinnedHeader.test.js.snap +19 -23
- package/src/components/Message/hooks/useCreateMessageContext.ts +16 -4
- package/src/components/Message/hooks/useMessageActions.tsx +68 -48
- package/src/components/Message/hooks/useProcessReactions.ts +10 -17
- package/src/components/Message/utils/messageActions.ts +20 -10
- package/src/components/MessageInput/FileUploadPreview.tsx +2 -2
- package/src/components/MessageInput/MessageInput.tsx +59 -1
- package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewExpo.test.tsx +4 -1
- package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewNative.test.tsx +4 -1
- package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +5 -3
- package/src/components/MessageInput/__tests__/MessageInput.test.js +2 -0
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingButton.tsx +1 -7
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.tsx +1 -0
- package/src/components/MessageInput/components/NativeAttachmentPicker.tsx +29 -2
- package/src/components/MessageInput/hooks/useAudioController.tsx +3 -0
- package/src/components/MessageList/MessageList.tsx +1 -1
- package/src/components/MessageList/__tests__/MessageList.test.js +21 -0
- package/src/components/MessageOverlay/MessageActionList.tsx +171 -0
- package/src/components/MessageOverlay/MessageActionListItem.tsx +144 -0
- package/src/components/MessageOverlay/MessageOverlay.tsx +637 -0
- package/src/components/MessageOverlay/OverlayBackdrop.tsx +18 -0
- package/src/components/MessageOverlay/OverlayReactionList.tsx +447 -0
- package/src/components/MessageOverlay/OverlayReactions.tsx +250 -0
- package/src/components/{MessageMenu/MessageUserReactionsAvatar.tsx → MessageOverlay/OverlayReactionsAvatar.tsx} +6 -6
- package/src/components/MessageOverlay/OverlayReactionsItem.tsx +188 -0
- package/src/components/{MessageMenu → MessageOverlay}/hooks/useFetchReactions.ts +0 -2
- package/src/components/MessageOverlay/hooks/useMessageActionAnimation.tsx +44 -0
- package/src/components/Poll/CreatePollContent.tsx +299 -0
- package/src/components/Poll/Poll.tsx +126 -0
- package/src/components/Poll/components/Button.tsx +465 -0
- package/src/components/Poll/components/CreatePollIcon.tsx +14 -0
- package/src/components/Poll/components/CreatePollOptions.tsx +351 -0
- package/src/components/Poll/components/PollAnswersList.tsx +134 -0
- package/src/components/Poll/components/PollInputDialog.tsx +117 -0
- package/src/components/Poll/components/PollModalHeader.tsx +42 -0
- package/src/components/Poll/components/PollOption.tsx +172 -0
- package/src/components/Poll/components/PollResults/PollOptionFullResults.tsx +108 -0
- package/src/components/Poll/components/PollResults/PollResultItem.tsx +115 -0
- package/src/components/Poll/components/PollResults/PollResults.tsx +79 -0
- package/src/components/Poll/components/PollResults/index.ts +3 -0
- package/src/components/Poll/components/index.ts +8 -0
- package/src/components/Poll/hooks/usePollAnswersPagination.ts +109 -0
- package/src/components/Poll/hooks/usePollOptionVotesPagination.ts +119 -0
- package/src/components/Poll/hooks/usePollState.ts +122 -0
- package/src/components/Poll/hooks/usePollStateStore.ts +13 -0
- package/src/components/Poll/index.ts +10 -0
- package/src/components/ProgressControl/ProgressControl.tsx +38 -28
- package/src/components/ProgressControl/WaveProgressBar.tsx +37 -29
- package/src/components/Reply/Reply.tsx +4 -5
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +796 -903
- package/src/components/ThreadList/ThreadList.tsx +6 -2
- package/src/components/ThreadList/ThreadListItem.tsx +9 -8
- package/src/components/ThreadList/ThreadListUnreadBanner.tsx +3 -2
- package/src/components/docs/data.js +27 -13
- package/src/components/index.ts +11 -11
- package/src/contexts/__tests__/index.test.tsx +5 -0
- package/src/contexts/activeChannelsRefContext/ActiveChannelsRefContext.tsx +27 -0
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +41 -2
- package/src/contexts/channelContext/ChannelContext.tsx +46 -2
- package/src/contexts/channelsContext/ChannelsContext.tsx +28 -1
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +30 -1
- package/src/contexts/chatContext/ChatContext.tsx +30 -1
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +29 -0
- package/src/contexts/index.ts +2 -1
- package/src/contexts/keyboardContext/KeyboardContext.tsx +30 -0
- package/src/contexts/messageContext/MessageContext.tsx +75 -22
- package/src/contexts/messageInputContext/MessageInputContext.tsx +75 -21
- package/src/contexts/messageInputContext/__tests__/isValidMessage.test.tsx +3 -2
- package/src/contexts/messageInputContext/__tests__/pickFile.test.tsx +4 -2
- package/src/contexts/messageInputContext/__tests__/uploadFile.test.tsx +2 -1
- package/src/contexts/messageInputContext/__tests__/uploadImage.test.tsx +2 -1
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +14 -1
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +148 -0
- package/src/contexts/messageOverlayContext/hooks/useResettableState.test.tsx +48 -0
- package/src/contexts/messageOverlayContext/hooks/useResettableState.ts +22 -0
- package/src/contexts/messagesContext/MessagesContext.tsx +70 -84
- package/src/contexts/overlayContext/OverlayContext.tsx +56 -2
- package/src/contexts/overlayContext/OverlayProvider.tsx +67 -23
- package/src/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.tsx +3 -0
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +30 -1
- package/src/contexts/pollContext/createPollContentContext.tsx +49 -0
- package/src/contexts/pollContext/index.ts +2 -0
- package/src/contexts/pollContext/pollContext.tsx +43 -0
- package/src/contexts/suggestionsContext/SuggestionsContext.tsx +30 -1
- package/src/contexts/themeContext/utils/theme.ts +326 -126
- package/src/contexts/threadContext/ThreadContext.tsx +28 -1
- package/src/contexts/translationContext/TranslationContext.tsx +29 -0
- package/src/contexts/typingContext/TypingContext.tsx +28 -1
- package/src/hooks/__tests__/useTranslatedMessage.test.tsx +9 -3
- package/src/hooks/useStateStore.ts +12 -12
- package/src/hooks/useTranslatedMessage.ts +4 -1
- package/src/i18n/en.json +34 -0
- package/src/i18n/es.json +38 -0
- package/src/i18n/fr.json +38 -0
- package/src/i18n/he.json +38 -0
- package/src/i18n/hi.json +34 -0
- package/src/i18n/it.json +38 -0
- package/src/i18n/ja.json +34 -0
- package/src/i18n/ko.json +34 -0
- package/src/i18n/nl.json +34 -0
- package/src/i18n/pt-br.json +38 -0
- package/src/i18n/ru.json +42 -0
- package/src/i18n/tr.json +34 -0
- package/src/icons/Back.tsx +12 -0
- package/src/icons/DragHandle.tsx +9 -0
- package/src/icons/PinHeader.tsx +7 -13
- package/src/icons/PollThumbnail.tsx +12 -0
- package/src/icons/SendPoll.tsx +12 -0
- package/src/icons/index.ts +4 -0
- package/src/index.ts +3 -2
- package/src/mock-builders/DB/mock.ts +84 -82
- package/src/native.ts +26 -15
- package/src/store/{SqliteClient.ts → QuickSqliteClient.ts} +55 -75
- package/src/store/apis/addPendingTask.ts +5 -5
- package/src/store/apis/deleteChannel.ts +3 -3
- package/src/store/apis/deleteMember.ts +3 -3
- package/src/store/apis/deleteMessage.ts +3 -3
- package/src/store/apis/deleteMessagesForChannel.ts +3 -3
- package/src/store/apis/deletePendingTask.ts +3 -3
- package/src/store/apis/deleteReaction.ts +3 -3
- package/src/store/apis/deleteReactions.ts +2 -2
- package/src/store/apis/getAllChannelIds.ts +2 -2
- package/src/store/apis/getAppSettings.ts +3 -3
- package/src/store/apis/getChannelMessages.ts +2 -2
- package/src/store/apis/getChannels.ts +2 -2
- package/src/store/apis/getChannelsForFilterSort.ts +2 -2
- package/src/store/apis/getLastSyncedAt.ts +3 -3
- package/src/store/apis/getMembers.ts +2 -2
- package/src/store/apis/getPendingTasks.ts +3 -3
- package/src/store/apis/getReactions.ts +2 -2
- package/src/store/apis/getReactionsforFilterSort.ts +3 -5
- package/src/store/apis/getReads.ts +2 -2
- package/src/store/apis/index.ts +1 -0
- package/src/store/apis/insertReaction.ts +3 -3
- package/src/store/apis/queries/selectChannelIdsForFilterSort.ts +3 -3
- package/src/store/apis/queries/selectChannels.ts +3 -3
- package/src/store/apis/queries/selectMembersForChannels.ts +3 -3
- package/src/store/apis/queries/selectMessagesForChannels.ts +4 -4
- package/src/store/apis/queries/selectReactionsForMessages.ts +3 -3
- package/src/store/apis/queries/selectReadsForChannels.ts +4 -4
- package/src/store/apis/updateMessage.ts +4 -4
- package/src/store/apis/updatePollMessage.ts +48 -0
- package/src/store/apis/updateReaction.ts +3 -3
- package/src/store/apis/upsertAppSettings.ts +3 -3
- package/src/store/apis/upsertChannelData.ts +3 -3
- package/src/store/apis/upsertChannelDataFromChannel.ts +2 -2
- package/src/store/apis/upsertChannels.ts +3 -3
- package/src/store/apis/upsertCidsForQuery.ts +3 -3
- package/src/store/apis/upsertMembers.ts +3 -3
- package/src/store/apis/upsertMessages.ts +3 -3
- package/src/store/apis/upsertReads.ts +3 -3
- package/src/store/apis/upsertUserSyncStatus.ts +3 -3
- package/src/store/mappers/mapMessageToStorable.ts +4 -0
- package/src/store/mappers/mapStorableToMessage.ts +4 -0
- package/src/store/schema.ts +4 -0
- package/src/types/types.ts +0 -7
- package/src/utils/DBSyncManager.ts +4 -4
- package/src/utils/StreamChatRN.ts +27 -0
- package/src/utils/__tests__/getResizedImageUrl.test.ts +2 -1
- package/src/utils/getResizedImageUrl.ts +5 -7
- package/src/version.json +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListBottom.js +0 -234
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListBottom.js.map +0 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListTop.js +0 -195
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListTop.js.map +0 -1
- package/lib/commonjs/components/Message/hooks/useMessageData.js +0 -38
- package/lib/commonjs/components/Message/hooks/useMessageData.js.map +0 -1
- package/lib/commonjs/components/MessageMenu/MessageActionList.js +0 -35
- package/lib/commonjs/components/MessageMenu/MessageActionList.js.map +0 -1
- package/lib/commonjs/components/MessageMenu/MessageActionListItem.js +0 -60
- package/lib/commonjs/components/MessageMenu/MessageActionListItem.js.map +0 -1
- package/lib/commonjs/components/MessageMenu/MessageMenu.js +0 -70
- package/lib/commonjs/components/MessageMenu/MessageMenu.js.map +0 -1
- package/lib/commonjs/components/MessageMenu/MessageReactionPicker.js +0 -81
- package/lib/commonjs/components/MessageMenu/MessageReactionPicker.js.map +0 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js +0 -171
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js.map +0 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsAvatar.js.map +0 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js +0 -110
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js.map +0 -1
- package/lib/commonjs/components/MessageMenu/ReactionButton.js +0 -59
- package/lib/commonjs/components/MessageMenu/ReactionButton.js.map +0 -1
- package/lib/commonjs/components/MessageMenu/hooks/useFetchReactions.js.map +0 -1
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js +0 -152
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js.map +0 -1
- package/lib/commonjs/components/UIComponents/ImageBackground.js.map +0 -1
- package/lib/commonjs/components/UIComponents/Spinner.js.map +0 -1
- package/lib/commonjs/components/UIComponents/index.js +0 -37
- package/lib/commonjs/components/UIComponents/index.js.map +0 -1
- package/lib/commonjs/contexts/chatConfigContext/ChatConfigContext.js.map +0 -1
- package/lib/commonjs/store/SqliteClient.js +0 -179
- package/lib/commonjs/store/SqliteClient.js.map +0 -1
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListBottom.js +0 -234
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListBottom.js.map +0 -1
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListTop.js +0 -195
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListTop.js.map +0 -1
- package/lib/module/components/Message/hooks/useMessageData.js +0 -38
- package/lib/module/components/Message/hooks/useMessageData.js.map +0 -1
- package/lib/module/components/MessageMenu/MessageActionList.js +0 -35
- package/lib/module/components/MessageMenu/MessageActionList.js.map +0 -1
- package/lib/module/components/MessageMenu/MessageActionListItem.js +0 -60
- package/lib/module/components/MessageMenu/MessageActionListItem.js.map +0 -1
- package/lib/module/components/MessageMenu/MessageMenu.js +0 -70
- package/lib/module/components/MessageMenu/MessageMenu.js.map +0 -1
- package/lib/module/components/MessageMenu/MessageReactionPicker.js +0 -81
- package/lib/module/components/MessageMenu/MessageReactionPicker.js.map +0 -1
- package/lib/module/components/MessageMenu/MessageUserReactions.js +0 -171
- package/lib/module/components/MessageMenu/MessageUserReactions.js.map +0 -1
- package/lib/module/components/MessageMenu/MessageUserReactionsAvatar.js.map +0 -1
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js +0 -110
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js.map +0 -1
- package/lib/module/components/MessageMenu/ReactionButton.js +0 -59
- package/lib/module/components/MessageMenu/ReactionButton.js.map +0 -1
- package/lib/module/components/MessageMenu/hooks/useFetchReactions.js.map +0 -1
- package/lib/module/components/UIComponents/BottomSheetModal.js +0 -152
- package/lib/module/components/UIComponents/BottomSheetModal.js.map +0 -1
- package/lib/module/components/UIComponents/ImageBackground.js.map +0 -1
- package/lib/module/components/UIComponents/Spinner.js.map +0 -1
- package/lib/module/components/UIComponents/index.js +0 -37
- package/lib/module/components/UIComponents/index.js.map +0 -1
- package/lib/module/contexts/chatConfigContext/ChatConfigContext.js.map +0 -1
- package/lib/module/store/SqliteClient.js +0 -179
- package/lib/module/store/SqliteClient.js.map +0 -1
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListBottom.d.ts +0 -12
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListBottom.d.ts.map +0 -1
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListTop.d.ts +0 -20
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListTop.d.ts.map +0 -1
- package/lib/typescript/components/Message/hooks/useMessageData.d.ts +0 -12
- package/lib/typescript/components/Message/hooks/useMessageData.d.ts.map +0 -1
- package/lib/typescript/components/MessageMenu/MessageActionList.d.ts +0 -16
- package/lib/typescript/components/MessageMenu/MessageActionList.d.ts.map +0 -1
- package/lib/typescript/components/MessageMenu/MessageActionListItem.d.ts.map +0 -1
- package/lib/typescript/components/MessageMenu/MessageMenu.d.ts +0 -32
- package/lib/typescript/components/MessageMenu/MessageMenu.d.ts.map +0 -1
- package/lib/typescript/components/MessageMenu/MessageReactionPicker.d.ts +0 -30
- package/lib/typescript/components/MessageMenu/MessageReactionPicker.d.ts.map +0 -1
- package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts +0 -21
- package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts.map +0 -1
- package/lib/typescript/components/MessageMenu/MessageUserReactionsAvatar.d.ts +0 -11
- package/lib/typescript/components/MessageMenu/MessageUserReactionsAvatar.d.ts.map +0 -1
- package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts +0 -16
- package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts.map +0 -1
- package/lib/typescript/components/MessageMenu/ReactionButton.d.ts +0 -25
- package/lib/typescript/components/MessageMenu/ReactionButton.d.ts.map +0 -1
- package/lib/typescript/components/MessageMenu/hooks/useFetchReactions.d.ts.map +0 -1
- package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts +0 -21
- package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts.map +0 -1
- package/lib/typescript/components/UIComponents/ImageBackground.d.ts.map +0 -1
- package/lib/typescript/components/UIComponents/Spinner.d.ts.map +0 -1
- package/lib/typescript/components/UIComponents/index.d.ts +0 -4
- package/lib/typescript/components/UIComponents/index.d.ts.map +0 -1
- package/lib/typescript/contexts/chatConfigContext/ChatConfigContext.d.ts +0 -16
- package/lib/typescript/contexts/chatConfigContext/ChatConfigContext.d.ts.map +0 -1
- package/lib/typescript/store/SqliteClient.d.ts.map +0 -1
- package/src/components/Message/MessageSimple/ReactionList/ReactionListBottom.tsx +0 -295
- package/src/components/Message/MessageSimple/ReactionList/ReactionListTop.tsx +0 -271
- package/src/components/Message/MessageSimple/__tests__/MessageSimple.test.js +0 -208
- package/src/components/Message/MessageSimple/__tests__/ReactionListBottom.test.js +0 -166
- package/src/components/Message/MessageSimple/__tests__/ReactionListTop.test.js +0 -92
- package/src/components/Message/hooks/useMessageData.ts +0 -59
- package/src/components/MessageMenu/MessageActionList.tsx +0 -49
- package/src/components/MessageMenu/MessageActionListItem.tsx +0 -86
- package/src/components/MessageMenu/MessageMenu.tsx +0 -123
- package/src/components/MessageMenu/MessageReactionPicker.tsx +0 -122
- package/src/components/MessageMenu/MessageUserReactions.tsx +0 -209
- package/src/components/MessageMenu/MessageUserReactionsItem.tsx +0 -130
- package/src/components/MessageMenu/ReactionButton.tsx +0 -72
- package/src/components/MessageMenu/__tests__/MessageActionList.test.tsx +0 -48
- package/src/components/MessageMenu/__tests__/MessageActionListItem.test.tsx +0 -48
- package/src/components/MessageMenu/__tests__/MessageReactionPicker.test.tsx +0 -101
- package/src/components/MessageMenu/__tests__/MessageUserReactions.test.tsx +0 -186
- package/src/components/MessageMenu/__tests__/MessageUserReactionsAvatar.test.tsx +0 -35
- package/src/components/MessageMenu/__tests__/MessageUserReactionsItem.test.tsx +0 -81
- package/src/components/MessageMenu/__tests__/ReactionButton.test.tsx +0 -77
- package/src/components/UIComponents/BottomSheetModal.tsx +0 -170
- package/src/components/UIComponents/index.ts +0 -3
- package/src/contexts/chatConfigContext/ChatConfigContext.tsx +0 -33
- /package/lib/typescript/components/{UIComponents/ImageBackground.d.ts → ImageBackground.d.ts} +0 -0
- /package/lib/typescript/components/{MessageMenu → MessageOverlay}/hooks/useFetchReactions.d.ts +0 -0
- /package/lib/typescript/components/{UIComponents → Spinner}/Spinner.d.ts +0 -0
- /package/src/components/{UIComponents/ImageBackground.tsx → ImageBackground.tsx} +0 -0
- /package/src/components/{UIComponents → Spinner}/Spinner.tsx +0 -0
|
@@ -81,8 +81,7 @@ var _MessageRepliesAvatars = require("../Message/MessageSimple/MessageRepliesAva
|
|
|
81
81
|
var _MessageSimple = require("../Message/MessageSimple/MessageSimple");
|
|
82
82
|
var _MessageStatus = require("../Message/MessageSimple/MessageStatus");
|
|
83
83
|
var _MessageTimestamp = require("../Message/MessageSimple/MessageTimestamp");
|
|
84
|
-
var
|
|
85
|
-
var _ReactionListTop = require("../Message/MessageSimple/ReactionList/ReactionListTop");
|
|
84
|
+
var _ReactionList = require("../Message/MessageSimple/ReactionList");
|
|
86
85
|
var _AttachButton = require("../MessageInput/AttachButton");
|
|
87
86
|
var _CommandsButton = require("../MessageInput/CommandsButton");
|
|
88
87
|
var _AudioRecorder = require("../MessageInput/components/AudioRecorder/AudioRecorder");
|
|
@@ -113,16 +112,10 @@ var _ScrollToBottomButton = require("../MessageList/ScrollToBottomButton");
|
|
|
113
112
|
var _StickyHeader = require("../MessageList/StickyHeader");
|
|
114
113
|
var _TypingIndicator = require("../MessageList/TypingIndicator");
|
|
115
114
|
var _TypingIndicatorContainer = require("../MessageList/TypingIndicatorContainer");
|
|
116
|
-
var
|
|
117
|
-
var _MessageActionListItem = require("../MessageMenu/MessageActionListItem");
|
|
118
|
-
var _MessageMenu = require("../MessageMenu/MessageMenu");
|
|
119
|
-
var _MessageReactionPicker = require("../MessageMenu/MessageReactionPicker");
|
|
120
|
-
var _MessageUserReactions = require("../MessageMenu/MessageUserReactions");
|
|
121
|
-
var _MessageUserReactionsAvatar = require("../MessageMenu/MessageUserReactionsAvatar");
|
|
122
|
-
var _MessageUserReactionsItem = require("../MessageMenu/MessageUserReactionsItem");
|
|
115
|
+
var _OverlayReactionList = require("../MessageOverlay/OverlayReactionList");
|
|
123
116
|
var _Reply = require("../Reply/Reply");
|
|
124
117
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
125
|
-
var _excluded = ["attachments", "mentioned_users", "parent_id", "text"],
|
|
118
|
+
var _excluded = ["attachments", "mentioned_users", "parent_id", "poll", "poll_id", "text"],
|
|
126
119
|
_excluded2 = ["channel_mutes", "devices", "mutes"];
|
|
127
120
|
var _this = this,
|
|
128
121
|
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Channel/Channel.tsx";
|
|
@@ -163,10 +156,10 @@ var debounceOptions = {
|
|
|
163
156
|
trailing: true
|
|
164
157
|
};
|
|
165
158
|
var ChannelWithContext = function ChannelWithContext(props) {
|
|
166
|
-
var _client$user, _channel$data2,
|
|
159
|
+
var _channel$getConfig, _client$user, _channel$data2, _ref30, _ref31;
|
|
167
160
|
var additionalKeyboardAvoidingViewProps = props.additionalKeyboardAvoidingViewProps,
|
|
168
|
-
additionalPressableProps = props.additionalPressableProps,
|
|
169
161
|
additionalTextInputProps = props.additionalTextInputProps,
|
|
162
|
+
additionalTouchableProps = props.additionalTouchableProps,
|
|
170
163
|
_props$allowThreadMes = props.allowThreadMessagesInChannel,
|
|
171
164
|
allowThreadMessagesInChannel = _props$allowThreadMes === void 0 ? true : _props$allowThreadMes,
|
|
172
165
|
_props$asyncMessagesL = props.asyncMessagesLockDistance,
|
|
@@ -190,7 +183,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
190
183
|
_props$AudioRecorder = props.AudioRecorder,
|
|
191
184
|
AudioRecorder = _props$AudioRecorder === void 0 ? _AudioRecorder.AudioRecorder : _props$AudioRecorder,
|
|
192
185
|
_props$audioRecording = props.audioRecordingEnabled,
|
|
193
|
-
audioRecordingEnabled = _props$audioRecording === void 0 ?
|
|
186
|
+
audioRecordingEnabled = _props$audioRecording === void 0 ? false : _props$audioRecording,
|
|
194
187
|
_props$AudioRecording = props.AudioRecordingInProgress,
|
|
195
188
|
AudioRecordingInProgress = _props$AudioRecording === void 0 ? _AudioRecordingInProgress.AudioRecordingInProgress : _props$AudioRecording,
|
|
196
189
|
_props$AudioRecording2 = props.AudioRecordingLockIndicator,
|
|
@@ -220,6 +213,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
220
213
|
compressImageQuality = props.compressImageQuality,
|
|
221
214
|
_props$CooldownTimer = props.CooldownTimer,
|
|
222
215
|
CooldownTimer = _props$CooldownTimer === void 0 ? _CooldownTimer.CooldownTimer : _props$CooldownTimer,
|
|
216
|
+
CreatePollContent = props.CreatePollContent,
|
|
223
217
|
_props$DateHeader = props.DateHeader,
|
|
224
218
|
DateHeader = _props$DateHeader === void 0 ? _DateHeader.DateHeader : _props$DateHeader,
|
|
225
219
|
_props$deletedMessage = props.deletedMessagesVisibilityType,
|
|
@@ -266,6 +260,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
266
260
|
giphyVersion = _props$giphyVersion === void 0 ? 'fixed_height' : _props$giphyVersion,
|
|
267
261
|
handleAttachButtonPress = props.handleAttachButtonPress,
|
|
268
262
|
handleBan = props.handleBan,
|
|
263
|
+
handleBlock = props.handleBlock,
|
|
269
264
|
handleCopy = props.handleCopy,
|
|
270
265
|
handleDelete = props.handleDelete,
|
|
271
266
|
handleEdit = props.handleEdit,
|
|
@@ -280,8 +275,9 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
280
275
|
hasCameraPicker = _props$hasCameraPicke === void 0 ? (0, _native.isImagePickerAvailable)() : _props$hasCameraPicke,
|
|
281
276
|
_props$hasCommands = props.hasCommands,
|
|
282
277
|
hasCommands = _props$hasCommands === void 0 ? true : _props$hasCommands,
|
|
278
|
+
hasCreatePoll = props.hasCreatePoll,
|
|
283
279
|
_props$hasFilePicker = props.hasFilePicker,
|
|
284
|
-
hasFilePicker = _props$hasFilePicker === void 0 ?
|
|
280
|
+
hasFilePicker = _props$hasFilePicker === void 0 ? _native.pickDocument !== null : _props$hasFilePicker,
|
|
285
281
|
_props$hasImagePicker = props.hasImagePicker,
|
|
286
282
|
hasImagePicker = _props$hasImagePicker === void 0 ? true : _props$hasImagePicker,
|
|
287
283
|
_props$hideDateSepara = props.hideDateSeparators,
|
|
@@ -334,10 +330,6 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
334
330
|
mentionAllAppUsersQuery = props.mentionAllAppUsersQuery,
|
|
335
331
|
_props$Message = props.Message,
|
|
336
332
|
Message = _props$Message === void 0 ? _Message.Message : _props$Message,
|
|
337
|
-
_props$MessageActionL = props.MessageActionList,
|
|
338
|
-
MessageActionList = _props$MessageActionL === void 0 ? _MessageActionList.MessageActionList : _props$MessageActionL,
|
|
339
|
-
_props$MessageActionL2 = props.MessageActionListItem,
|
|
340
|
-
MessageActionListItem = _props$MessageActionL2 === void 0 ? _MessageActionListItem.MessageActionListItem : _props$MessageActionL2,
|
|
341
333
|
messageActions = props.messageActions,
|
|
342
334
|
_props$MessageAvatar = props.MessageAvatar,
|
|
343
335
|
MessageAvatar = _props$MessageAvatar === void 0 ? _MessageAvatar.MessageAvatar : _props$MessageAvatar,
|
|
@@ -346,7 +338,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
346
338
|
_props$MessageContent = props.MessageContent,
|
|
347
339
|
MessageContent = _props$MessageContent === void 0 ? _MessageContent.MessageContent : _props$MessageContent,
|
|
348
340
|
_props$messageContent = props.messageContentOrder,
|
|
349
|
-
messageContentOrder = _props$messageContent === void 0 ? ['quoted_reply', 'gallery', 'files', 'text', 'attachments'] : _props$messageContent,
|
|
341
|
+
messageContentOrder = _props$messageContent === void 0 ? ['quoted_reply', 'gallery', 'files', 'poll', 'text', 'attachments'] : _props$messageContent,
|
|
350
342
|
_props$MessageDeleted = props.MessageDeleted,
|
|
351
343
|
MessageDeleted = _props$MessageDeleted === void 0 ? _MessageDeleted.MessageDeleted : _props$MessageDeleted,
|
|
352
344
|
_props$MessageEditedT = props.MessageEditedTimestamp,
|
|
@@ -359,12 +351,8 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
359
351
|
messageId = props.messageId,
|
|
360
352
|
_props$MessageList = props.MessageList,
|
|
361
353
|
MessageList = _props$MessageList === void 0 ? _MessageList.MessageList : _props$MessageList,
|
|
362
|
-
_props$MessageMenu = props.MessageMenu,
|
|
363
|
-
MessageMenu = _props$MessageMenu === void 0 ? _MessageMenu.MessageMenu : _props$MessageMenu,
|
|
364
354
|
_props$MessagePinnedH = props.MessagePinnedHeader,
|
|
365
355
|
MessagePinnedHeader = _props$MessagePinnedH === void 0 ? _MessagePinnedHeader.MessagePinnedHeader : _props$MessagePinnedH,
|
|
366
|
-
_props$MessageReactio = props.MessageReactionPicker,
|
|
367
|
-
MessageReactionPicker = _props$MessageReactio === void 0 ? _MessageReactionPicker.MessageReactionPicker : _props$MessageReactio,
|
|
368
356
|
_props$MessageReplies = props.MessageReplies,
|
|
369
357
|
MessageReplies = _props$MessageReplies === void 0 ? _MessageReplies.MessageReplies : _props$MessageReplies,
|
|
370
358
|
_props$MessageReplies2 = props.MessageRepliesAvatars,
|
|
@@ -377,16 +365,8 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
377
365
|
_props$MessageSystem = props.MessageSystem,
|
|
378
366
|
MessageSystem = _props$MessageSystem === void 0 ? _MessageSystem.MessageSystem : _props$MessageSystem,
|
|
379
367
|
MessageText = props.MessageText,
|
|
380
|
-
_props$messageTextNum = props.messageTextNumberOfLines,
|
|
381
|
-
messageTextNumberOfLines = _props$messageTextNum === void 0 ? 5 : _props$messageTextNum,
|
|
382
368
|
_props$MessageTimesta = props.MessageTimestamp,
|
|
383
369
|
MessageTimestamp = _props$MessageTimesta === void 0 ? _MessageTimestamp.MessageTimestamp : _props$MessageTimesta,
|
|
384
|
-
_props$MessageUserRea = props.MessageUserReactions,
|
|
385
|
-
MessageUserReactions = _props$MessageUserRea === void 0 ? _MessageUserReactions.MessageUserReactions : _props$MessageUserRea,
|
|
386
|
-
_props$MessageUserRea2 = props.MessageUserReactionsAvatar,
|
|
387
|
-
MessageUserReactionsAvatar = _props$MessageUserRea2 === void 0 ? _MessageUserReactionsAvatar.MessageUserReactionsAvatar : _props$MessageUserRea2,
|
|
388
|
-
_props$MessageUserRea3 = props.MessageUserReactionsItem,
|
|
389
|
-
MessageUserReactionsItem = _props$MessageUserRea3 === void 0 ? _MessageUserReactionsItem.MessageUserReactionsItem : _props$MessageUserRea3,
|
|
390
370
|
_props$MoreOptionsBut = props.MoreOptionsButton,
|
|
391
371
|
MoreOptionsButton = _props$MoreOptionsBut === void 0 ? _MoreOptionsButton.MoreOptionsButton : _props$MoreOptionsBut,
|
|
392
372
|
myMessageTheme = props.myMessageTheme,
|
|
@@ -400,13 +380,13 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
400
380
|
onLongPressMessage = props.onLongPressMessage,
|
|
401
381
|
onPressInMessage = props.onPressInMessage,
|
|
402
382
|
onPressMessage = props.onPressMessage,
|
|
383
|
+
openPollCreationDialog = props.openPollCreationDialog,
|
|
384
|
+
_props$OverlayReactio = props.OverlayReactionList,
|
|
385
|
+
OverlayReactionList = _props$OverlayReactio === void 0 ? _OverlayReactionList.OverlayReactionList : _props$OverlayReactio,
|
|
403
386
|
overrideOwnCapabilities = props.overrideOwnCapabilities,
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
_props$
|
|
407
|
-
reactionListPosition = _props$reactionListPo === void 0 ? 'top' : _props$reactionListPo,
|
|
408
|
-
_props$ReactionListTo = props.ReactionListTop,
|
|
409
|
-
ReactionListTop = _props$ReactionListTo === void 0 ? _ReactionListTop.ReactionListTop : _props$ReactionListTo,
|
|
387
|
+
PollContent = props.PollContent,
|
|
388
|
+
_props$ReactionList = props.ReactionList,
|
|
389
|
+
ReactionList = _props$ReactionList === void 0 ? _ReactionList.ReactionList : _props$ReactionList,
|
|
410
390
|
read = props.read,
|
|
411
391
|
_props$Reply = props.Reply,
|
|
412
392
|
Reply = _props$Reply === void 0 ? _Reply.Reply : _props$Reply,
|
|
@@ -495,7 +475,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
495
475
|
_useState16 = (0, _slicedToArray2["default"])(_useState15, 2),
|
|
496
476
|
loadingMoreRecent = _useState16[0],
|
|
497
477
|
setLoadingMoreRecent = _useState16[1];
|
|
498
|
-
var _useState17 = (0, _react.useState)(
|
|
478
|
+
var _useState17 = (0, _react.useState)(false),
|
|
499
479
|
_useState18 = (0, _slicedToArray2["default"])(_useState17, 2),
|
|
500
480
|
quotedMessage = _useState18[0],
|
|
501
481
|
setQuotedMessage = _useState18[1];
|
|
@@ -523,6 +503,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
523
503
|
var hasOverlappingRecentMessagesRef = (0, _react.useRef)(false);
|
|
524
504
|
var uploadAbortControllerRef = (0, _react.useRef)(new Map());
|
|
525
505
|
var channelId = (channel == null ? void 0 : channel.id) || '';
|
|
506
|
+
var pollCreationEnabled = !channel.disconnected && !!(channel != null && channel.id) && (channel == null ? void 0 : (_channel$getConfig = channel.getConfig()) == null ? void 0 : _channel$getConfig.polls);
|
|
526
507
|
(0, _react.useEffect)(function () {
|
|
527
508
|
var initChannel = function () {
|
|
528
509
|
var _ref = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee() {
|
|
@@ -676,7 +657,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
676
657
|
var updatedThreadMessages = thread.id && channel && channel.state.threads[thread.id] || threadMessages;
|
|
677
658
|
setThreadMessages(updatedThreadMessages);
|
|
678
659
|
}
|
|
679
|
-
if (channel && thread != null && thread.id && ((_event$message = event.message) == null ? void 0 : _event$message.id) === thread.id && !threadInstance) {
|
|
660
|
+
if (channel && thread != null && thread.id && ((_event$message = event.message) == null ? void 0 : _event$message.id) === thread.id && !threadInstance && !thread.poll_id) {
|
|
680
661
|
var updatedThread = channel.state.formatMessage(event.message);
|
|
681
662
|
setThread(updatedThread);
|
|
682
663
|
}
|
|
@@ -955,6 +936,33 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
955
936
|
restartSetsMergeFuncRef.current();
|
|
956
937
|
}
|
|
957
938
|
}, [targetedMessage]);
|
|
939
|
+
var loadChannelAtMessage = function loadChannelAtMessage(_ref8) {
|
|
940
|
+
var _ref8$after = _ref8.after,
|
|
941
|
+
after = _ref8$after === void 0 ? 2 : _ref8$after,
|
|
942
|
+
_ref8$before = _ref8.before,
|
|
943
|
+
before = _ref8$before === void 0 ? 30 : _ref8$before,
|
|
944
|
+
messageId = _ref8.messageId;
|
|
945
|
+
return channelQueryCallRef.current((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee6() {
|
|
946
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
947
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
948
|
+
case 0:
|
|
949
|
+
_context6.next = 2;
|
|
950
|
+
return queryAtMessage({
|
|
951
|
+
after: after,
|
|
952
|
+
before: before,
|
|
953
|
+
messageId: messageId
|
|
954
|
+
});
|
|
955
|
+
case 2:
|
|
956
|
+
if (messageId) {
|
|
957
|
+
setTargetedMessage(messageId);
|
|
958
|
+
}
|
|
959
|
+
case 3:
|
|
960
|
+
case "end":
|
|
961
|
+
return _context6.stop();
|
|
962
|
+
}
|
|
963
|
+
}, _callee6);
|
|
964
|
+
})));
|
|
965
|
+
};
|
|
958
966
|
var splitLatestCurrentMessageSetRef = (0, _react.useRef)(function () {
|
|
959
967
|
var currentLatestSet = channel.state.messageSets.find(function (set) {
|
|
960
968
|
return set.isCurrent && set.isLatest;
|
|
@@ -1009,14 +1017,14 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1009
1017
|
clearInterval(mergeSetsIntervalRef.current);
|
|
1010
1018
|
if (!hasOverlappingRecentMessagesRef.current) return;
|
|
1011
1019
|
});
|
|
1012
|
-
var loadLatestMessagesRef = (0, _react.useRef)((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function
|
|
1020
|
+
var loadLatestMessagesRef = (0, _react.useRef)((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee7() {
|
|
1013
1021
|
var clearLatest,
|
|
1014
1022
|
latestSet,
|
|
1015
|
-
|
|
1016
|
-
return _regenerator["default"].wrap(function
|
|
1017
|
-
while (1) switch (
|
|
1023
|
+
_args7 = arguments;
|
|
1024
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
1025
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
1018
1026
|
case 0:
|
|
1019
|
-
clearLatest =
|
|
1027
|
+
clearLatest = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : false;
|
|
1020
1028
|
mergeOverlappingMessageSetsRef.current();
|
|
1021
1029
|
if (clearLatest) {
|
|
1022
1030
|
latestSet = channel.state.messageSets.find(function (set) {
|
|
@@ -1025,138 +1033,138 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1025
1033
|
if (latestSet) latestSet.messages = [];
|
|
1026
1034
|
}
|
|
1027
1035
|
if (!(channel.state.latestMessages.length === 0)) {
|
|
1028
|
-
|
|
1036
|
+
_context7.next = 6;
|
|
1029
1037
|
break;
|
|
1030
1038
|
}
|
|
1031
|
-
|
|
1039
|
+
_context7.next = 6;
|
|
1032
1040
|
return channel.query({}, 'latest');
|
|
1033
1041
|
case 6:
|
|
1034
|
-
|
|
1042
|
+
_context7.next = 8;
|
|
1035
1043
|
return channel.state.loadMessageIntoState('latest');
|
|
1036
1044
|
case 8:
|
|
1037
1045
|
case "end":
|
|
1038
|
-
return
|
|
1046
|
+
return _context7.stop();
|
|
1039
1047
|
}
|
|
1040
|
-
},
|
|
1048
|
+
}, _callee7);
|
|
1041
1049
|
})));
|
|
1042
1050
|
var loadChannel = function loadChannel() {
|
|
1043
|
-
return channelQueryCallRef.current((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function
|
|
1044
|
-
return _regenerator["default"].wrap(function
|
|
1045
|
-
while (1) switch (
|
|
1051
|
+
return channelQueryCallRef.current((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee8() {
|
|
1052
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
1053
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
1046
1054
|
case 0:
|
|
1047
1055
|
if (!(!(channel != null && channel.initialized) || !channel.state.isUpToDate)) {
|
|
1048
|
-
|
|
1056
|
+
_context8.next = 5;
|
|
1049
1057
|
break;
|
|
1050
1058
|
}
|
|
1051
|
-
|
|
1059
|
+
_context8.next = 3;
|
|
1052
1060
|
return channel == null ? void 0 : channel.watch();
|
|
1053
1061
|
case 3:
|
|
1054
|
-
|
|
1062
|
+
_context8.next = 7;
|
|
1055
1063
|
break;
|
|
1056
1064
|
case 5:
|
|
1057
|
-
|
|
1065
|
+
_context8.next = 7;
|
|
1058
1066
|
return channel.state.loadMessageIntoState('latest');
|
|
1059
1067
|
case 7:
|
|
1060
1068
|
case "end":
|
|
1061
|
-
return
|
|
1069
|
+
return _context8.stop();
|
|
1062
1070
|
}
|
|
1063
|
-
},
|
|
1071
|
+
}, _callee8);
|
|
1064
1072
|
})), function () {
|
|
1065
1073
|
channel == null ? void 0 : channel.state.setIsUpToDate(true);
|
|
1066
1074
|
setHasNoMoreRecentMessagesToLoad(true);
|
|
1067
1075
|
});
|
|
1068
1076
|
};
|
|
1069
1077
|
var reloadThread = function () {
|
|
1070
|
-
var
|
|
1078
|
+
var _ref12 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee9() {
|
|
1071
1079
|
var parentID, limit, queryResponse, updatedHasMore, updatedThreadMessages, _yield$channel$getMes, _messages, _messages2, threadMessage, formattedMessage;
|
|
1072
|
-
return _regenerator["default"].wrap(function
|
|
1073
|
-
while (1) switch (
|
|
1080
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
1081
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
1074
1082
|
case 0:
|
|
1075
1083
|
if (!(!channel || !(thread != null && thread.id))) {
|
|
1076
|
-
|
|
1084
|
+
_context9.next = 2;
|
|
1077
1085
|
break;
|
|
1078
1086
|
}
|
|
1079
|
-
return
|
|
1087
|
+
return _context9.abrupt("return");
|
|
1080
1088
|
case 2:
|
|
1081
1089
|
setThreadLoadingMore(true);
|
|
1082
|
-
|
|
1090
|
+
_context9.prev = 3;
|
|
1083
1091
|
parentID = thread.id;
|
|
1084
1092
|
limit = 50;
|
|
1085
1093
|
channel.state.threads[parentID] = [];
|
|
1086
|
-
|
|
1094
|
+
_context9.next = 9;
|
|
1087
1095
|
return channel.getReplies(parentID, {
|
|
1088
1096
|
limit: limit
|
|
1089
1097
|
});
|
|
1090
1098
|
case 9:
|
|
1091
|
-
queryResponse =
|
|
1099
|
+
queryResponse = _context9.sent;
|
|
1092
1100
|
updatedHasMore = queryResponse.messages.length === limit;
|
|
1093
1101
|
updatedThreadMessages = channel.state.threads[parentID] || [];
|
|
1094
1102
|
loadMoreThreadFinished(updatedHasMore, updatedThreadMessages);
|
|
1095
|
-
|
|
1103
|
+
_context9.next = 15;
|
|
1096
1104
|
return channel.getMessagesById([parentID]);
|
|
1097
1105
|
case 15:
|
|
1098
|
-
_yield$channel$getMes =
|
|
1106
|
+
_yield$channel$getMes = _context9.sent;
|
|
1099
1107
|
_messages = _yield$channel$getMes.messages;
|
|
1100
1108
|
_messages2 = (0, _slicedToArray2["default"])(_messages, 1), threadMessage = _messages2[0];
|
|
1101
1109
|
if (threadMessage && !threadInstance) {
|
|
1102
1110
|
formattedMessage = channel.state.formatMessage(threadMessage);
|
|
1103
1111
|
setThread(formattedMessage);
|
|
1104
1112
|
}
|
|
1105
|
-
|
|
1113
|
+
_context9.next = 27;
|
|
1106
1114
|
break;
|
|
1107
1115
|
case 21:
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
console.warn('Thread loading request failed with error',
|
|
1111
|
-
if (
|
|
1112
|
-
setError(
|
|
1116
|
+
_context9.prev = 21;
|
|
1117
|
+
_context9.t0 = _context9["catch"](3);
|
|
1118
|
+
console.warn('Thread loading request failed with error', _context9.t0);
|
|
1119
|
+
if (_context9.t0 instanceof Error) {
|
|
1120
|
+
setError(_context9.t0);
|
|
1113
1121
|
} else {
|
|
1114
1122
|
setError(true);
|
|
1115
1123
|
}
|
|
1116
1124
|
setThreadLoadingMore(false);
|
|
1117
|
-
throw
|
|
1125
|
+
throw _context9.t0;
|
|
1118
1126
|
case 27:
|
|
1119
1127
|
case "end":
|
|
1120
|
-
return
|
|
1128
|
+
return _context9.stop();
|
|
1121
1129
|
}
|
|
1122
|
-
},
|
|
1130
|
+
}, _callee9, null, [[3, 21]]);
|
|
1123
1131
|
}));
|
|
1124
1132
|
return function reloadThread() {
|
|
1125
|
-
return
|
|
1133
|
+
return _ref12.apply(this, arguments);
|
|
1126
1134
|
};
|
|
1127
1135
|
}();
|
|
1128
1136
|
var resyncChannel = function () {
|
|
1129
|
-
var
|
|
1137
|
+
var _ref13 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee10() {
|
|
1130
1138
|
var _messages$, state, oldListTopMessage, oldListTopMessageId, oldListBottomMessage, newListTopMessage, newListBottomMessage, parseMessage, failedMessages, failedThreadMessages, oldListTopMessageCreatedAt, oldListBottomMessageCreatedAt, newListTopMessageCreatedAt, newListBottomMessageCreatedAt, finalMessages, index;
|
|
1131
|
-
return _regenerator["default"].wrap(function
|
|
1132
|
-
while (1) switch (
|
|
1139
|
+
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
|
1140
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1133
1141
|
case 0:
|
|
1134
1142
|
if (!(!channel || syncingChannelRef.current)) {
|
|
1135
|
-
|
|
1143
|
+
_context10.next = 2;
|
|
1136
1144
|
break;
|
|
1137
1145
|
}
|
|
1138
|
-
return
|
|
1146
|
+
return _context10.abrupt("return");
|
|
1139
1147
|
case 2:
|
|
1140
1148
|
hasOverlappingRecentMessagesRef.current = false;
|
|
1141
1149
|
clearInterval(mergeSetsIntervalRef.current);
|
|
1142
1150
|
syncingChannelRef.current = true;
|
|
1143
1151
|
setError(false);
|
|
1144
|
-
|
|
1145
|
-
|
|
1152
|
+
_context10.prev = 6;
|
|
1153
|
+
_context10.next = 9;
|
|
1146
1154
|
return channel.watch({
|
|
1147
1155
|
messages: {
|
|
1148
1156
|
limit: messages.length + 30
|
|
1149
1157
|
}
|
|
1150
1158
|
});
|
|
1151
1159
|
case 9:
|
|
1152
|
-
state =
|
|
1160
|
+
state = _context10.sent;
|
|
1153
1161
|
oldListTopMessage = messages[0];
|
|
1154
1162
|
oldListTopMessageId = (_messages$ = messages[0]) == null ? void 0 : _messages$.id;
|
|
1155
1163
|
oldListBottomMessage = messages[messages.length - 1];
|
|
1156
1164
|
newListTopMessage = state.messages[0];
|
|
1157
1165
|
newListBottomMessage = state.messages[state.messages.length - 1];
|
|
1158
1166
|
if (!(!oldListTopMessage || !oldListBottomMessage || !newListTopMessage || !newListBottomMessage)) {
|
|
1159
|
-
|
|
1167
|
+
_context10.next = 22;
|
|
1160
1168
|
break;
|
|
1161
1169
|
}
|
|
1162
1170
|
channel.state.clearMessages();
|
|
@@ -1164,7 +1172,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1164
1172
|
channel.state.addMessagesSorted(state.messages);
|
|
1165
1173
|
channel.state.addPinnedMessages(state.pinned_messages);
|
|
1166
1174
|
copyChannelState();
|
|
1167
|
-
return
|
|
1175
|
+
return _context10.abrupt("return");
|
|
1168
1176
|
case 22:
|
|
1169
1177
|
parseMessage = function parseMessage(message) {
|
|
1170
1178
|
var _message$pinned_at, _message$updated_at;
|
|
@@ -1204,20 +1212,20 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1204
1212
|
channel.state.addMessagesSorted(failedMessages);
|
|
1205
1213
|
copyChannelState();
|
|
1206
1214
|
}
|
|
1207
|
-
|
|
1215
|
+
_context10.next = 41;
|
|
1208
1216
|
return reloadThread();
|
|
1209
1217
|
case 41:
|
|
1210
1218
|
if (thread && failedThreadMessages.length) {
|
|
1211
1219
|
channel.state.addMessagesSorted(failedThreadMessages);
|
|
1212
1220
|
setThreadMessages((0, _toConsumableArray2["default"])(channel.state.threads[thread.id]));
|
|
1213
1221
|
}
|
|
1214
|
-
|
|
1222
|
+
_context10.next = 48;
|
|
1215
1223
|
break;
|
|
1216
1224
|
case 44:
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
if (
|
|
1220
|
-
setError(
|
|
1225
|
+
_context10.prev = 44;
|
|
1226
|
+
_context10.t0 = _context10["catch"](6);
|
|
1227
|
+
if (_context10.t0 instanceof Error) {
|
|
1228
|
+
setError(_context10.t0);
|
|
1221
1229
|
} else {
|
|
1222
1230
|
setError(true);
|
|
1223
1231
|
}
|
|
@@ -1226,12 +1234,12 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1226
1234
|
syncingChannelRef.current = false;
|
|
1227
1235
|
case 49:
|
|
1228
1236
|
case "end":
|
|
1229
|
-
return
|
|
1237
|
+
return _context10.stop();
|
|
1230
1238
|
}
|
|
1231
|
-
},
|
|
1239
|
+
}, _callee10, null, [[6, 44]]);
|
|
1232
1240
|
}));
|
|
1233
1241
|
return function resyncChannel() {
|
|
1234
|
-
return
|
|
1242
|
+
return _ref13.apply(this, arguments);
|
|
1235
1243
|
};
|
|
1236
1244
|
}();
|
|
1237
1245
|
var resyncChannelRef = (0, _react.useRef)(resyncChannel);
|
|
@@ -1261,12 +1269,12 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1261
1269
|
};
|
|
1262
1270
|
}, [enableOfflineSupport, shouldSyncChannel]);
|
|
1263
1271
|
var reloadChannel = function reloadChannel() {
|
|
1264
|
-
return channelQueryCallRef.current((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function
|
|
1265
|
-
return _regenerator["default"].wrap(function
|
|
1266
|
-
while (1) switch (
|
|
1272
|
+
return channelQueryCallRef.current((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee11() {
|
|
1273
|
+
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
1274
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1267
1275
|
case 0:
|
|
1268
1276
|
setLoading(true);
|
|
1269
|
-
|
|
1277
|
+
_context11.next = 3;
|
|
1270
1278
|
return loadLatestMessagesRef.current(true);
|
|
1271
1279
|
case 3:
|
|
1272
1280
|
setLoading(false);
|
|
@@ -1274,11 +1282,146 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1274
1282
|
setHasNoMoreRecentMessagesToLoad(true);
|
|
1275
1283
|
case 6:
|
|
1276
1284
|
case "end":
|
|
1277
|
-
return
|
|
1285
|
+
return _context11.stop();
|
|
1278
1286
|
}
|
|
1279
|
-
},
|
|
1287
|
+
}, _callee11);
|
|
1280
1288
|
})));
|
|
1281
1289
|
};
|
|
1290
|
+
var queryAtMessage = function () {
|
|
1291
|
+
var _ref16 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee12(_ref15) {
|
|
1292
|
+
var _ref15$after, after, _ref15$before, before, messageId;
|
|
1293
|
+
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
|
1294
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1295
|
+
case 0:
|
|
1296
|
+
_ref15$after = _ref15.after, after = _ref15$after === void 0 ? 10 : _ref15$after, _ref15$before = _ref15.before, before = _ref15$before === void 0 ? 10 : _ref15$before, messageId = _ref15.messageId;
|
|
1297
|
+
if (channel) {
|
|
1298
|
+
_context12.next = 3;
|
|
1299
|
+
break;
|
|
1300
|
+
}
|
|
1301
|
+
return _context12.abrupt("return");
|
|
1302
|
+
case 3:
|
|
1303
|
+
channel.state.setIsUpToDate(false);
|
|
1304
|
+
hasOverlappingRecentMessagesRef.current = false;
|
|
1305
|
+
clearInterval(mergeSetsIntervalRef.current);
|
|
1306
|
+
channel.state.clearMessages();
|
|
1307
|
+
setMessages([]);
|
|
1308
|
+
if (messageId) {
|
|
1309
|
+
_context12.next = 13;
|
|
1310
|
+
break;
|
|
1311
|
+
}
|
|
1312
|
+
_context12.next = 11;
|
|
1313
|
+
return channel.query({
|
|
1314
|
+
messages: {
|
|
1315
|
+
limit: before
|
|
1316
|
+
},
|
|
1317
|
+
watch: true
|
|
1318
|
+
});
|
|
1319
|
+
case 11:
|
|
1320
|
+
channel.state.setIsUpToDate(true);
|
|
1321
|
+
return _context12.abrupt("return");
|
|
1322
|
+
case 13:
|
|
1323
|
+
_context12.next = 15;
|
|
1324
|
+
return queryBeforeMessage(messageId, before);
|
|
1325
|
+
case 15:
|
|
1326
|
+
_context12.next = 17;
|
|
1327
|
+
return queryAfterMessage(messageId, after);
|
|
1328
|
+
case 17:
|
|
1329
|
+
case "end":
|
|
1330
|
+
return _context12.stop();
|
|
1331
|
+
}
|
|
1332
|
+
}, _callee12);
|
|
1333
|
+
}));
|
|
1334
|
+
return function queryAtMessage(_x3) {
|
|
1335
|
+
return _ref16.apply(this, arguments);
|
|
1336
|
+
};
|
|
1337
|
+
}();
|
|
1338
|
+
var queryBeforeMessage = function () {
|
|
1339
|
+
var _ref17 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee13(messageId) {
|
|
1340
|
+
var limit,
|
|
1341
|
+
_args13 = arguments;
|
|
1342
|
+
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
|
1343
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1344
|
+
case 0:
|
|
1345
|
+
limit = _args13.length > 1 && _args13[1] !== undefined ? _args13[1] : 5;
|
|
1346
|
+
if (channel) {
|
|
1347
|
+
_context13.next = 3;
|
|
1348
|
+
break;
|
|
1349
|
+
}
|
|
1350
|
+
return _context13.abrupt("return");
|
|
1351
|
+
case 3:
|
|
1352
|
+
_context13.next = 5;
|
|
1353
|
+
return channel.query({
|
|
1354
|
+
messages: {
|
|
1355
|
+
id_lt: messageId,
|
|
1356
|
+
limit: limit
|
|
1357
|
+
},
|
|
1358
|
+
watch: true
|
|
1359
|
+
});
|
|
1360
|
+
case 5:
|
|
1361
|
+
channel.state.setIsUpToDate(false);
|
|
1362
|
+
case 6:
|
|
1363
|
+
case "end":
|
|
1364
|
+
return _context13.stop();
|
|
1365
|
+
}
|
|
1366
|
+
}, _callee13);
|
|
1367
|
+
}));
|
|
1368
|
+
return function queryBeforeMessage(_x4) {
|
|
1369
|
+
return _ref17.apply(this, arguments);
|
|
1370
|
+
};
|
|
1371
|
+
}();
|
|
1372
|
+
var queryAfterMessage = function () {
|
|
1373
|
+
var _ref18 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee14(messageId) {
|
|
1374
|
+
var limit,
|
|
1375
|
+
state,
|
|
1376
|
+
currentSet,
|
|
1377
|
+
_args14 = arguments;
|
|
1378
|
+
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
|
1379
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1380
|
+
case 0:
|
|
1381
|
+
limit = _args14.length > 1 && _args14[1] !== undefined ? _args14[1] : 5;
|
|
1382
|
+
if (channel) {
|
|
1383
|
+
_context14.next = 3;
|
|
1384
|
+
break;
|
|
1385
|
+
}
|
|
1386
|
+
return _context14.abrupt("return");
|
|
1387
|
+
case 3:
|
|
1388
|
+
_context14.next = 5;
|
|
1389
|
+
return channel.query({
|
|
1390
|
+
messages: {
|
|
1391
|
+
id_gte: messageId,
|
|
1392
|
+
limit: limit
|
|
1393
|
+
},
|
|
1394
|
+
watch: true
|
|
1395
|
+
});
|
|
1396
|
+
case 5:
|
|
1397
|
+
state = _context14.sent;
|
|
1398
|
+
if (state.messages.length < limit) {
|
|
1399
|
+
currentSet = channel.state.messageSets.find(function (set) {
|
|
1400
|
+
return set.isCurrent;
|
|
1401
|
+
});
|
|
1402
|
+
if (currentSet && !currentSet.isLatest) {
|
|
1403
|
+
channel.state.messageSets = channel.state.messageSets.filter(function (set) {
|
|
1404
|
+
return !set.isLatest;
|
|
1405
|
+
});
|
|
1406
|
+
currentSet.isLatest = true;
|
|
1407
|
+
}
|
|
1408
|
+
channel.state.setIsUpToDate(true);
|
|
1409
|
+
setHasNoMoreRecentMessagesToLoad(true);
|
|
1410
|
+
} else {
|
|
1411
|
+
splitLatestCurrentMessageSetRef.current();
|
|
1412
|
+
channel.state.setIsUpToDate(false);
|
|
1413
|
+
setHasNoMoreRecentMessagesToLoad(false);
|
|
1414
|
+
}
|
|
1415
|
+
case 7:
|
|
1416
|
+
case "end":
|
|
1417
|
+
return _context14.stop();
|
|
1418
|
+
}
|
|
1419
|
+
}, _callee14);
|
|
1420
|
+
}));
|
|
1421
|
+
return function queryAfterMessage(_x5) {
|
|
1422
|
+
return _ref18.apply(this, arguments);
|
|
1423
|
+
};
|
|
1424
|
+
}();
|
|
1282
1425
|
var getChannelConfigSafely = function getChannelConfigSafely() {
|
|
1283
1426
|
try {
|
|
1284
1427
|
return channel == null ? void 0 : channel.getConfig();
|
|
@@ -1309,12 +1452,14 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1309
1452
|
setMessages(channel.state.messages);
|
|
1310
1453
|
}
|
|
1311
1454
|
};
|
|
1312
|
-
var createMessagePreview = function createMessagePreview(
|
|
1313
|
-
var attachments =
|
|
1314
|
-
mentioned_users =
|
|
1315
|
-
parent_id =
|
|
1316
|
-
|
|
1317
|
-
|
|
1455
|
+
var createMessagePreview = function createMessagePreview(_ref19) {
|
|
1456
|
+
var attachments = _ref19.attachments,
|
|
1457
|
+
mentioned_users = _ref19.mentioned_users,
|
|
1458
|
+
parent_id = _ref19.parent_id,
|
|
1459
|
+
poll = _ref19.poll,
|
|
1460
|
+
poll_id = _ref19.poll_id,
|
|
1461
|
+
text = _ref19.text,
|
|
1462
|
+
extraFields = (0, _objectWithoutProperties2["default"])(_ref19, _excluded);
|
|
1318
1463
|
var _client$user2 = client.user,
|
|
1319
1464
|
channel_mutes = _client$user2.channel_mutes,
|
|
1320
1465
|
devices = _client$user2.devices,
|
|
@@ -1332,6 +1477,8 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1332
1477
|
};
|
|
1333
1478
|
})) || [],
|
|
1334
1479
|
parent_id: parent_id,
|
|
1480
|
+
poll: poll,
|
|
1481
|
+
poll_id: poll_id,
|
|
1335
1482
|
reactions: [],
|
|
1336
1483
|
status: _utils.MessageStatusTypes.SENDING,
|
|
1337
1484
|
text: text,
|
|
@@ -1349,28 +1496,28 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1349
1496
|
return preview;
|
|
1350
1497
|
};
|
|
1351
1498
|
var uploadPendingAttachments = function () {
|
|
1352
|
-
var
|
|
1499
|
+
var _ref20 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee15(message) {
|
|
1353
1500
|
var _updatedMessage$attac;
|
|
1354
1501
|
var updatedMessage, i, _updatedMessage$attac2, attachment, image, file, _image$name, filename, controller, compressedUri, contentType, uploadResponse, _controller, response;
|
|
1355
|
-
return _regenerator["default"].wrap(function
|
|
1356
|
-
while (1) switch (
|
|
1502
|
+
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
|
1503
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1357
1504
|
case 0:
|
|
1358
1505
|
updatedMessage = Object.assign({}, message);
|
|
1359
1506
|
if (!((_updatedMessage$attac = updatedMessage.attachments) != null && _updatedMessage$attac.length)) {
|
|
1360
|
-
|
|
1507
|
+
_context15.next = 48;
|
|
1361
1508
|
break;
|
|
1362
1509
|
}
|
|
1363
1510
|
i = 0;
|
|
1364
1511
|
case 3:
|
|
1365
1512
|
if (!(i < ((_updatedMessage$attac2 = updatedMessage.attachments) == null ? void 0 : _updatedMessage$attac2.length))) {
|
|
1366
|
-
|
|
1513
|
+
_context15.next = 48;
|
|
1367
1514
|
break;
|
|
1368
1515
|
}
|
|
1369
1516
|
attachment = updatedMessage.attachments[i];
|
|
1370
1517
|
image = attachment.originalImage;
|
|
1371
1518
|
file = attachment.originalFile;
|
|
1372
1519
|
if (!(attachment.type === _types.FileTypes.Image && image != null && image.uri && attachment.image_url && (0, _utils.isLocalUrl)(attachment.image_url))) {
|
|
1373
|
-
|
|
1520
|
+
_context15.next = 28;
|
|
1374
1521
|
break;
|
|
1375
1522
|
}
|
|
1376
1523
|
filename = (_image$name = image.name) != null ? _image$name : (0, _utils.getFileNameFromPath)(image.uri);
|
|
@@ -1379,28 +1526,28 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1379
1526
|
controller.abort();
|
|
1380
1527
|
uploadAbortControllerRef.current["delete"](filename);
|
|
1381
1528
|
}
|
|
1382
|
-
|
|
1529
|
+
_context15.next = 13;
|
|
1383
1530
|
return (0, _compressImage.compressedImageURI)(image, compressImageQuality);
|
|
1384
1531
|
case 13:
|
|
1385
|
-
compressedUri =
|
|
1532
|
+
compressedUri = _context15.sent;
|
|
1386
1533
|
contentType = (0, _mimeTypes.lookup)(filename) || 'multipart/form-data';
|
|
1387
1534
|
if (!doImageUploadRequest) {
|
|
1388
|
-
|
|
1535
|
+
_context15.next = 21;
|
|
1389
1536
|
break;
|
|
1390
1537
|
}
|
|
1391
|
-
|
|
1538
|
+
_context15.next = 18;
|
|
1392
1539
|
return doImageUploadRequest(image, channel);
|
|
1393
1540
|
case 18:
|
|
1394
|
-
|
|
1395
|
-
|
|
1541
|
+
_context15.t0 = _context15.sent;
|
|
1542
|
+
_context15.next = 24;
|
|
1396
1543
|
break;
|
|
1397
1544
|
case 21:
|
|
1398
|
-
|
|
1545
|
+
_context15.next = 23;
|
|
1399
1546
|
return channel.sendImage(compressedUri, filename, contentType);
|
|
1400
1547
|
case 23:
|
|
1401
|
-
|
|
1548
|
+
_context15.t0 = _context15.sent;
|
|
1402
1549
|
case 24:
|
|
1403
|
-
uploadResponse =
|
|
1550
|
+
uploadResponse = _context15.t0;
|
|
1404
1551
|
attachment.image_url = uploadResponse.file;
|
|
1405
1552
|
delete attachment.originalFile;
|
|
1406
1553
|
dbApi.updateMessage({
|
|
@@ -1410,7 +1557,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1410
1557
|
});
|
|
1411
1558
|
case 28:
|
|
1412
1559
|
if (!((attachment.type === _types.FileTypes.File || attachment.type === _types.FileTypes.Audio || attachment.type === _types.FileTypes.VoiceRecording || attachment.type === _types.FileTypes.Video) && attachment.asset_url && (0, _utils.isLocalUrl)(attachment.asset_url) && file != null && file.uri)) {
|
|
1413
|
-
|
|
1560
|
+
_context15.next = 45;
|
|
1414
1561
|
break;
|
|
1415
1562
|
}
|
|
1416
1563
|
_controller = uploadAbortControllerRef.current.get(file.name);
|
|
@@ -1419,22 +1566,22 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1419
1566
|
uploadAbortControllerRef.current["delete"](file.name);
|
|
1420
1567
|
}
|
|
1421
1568
|
if (!doDocUploadRequest) {
|
|
1422
|
-
|
|
1569
|
+
_context15.next = 37;
|
|
1423
1570
|
break;
|
|
1424
1571
|
}
|
|
1425
|
-
|
|
1572
|
+
_context15.next = 34;
|
|
1426
1573
|
return doDocUploadRequest(file, channel);
|
|
1427
1574
|
case 34:
|
|
1428
|
-
|
|
1429
|
-
|
|
1575
|
+
_context15.t1 = _context15.sent;
|
|
1576
|
+
_context15.next = 40;
|
|
1430
1577
|
break;
|
|
1431
1578
|
case 37:
|
|
1432
|
-
|
|
1579
|
+
_context15.next = 39;
|
|
1433
1580
|
return channel.sendFile(file.uri, file.name, file.mimeType);
|
|
1434
1581
|
case 39:
|
|
1435
|
-
|
|
1582
|
+
_context15.t1 = _context15.sent;
|
|
1436
1583
|
case 40:
|
|
1437
|
-
response =
|
|
1584
|
+
response = _context15.t1;
|
|
1438
1585
|
attachment.asset_url = response.file;
|
|
1439
1586
|
if (response.thumb_url) {
|
|
1440
1587
|
attachment.thumb_url = response.thumb_url;
|
|
@@ -1447,38 +1594,38 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1447
1594
|
});
|
|
1448
1595
|
case 45:
|
|
1449
1596
|
i++;
|
|
1450
|
-
|
|
1597
|
+
_context15.next = 3;
|
|
1451
1598
|
break;
|
|
1452
1599
|
case 48:
|
|
1453
|
-
return
|
|
1600
|
+
return _context15.abrupt("return", updatedMessage);
|
|
1454
1601
|
case 49:
|
|
1455
1602
|
case "end":
|
|
1456
|
-
return
|
|
1603
|
+
return _context15.stop();
|
|
1457
1604
|
}
|
|
1458
|
-
},
|
|
1605
|
+
}, _callee15);
|
|
1459
1606
|
}));
|
|
1460
|
-
return function uploadPendingAttachments(
|
|
1461
|
-
return
|
|
1607
|
+
return function uploadPendingAttachments(_x6) {
|
|
1608
|
+
return _ref20.apply(this, arguments);
|
|
1462
1609
|
};
|
|
1463
1610
|
}();
|
|
1464
1611
|
var sendMessageRequest = function () {
|
|
1465
|
-
var
|
|
1612
|
+
var _ref21 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee16(message, retrying) {
|
|
1466
1613
|
var _updatedMessage, extraFields, attachments, id, mentioned_users, parent_id, text, mentionedUserIds, _messageData, messageResponse, _updatedMessage2;
|
|
1467
|
-
return _regenerator["default"].wrap(function
|
|
1468
|
-
while (1) switch (
|
|
1614
|
+
return _regenerator["default"].wrap(function _callee16$(_context16) {
|
|
1615
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
1469
1616
|
case 0:
|
|
1470
|
-
|
|
1471
|
-
|
|
1617
|
+
_context16.prev = 0;
|
|
1618
|
+
_context16.next = 3;
|
|
1472
1619
|
return uploadPendingAttachments(message);
|
|
1473
1620
|
case 3:
|
|
1474
|
-
_updatedMessage =
|
|
1621
|
+
_updatedMessage = _context16.sent;
|
|
1475
1622
|
extraFields = (0, _omit["default"])(_updatedMessage, ['__html', 'attachments', 'created_at', 'deleted_at', 'html', 'id', 'latest_reactions', 'mentioned_users', 'own_reactions', 'parent_id', 'quoted_message', 'reaction_counts', 'reaction_groups', 'reactions', 'status', 'text', 'type', 'updated_at', 'user']);
|
|
1476
1623
|
attachments = _updatedMessage.attachments, id = _updatedMessage.id, mentioned_users = _updatedMessage.mentioned_users, parent_id = _updatedMessage.parent_id, text = _updatedMessage.text;
|
|
1477
1624
|
if (channel.id) {
|
|
1478
|
-
|
|
1625
|
+
_context16.next = 8;
|
|
1479
1626
|
break;
|
|
1480
1627
|
}
|
|
1481
|
-
return
|
|
1628
|
+
return _context16.abrupt("return");
|
|
1482
1629
|
case 8:
|
|
1483
1630
|
mentionedUserIds = (mentioned_users == null ? void 0 : mentioned_users.map(function (user) {
|
|
1484
1631
|
return user.id;
|
|
@@ -1492,24 +1639,24 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1492
1639
|
}, extraFields);
|
|
1493
1640
|
messageResponse = {};
|
|
1494
1641
|
if (!doSendMessageRequest) {
|
|
1495
|
-
|
|
1642
|
+
_context16.next = 17;
|
|
1496
1643
|
break;
|
|
1497
1644
|
}
|
|
1498
|
-
|
|
1645
|
+
_context16.next = 14;
|
|
1499
1646
|
return doSendMessageRequest((channel == null ? void 0 : channel.cid) || '', _messageData);
|
|
1500
1647
|
case 14:
|
|
1501
|
-
messageResponse =
|
|
1502
|
-
|
|
1648
|
+
messageResponse = _context16.sent;
|
|
1649
|
+
_context16.next = 21;
|
|
1503
1650
|
break;
|
|
1504
1651
|
case 17:
|
|
1505
1652
|
if (!channel) {
|
|
1506
|
-
|
|
1653
|
+
_context16.next = 21;
|
|
1507
1654
|
break;
|
|
1508
1655
|
}
|
|
1509
|
-
|
|
1656
|
+
_context16.next = 20;
|
|
1510
1657
|
return channel.sendMessage(_messageData);
|
|
1511
1658
|
case 20:
|
|
1512
|
-
messageResponse =
|
|
1659
|
+
messageResponse = _context16.sent;
|
|
1513
1660
|
case 21:
|
|
1514
1661
|
if (messageResponse.message) {
|
|
1515
1662
|
messageResponse.message.status = _utils.MessageStatusTypes.RECEIVED;
|
|
@@ -1529,12 +1676,12 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1529
1676
|
message: messageResponse.message
|
|
1530
1677
|
});
|
|
1531
1678
|
}
|
|
1532
|
-
|
|
1679
|
+
_context16.next = 32;
|
|
1533
1680
|
break;
|
|
1534
1681
|
case 24:
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
console.log(
|
|
1682
|
+
_context16.prev = 24;
|
|
1683
|
+
_context16.t0 = _context16["catch"](0);
|
|
1684
|
+
console.log(_context16.t0);
|
|
1538
1685
|
message.status = _utils.MessageStatusTypes.FAILED;
|
|
1539
1686
|
_updatedMessage2 = Object.assign({}, message, {
|
|
1540
1687
|
cid: channel.cid
|
|
@@ -1552,20 +1699,20 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1552
1699
|
}
|
|
1553
1700
|
case 32:
|
|
1554
1701
|
case "end":
|
|
1555
|
-
return
|
|
1702
|
+
return _context16.stop();
|
|
1556
1703
|
}
|
|
1557
|
-
},
|
|
1704
|
+
}, _callee16, null, [[0, 24]]);
|
|
1558
1705
|
}));
|
|
1559
|
-
return function sendMessageRequest(
|
|
1560
|
-
return
|
|
1706
|
+
return function sendMessageRequest(_x7, _x8) {
|
|
1707
|
+
return _ref21.apply(this, arguments);
|
|
1561
1708
|
};
|
|
1562
1709
|
}();
|
|
1563
1710
|
var sendMessage = function () {
|
|
1564
|
-
var
|
|
1711
|
+
var _ref22 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee17(message) {
|
|
1565
1712
|
var _channel$state;
|
|
1566
1713
|
var messagePreview;
|
|
1567
|
-
return _regenerator["default"].wrap(function
|
|
1568
|
-
while (1) switch (
|
|
1714
|
+
return _regenerator["default"].wrap(function _callee17$(_context17) {
|
|
1715
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
1569
1716
|
case 0:
|
|
1570
1717
|
if (channel != null && (_channel$state = channel.state) != null && _channel$state.filterErrorMessages) {
|
|
1571
1718
|
channel.state.filterErrorMessages();
|
|
@@ -1589,23 +1736,23 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1589
1736
|
})]
|
|
1590
1737
|
});
|
|
1591
1738
|
}
|
|
1592
|
-
|
|
1739
|
+
_context17.next = 8;
|
|
1593
1740
|
return sendMessageRequest(messagePreview);
|
|
1594
1741
|
case 8:
|
|
1595
1742
|
case "end":
|
|
1596
|
-
return
|
|
1743
|
+
return _context17.stop();
|
|
1597
1744
|
}
|
|
1598
|
-
},
|
|
1745
|
+
}, _callee17);
|
|
1599
1746
|
}));
|
|
1600
|
-
return function sendMessage(
|
|
1601
|
-
return
|
|
1747
|
+
return function sendMessage(_x9) {
|
|
1748
|
+
return _ref22.apply(this, arguments);
|
|
1602
1749
|
};
|
|
1603
1750
|
}();
|
|
1604
1751
|
var retrySendMessage = function () {
|
|
1605
|
-
var
|
|
1752
|
+
var _ref23 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee18(message) {
|
|
1606
1753
|
var statusPendingMessage, messageWithoutReservedFields;
|
|
1607
|
-
return _regenerator["default"].wrap(function
|
|
1608
|
-
while (1) switch (
|
|
1754
|
+
return _regenerator["default"].wrap(function _callee18$(_context18) {
|
|
1755
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1609
1756
|
case 0:
|
|
1610
1757
|
statusPendingMessage = Object.assign({}, message, {
|
|
1611
1758
|
status: _utils.MessageStatusTypes.SENDING
|
|
@@ -1614,16 +1761,16 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1614
1761
|
if (!(0, _utils.isBouncedMessage)(message)) {
|
|
1615
1762
|
updateMessage(messageWithoutReservedFields);
|
|
1616
1763
|
}
|
|
1617
|
-
|
|
1764
|
+
_context18.next = 5;
|
|
1618
1765
|
return sendMessageRequest(messageWithoutReservedFields, true);
|
|
1619
1766
|
case 5:
|
|
1620
1767
|
case "end":
|
|
1621
|
-
return
|
|
1768
|
+
return _context18.stop();
|
|
1622
1769
|
}
|
|
1623
|
-
},
|
|
1770
|
+
}, _callee18);
|
|
1624
1771
|
}));
|
|
1625
|
-
return function retrySendMessage(
|
|
1626
|
-
return
|
|
1772
|
+
return function retrySendMessage(_x10) {
|
|
1773
|
+
return _ref23.apply(this, arguments);
|
|
1627
1774
|
};
|
|
1628
1775
|
}();
|
|
1629
1776
|
var loadMoreFinished = (0, _react.useRef)((0, _debounce["default"])(function (updatedHasMore, newMessages) {
|
|
@@ -1633,46 +1780,46 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1633
1780
|
setHasMore(updatedHasMore);
|
|
1634
1781
|
setMessages(newMessages);
|
|
1635
1782
|
}, defaultDebounceInterval, debounceOptions)).current;
|
|
1636
|
-
var loadMore = (0, _react.useCallback)((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function
|
|
1783
|
+
var loadMore = (0, _react.useCallback)((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee19() {
|
|
1637
1784
|
var limit,
|
|
1638
1785
|
currentMessages,
|
|
1639
1786
|
oldestMessage,
|
|
1640
1787
|
oldestID,
|
|
1641
1788
|
queryResponse,
|
|
1642
1789
|
updatedHasMore,
|
|
1643
|
-
|
|
1644
|
-
return _regenerator["default"].wrap(function
|
|
1645
|
-
while (1) switch (
|
|
1790
|
+
_args19 = arguments;
|
|
1791
|
+
return _regenerator["default"].wrap(function _callee19$(_context19) {
|
|
1792
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
1646
1793
|
case 0:
|
|
1647
|
-
limit =
|
|
1794
|
+
limit = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : 20;
|
|
1648
1795
|
if (!(loadingMore || hasMore === false)) {
|
|
1649
|
-
|
|
1796
|
+
_context19.next = 3;
|
|
1650
1797
|
break;
|
|
1651
1798
|
}
|
|
1652
|
-
return
|
|
1799
|
+
return _context19.abrupt("return");
|
|
1653
1800
|
case 3:
|
|
1654
1801
|
currentMessages = channel.state.messages;
|
|
1655
1802
|
if (currentMessages.length) {
|
|
1656
|
-
|
|
1803
|
+
_context19.next = 6;
|
|
1657
1804
|
break;
|
|
1658
1805
|
}
|
|
1659
|
-
return
|
|
1806
|
+
return _context19.abrupt("return", setLoadingMore(false));
|
|
1660
1807
|
case 6:
|
|
1661
1808
|
oldestMessage = currentMessages && currentMessages[0];
|
|
1662
1809
|
if (!(oldestMessage && oldestMessage.status !== _utils.MessageStatusTypes.RECEIVED)) {
|
|
1663
|
-
|
|
1810
|
+
_context19.next = 9;
|
|
1664
1811
|
break;
|
|
1665
1812
|
}
|
|
1666
|
-
return
|
|
1813
|
+
return _context19.abrupt("return", setLoadingMore(false));
|
|
1667
1814
|
case 9:
|
|
1668
1815
|
setLoadingMore(true);
|
|
1669
1816
|
oldestID = oldestMessage && oldestMessage.id;
|
|
1670
|
-
|
|
1817
|
+
_context19.prev = 11;
|
|
1671
1818
|
if (!channel) {
|
|
1672
|
-
|
|
1819
|
+
_context19.next = 18;
|
|
1673
1820
|
break;
|
|
1674
1821
|
}
|
|
1675
|
-
|
|
1822
|
+
_context19.next = 15;
|
|
1676
1823
|
return channel.query({
|
|
1677
1824
|
messages: {
|
|
1678
1825
|
id_lt: oldestID,
|
|
@@ -1680,29 +1827,29 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1680
1827
|
}
|
|
1681
1828
|
});
|
|
1682
1829
|
case 15:
|
|
1683
|
-
queryResponse =
|
|
1830
|
+
queryResponse = _context19.sent;
|
|
1684
1831
|
updatedHasMore = queryResponse.messages.length === limit;
|
|
1685
1832
|
loadMoreFinished(updatedHasMore, channel.state.messages);
|
|
1686
1833
|
case 18:
|
|
1687
|
-
|
|
1834
|
+
_context19.next = 25;
|
|
1688
1835
|
break;
|
|
1689
1836
|
case 20:
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
if (
|
|
1693
|
-
setError(
|
|
1837
|
+
_context19.prev = 20;
|
|
1838
|
+
_context19.t0 = _context19["catch"](11);
|
|
1839
|
+
if (_context19.t0 instanceof Error) {
|
|
1840
|
+
setError(_context19.t0);
|
|
1694
1841
|
} else {
|
|
1695
1842
|
setError(true);
|
|
1696
1843
|
}
|
|
1697
1844
|
setLoadingMore(false);
|
|
1698
|
-
throw
|
|
1845
|
+
throw _context19.t0;
|
|
1699
1846
|
case 25:
|
|
1700
1847
|
case "end":
|
|
1701
|
-
return
|
|
1848
|
+
return _context19.stop();
|
|
1702
1849
|
}
|
|
1703
|
-
},
|
|
1850
|
+
}, _callee19, null, [[11, 20]]);
|
|
1704
1851
|
})), [channelId, hasMore, loadingMore]);
|
|
1705
|
-
var loadMoreRecent = (0, _react.useCallback)((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function
|
|
1852
|
+
var loadMoreRecent = (0, _react.useCallback)((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee20() {
|
|
1706
1853
|
var limit,
|
|
1707
1854
|
latestMessageSet,
|
|
1708
1855
|
latestLengthBeforeMerge,
|
|
@@ -1712,22 +1859,22 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1712
1859
|
queryResponse,
|
|
1713
1860
|
gotAllRecentMessages,
|
|
1714
1861
|
currentSet,
|
|
1715
|
-
|
|
1716
|
-
return _regenerator["default"].wrap(function
|
|
1717
|
-
while (1) switch (
|
|
1862
|
+
_args20 = arguments;
|
|
1863
|
+
return _regenerator["default"].wrap(function _callee20$(_context20) {
|
|
1864
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
1718
1865
|
case 0:
|
|
1719
|
-
limit =
|
|
1866
|
+
limit = _args20.length > 0 && _args20[0] !== undefined ? _args20[0] : 5;
|
|
1720
1867
|
latestMessageSet = channel.state.messageSets.find(function (set) {
|
|
1721
1868
|
return set.isLatest;
|
|
1722
1869
|
});
|
|
1723
1870
|
latestLengthBeforeMerge = (latestMessageSet == null ? void 0 : latestMessageSet.messages.length) || 0;
|
|
1724
1871
|
didMerge = mergeOverlappingMessageSetsRef.current(true);
|
|
1725
1872
|
if (!didMerge) {
|
|
1726
|
-
|
|
1873
|
+
_context20.next = 12;
|
|
1727
1874
|
break;
|
|
1728
1875
|
}
|
|
1729
1876
|
if (!(latestMessageSet && latestLengthBeforeMerge >= limit)) {
|
|
1730
|
-
|
|
1877
|
+
_context20.next = 12;
|
|
1731
1878
|
break;
|
|
1732
1879
|
}
|
|
1733
1880
|
setLoadingMoreRecent(true);
|
|
@@ -1735,31 +1882,31 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1735
1882
|
setHasNoMoreRecentMessagesToLoad(true);
|
|
1736
1883
|
loadMoreRecentFinished(channel.state.messages);
|
|
1737
1884
|
restartSetsMergeFuncRef.current();
|
|
1738
|
-
return
|
|
1885
|
+
return _context20.abrupt("return");
|
|
1739
1886
|
case 12:
|
|
1740
1887
|
if (!channel.state.isUpToDate) {
|
|
1741
|
-
|
|
1888
|
+
_context20.next = 15;
|
|
1742
1889
|
break;
|
|
1743
1890
|
}
|
|
1744
1891
|
setLoadingMoreRecent(false);
|
|
1745
|
-
return
|
|
1892
|
+
return _context20.abrupt("return");
|
|
1746
1893
|
case 15:
|
|
1747
1894
|
currentMessages = channel.state.messages;
|
|
1748
1895
|
recentMessage = currentMessages[currentMessages.length - 1];
|
|
1749
1896
|
if (!((recentMessage == null ? void 0 : recentMessage.status) !== _utils.MessageStatusTypes.RECEIVED)) {
|
|
1750
|
-
|
|
1897
|
+
_context20.next = 20;
|
|
1751
1898
|
break;
|
|
1752
1899
|
}
|
|
1753
1900
|
setLoadingMoreRecent(false);
|
|
1754
|
-
return
|
|
1901
|
+
return _context20.abrupt("return");
|
|
1755
1902
|
case 20:
|
|
1756
1903
|
setLoadingMoreRecent(true);
|
|
1757
|
-
|
|
1904
|
+
_context20.prev = 21;
|
|
1758
1905
|
if (!channel) {
|
|
1759
|
-
|
|
1906
|
+
_context20.next = 32;
|
|
1760
1907
|
break;
|
|
1761
1908
|
}
|
|
1762
|
-
|
|
1909
|
+
_context20.next = 25;
|
|
1763
1910
|
return channel.query({
|
|
1764
1911
|
messages: {
|
|
1765
1912
|
id_gte: recentMessage.id,
|
|
@@ -1768,7 +1915,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1768
1915
|
watch: true
|
|
1769
1916
|
});
|
|
1770
1917
|
case 25:
|
|
1771
|
-
queryResponse =
|
|
1918
|
+
queryResponse = _context20.sent;
|
|
1772
1919
|
gotAllRecentMessages = queryResponse.messages.length < limit;
|
|
1773
1920
|
currentSet = channel.state.messageSets.find(function (set) {
|
|
1774
1921
|
return set.isCurrent;
|
|
@@ -1783,24 +1930,24 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1783
1930
|
setHasNoMoreRecentMessagesToLoad(gotAllRecentMessages);
|
|
1784
1931
|
loadMoreRecentFinished(channel.state.messages);
|
|
1785
1932
|
case 32:
|
|
1786
|
-
|
|
1933
|
+
_context20.next = 40;
|
|
1787
1934
|
break;
|
|
1788
1935
|
case 34:
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
console.warn('Message pagination request failed with error',
|
|
1792
|
-
if (
|
|
1793
|
-
setError(
|
|
1936
|
+
_context20.prev = 34;
|
|
1937
|
+
_context20.t0 = _context20["catch"](21);
|
|
1938
|
+
console.warn('Message pagination request failed with error', _context20.t0);
|
|
1939
|
+
if (_context20.t0 instanceof Error) {
|
|
1940
|
+
setError(_context20.t0);
|
|
1794
1941
|
} else {
|
|
1795
1942
|
setError(true);
|
|
1796
1943
|
}
|
|
1797
1944
|
setLoadingMoreRecent(false);
|
|
1798
|
-
throw
|
|
1945
|
+
throw _context20.t0;
|
|
1799
1946
|
case 40:
|
|
1800
1947
|
case "end":
|
|
1801
|
-
return
|
|
1948
|
+
return _context20.stop();
|
|
1802
1949
|
}
|
|
1803
|
-
},
|
|
1950
|
+
}, _callee20, null, [[21, 34]]);
|
|
1804
1951
|
})), [channelId, hasNoMoreRecentMessagesToLoad]);
|
|
1805
1952
|
var loadMoreRecentFinished = (0, _react.useRef)((0, _debounce["default"])(function (newMessages) {
|
|
1806
1953
|
setLoadingMoreRecent(false);
|
|
@@ -1821,7 +1968,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1821
1968
|
return setEditing(undefined);
|
|
1822
1969
|
};
|
|
1823
1970
|
var clearQuotedMessageState = function clearQuotedMessageState() {
|
|
1824
|
-
return setQuotedMessage(
|
|
1971
|
+
return setQuotedMessage(false);
|
|
1825
1972
|
};
|
|
1826
1973
|
var removeMessage = function removeMessage(message) {
|
|
1827
1974
|
if (channel) {
|
|
@@ -1838,13 +1985,13 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1838
1985
|
}
|
|
1839
1986
|
};
|
|
1840
1987
|
var sendReaction = function () {
|
|
1841
|
-
var
|
|
1988
|
+
var _ref26 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee21(type, messageId) {
|
|
1842
1989
|
var payload, sendReactionResponse;
|
|
1843
|
-
return _regenerator["default"].wrap(function
|
|
1844
|
-
while (1) switch (
|
|
1990
|
+
return _regenerator["default"].wrap(function _callee21$(_context21) {
|
|
1991
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
1845
1992
|
case 0:
|
|
1846
1993
|
if (!(!(channel != null && channel.id) || !client.user)) {
|
|
1847
|
-
|
|
1994
|
+
_context21.next = 2;
|
|
1848
1995
|
break;
|
|
1849
1996
|
}
|
|
1850
1997
|
throw new Error('Channel has not been initialized');
|
|
@@ -1855,13 +2002,13 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1855
2002
|
enforce_unique: enforceUniqueReaction
|
|
1856
2003
|
}];
|
|
1857
2004
|
if (enableOfflineSupport) {
|
|
1858
|
-
|
|
2005
|
+
_context21.next = 7;
|
|
1859
2006
|
break;
|
|
1860
2007
|
}
|
|
1861
|
-
|
|
2008
|
+
_context21.next = 6;
|
|
1862
2009
|
return channel.sendReaction.apply(channel, payload);
|
|
1863
2010
|
case 6:
|
|
1864
|
-
return
|
|
2011
|
+
return _context21.abrupt("return");
|
|
1865
2012
|
case 7:
|
|
1866
2013
|
(0, _addReactionToLocalState.addReactionToLocalState)({
|
|
1867
2014
|
channel: channel,
|
|
@@ -1871,7 +2018,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1871
2018
|
user: client.user
|
|
1872
2019
|
});
|
|
1873
2020
|
setMessages(channel.state.messages);
|
|
1874
|
-
|
|
2021
|
+
_context21.next = 11;
|
|
1875
2022
|
return _DBSyncManager.DBSyncManager.queueTask({
|
|
1876
2023
|
client: client,
|
|
1877
2024
|
task: {
|
|
@@ -1883,7 +2030,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1883
2030
|
}
|
|
1884
2031
|
});
|
|
1885
2032
|
case 11:
|
|
1886
|
-
sendReactionResponse =
|
|
2033
|
+
sendReactionResponse = _context21.sent;
|
|
1887
2034
|
if (sendReactionResponse != null && sendReactionResponse.message) {
|
|
1888
2035
|
threadInstance == null ? void 0 : threadInstance.upsertReplyLocally == null ? void 0 : threadInstance.upsertReplyLocally({
|
|
1889
2036
|
message: sendReactionResponse.message
|
|
@@ -1891,51 +2038,51 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1891
2038
|
}
|
|
1892
2039
|
case 13:
|
|
1893
2040
|
case "end":
|
|
1894
|
-
return
|
|
2041
|
+
return _context21.stop();
|
|
1895
2042
|
}
|
|
1896
|
-
},
|
|
2043
|
+
}, _callee21);
|
|
1897
2044
|
}));
|
|
1898
|
-
return function sendReaction(
|
|
1899
|
-
return
|
|
2045
|
+
return function sendReaction(_x11, _x12) {
|
|
2046
|
+
return _ref26.apply(this, arguments);
|
|
1900
2047
|
};
|
|
1901
2048
|
}();
|
|
1902
2049
|
var deleteMessage = function () {
|
|
1903
|
-
var
|
|
2050
|
+
var _ref27 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee22(message) {
|
|
1904
2051
|
var _updatedMessage3, _data;
|
|
1905
|
-
return _regenerator["default"].wrap(function
|
|
1906
|
-
while (1) switch (
|
|
2052
|
+
return _regenerator["default"].wrap(function _callee22$(_context22) {
|
|
2053
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
1907
2054
|
case 0:
|
|
1908
2055
|
if (channel.id) {
|
|
1909
|
-
|
|
2056
|
+
_context22.next = 2;
|
|
1910
2057
|
break;
|
|
1911
2058
|
}
|
|
1912
2059
|
throw new Error('Channel has not been initialized yet');
|
|
1913
2060
|
case 2:
|
|
1914
2061
|
if (enableOfflineSupport) {
|
|
1915
|
-
|
|
2062
|
+
_context22.next = 9;
|
|
1916
2063
|
break;
|
|
1917
2064
|
}
|
|
1918
2065
|
if (!(message.status === _utils.MessageStatusTypes.FAILED)) {
|
|
1919
|
-
|
|
2066
|
+
_context22.next = 6;
|
|
1920
2067
|
break;
|
|
1921
2068
|
}
|
|
1922
2069
|
removeMessage(message);
|
|
1923
|
-
return
|
|
2070
|
+
return _context22.abrupt("return");
|
|
1924
2071
|
case 6:
|
|
1925
|
-
|
|
2072
|
+
_context22.next = 8;
|
|
1926
2073
|
return client.deleteMessage(message.id);
|
|
1927
2074
|
case 8:
|
|
1928
|
-
return
|
|
2075
|
+
return _context22.abrupt("return");
|
|
1929
2076
|
case 9:
|
|
1930
2077
|
if (!(message.status === _utils.MessageStatusTypes.FAILED)) {
|
|
1931
|
-
|
|
2078
|
+
_context22.next = 14;
|
|
1932
2079
|
break;
|
|
1933
2080
|
}
|
|
1934
2081
|
_DBSyncManager.DBSyncManager.dropPendingTasks({
|
|
1935
2082
|
messageId: message.id
|
|
1936
2083
|
});
|
|
1937
2084
|
removeMessage(message);
|
|
1938
|
-
|
|
2085
|
+
_context22.next = 21;
|
|
1939
2086
|
break;
|
|
1940
2087
|
case 14:
|
|
1941
2088
|
_updatedMessage3 = Object.assign({}, message, {
|
|
@@ -1947,7 +2094,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1947
2094
|
threadInstance == null ? void 0 : threadInstance.upsertReplyLocally({
|
|
1948
2095
|
message: _updatedMessage3
|
|
1949
2096
|
});
|
|
1950
|
-
|
|
2097
|
+
_context22.next = 19;
|
|
1951
2098
|
return _DBSyncManager.DBSyncManager.queueTask({
|
|
1952
2099
|
client: client,
|
|
1953
2100
|
task: {
|
|
@@ -1959,41 +2106,41 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
1959
2106
|
}
|
|
1960
2107
|
});
|
|
1961
2108
|
case 19:
|
|
1962
|
-
_data =
|
|
2109
|
+
_data = _context22.sent;
|
|
1963
2110
|
if (_data != null && _data.message) {
|
|
1964
2111
|
updateMessage(Object.assign({}, _data.message));
|
|
1965
2112
|
}
|
|
1966
2113
|
case 21:
|
|
1967
2114
|
case "end":
|
|
1968
|
-
return
|
|
2115
|
+
return _context22.stop();
|
|
1969
2116
|
}
|
|
1970
|
-
},
|
|
2117
|
+
}, _callee22);
|
|
1971
2118
|
}));
|
|
1972
|
-
return function deleteMessage(
|
|
1973
|
-
return
|
|
2119
|
+
return function deleteMessage(_x13) {
|
|
2120
|
+
return _ref27.apply(this, arguments);
|
|
1974
2121
|
};
|
|
1975
2122
|
}();
|
|
1976
2123
|
var deleteReaction = function () {
|
|
1977
|
-
var
|
|
2124
|
+
var _ref28 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee23(type, messageId) {
|
|
1978
2125
|
var payload;
|
|
1979
|
-
return _regenerator["default"].wrap(function
|
|
1980
|
-
while (1) switch (
|
|
2126
|
+
return _regenerator["default"].wrap(function _callee23$(_context23) {
|
|
2127
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
1981
2128
|
case 0:
|
|
1982
2129
|
if (!(!(channel != null && channel.id) || !client.user)) {
|
|
1983
|
-
|
|
2130
|
+
_context23.next = 2;
|
|
1984
2131
|
break;
|
|
1985
2132
|
}
|
|
1986
2133
|
throw new Error('Channel has not been initialized');
|
|
1987
2134
|
case 2:
|
|
1988
2135
|
payload = [messageId, type];
|
|
1989
2136
|
if (enableOfflineSupport) {
|
|
1990
|
-
|
|
2137
|
+
_context23.next = 7;
|
|
1991
2138
|
break;
|
|
1992
2139
|
}
|
|
1993
|
-
|
|
2140
|
+
_context23.next = 6;
|
|
1994
2141
|
return channel.deleteReaction.apply(channel, payload);
|
|
1995
2142
|
case 6:
|
|
1996
|
-
return
|
|
2143
|
+
return _context23.abrupt("return");
|
|
1997
2144
|
case 7:
|
|
1998
2145
|
(0, _removeReactionFromLocalState.removeReactionFromLocalState)({
|
|
1999
2146
|
channel: channel,
|
|
@@ -2002,7 +2149,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2002
2149
|
user: client.user
|
|
2003
2150
|
});
|
|
2004
2151
|
setMessages(channel.state.messages);
|
|
2005
|
-
|
|
2152
|
+
_context23.next = 11;
|
|
2006
2153
|
return _DBSyncManager.DBSyncManager.queueTask({
|
|
2007
2154
|
client: client,
|
|
2008
2155
|
task: {
|
|
@@ -2015,12 +2162,12 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2015
2162
|
});
|
|
2016
2163
|
case 11:
|
|
2017
2164
|
case "end":
|
|
2018
|
-
return
|
|
2165
|
+
return _context23.stop();
|
|
2019
2166
|
}
|
|
2020
|
-
},
|
|
2167
|
+
}, _callee23);
|
|
2021
2168
|
}));
|
|
2022
|
-
return function deleteReaction(
|
|
2023
|
-
return
|
|
2169
|
+
return function deleteReaction(_x14, _x15) {
|
|
2170
|
+
return _ref28.apply(this, arguments);
|
|
2024
2171
|
};
|
|
2025
2172
|
}();
|
|
2026
2173
|
var openThread = (0, _react.useCallback)(function (message) {
|
|
@@ -2041,59 +2188,59 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2041
2188
|
setThreadMessages(updatedThreadMessages);
|
|
2042
2189
|
}, defaultDebounceInterval, debounceOptions)).current;
|
|
2043
2190
|
var loadMoreThread = function () {
|
|
2044
|
-
var
|
|
2191
|
+
var _ref29 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee24() {
|
|
2045
2192
|
var _threadMessages$, parentID, oldestMessageID, limit, queryResponse, updatedHasMore, updatedThreadMessages;
|
|
2046
|
-
return _regenerator["default"].wrap(function
|
|
2047
|
-
while (1) switch (
|
|
2193
|
+
return _regenerator["default"].wrap(function _callee24$(_context24) {
|
|
2194
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
2048
2195
|
case 0:
|
|
2049
2196
|
if (!(threadLoadingMore || !(thread != null && thread.id))) {
|
|
2050
|
-
|
|
2197
|
+
_context24.next = 2;
|
|
2051
2198
|
break;
|
|
2052
2199
|
}
|
|
2053
|
-
return
|
|
2200
|
+
return _context24.abrupt("return");
|
|
2054
2201
|
case 2:
|
|
2055
2202
|
setThreadLoadingMore(true);
|
|
2056
|
-
|
|
2203
|
+
_context24.prev = 3;
|
|
2057
2204
|
if (!channel) {
|
|
2058
|
-
|
|
2205
|
+
_context24.next = 15;
|
|
2059
2206
|
break;
|
|
2060
2207
|
}
|
|
2061
2208
|
parentID = thread.id;
|
|
2062
2209
|
channel.state.threads[parentID] = threadMessages;
|
|
2063
2210
|
oldestMessageID = threadMessages == null ? void 0 : (_threadMessages$ = threadMessages[0]) == null ? void 0 : _threadMessages$.id;
|
|
2064
2211
|
limit = 50;
|
|
2065
|
-
|
|
2212
|
+
_context24.next = 11;
|
|
2066
2213
|
return channel.getReplies(parentID, {
|
|
2067
2214
|
id_lt: oldestMessageID,
|
|
2068
2215
|
limit: limit
|
|
2069
2216
|
});
|
|
2070
2217
|
case 11:
|
|
2071
|
-
queryResponse =
|
|
2218
|
+
queryResponse = _context24.sent;
|
|
2072
2219
|
updatedHasMore = queryResponse.messages.length === limit;
|
|
2073
2220
|
updatedThreadMessages = channel.state.threads[parentID] || [];
|
|
2074
2221
|
loadMoreThreadFinished(updatedHasMore, updatedThreadMessages);
|
|
2075
2222
|
case 15:
|
|
2076
|
-
|
|
2223
|
+
_context24.next = 23;
|
|
2077
2224
|
break;
|
|
2078
2225
|
case 17:
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
console.warn('Message pagination request failed with error',
|
|
2082
|
-
if (
|
|
2083
|
-
setError(
|
|
2226
|
+
_context24.prev = 17;
|
|
2227
|
+
_context24.t0 = _context24["catch"](3);
|
|
2228
|
+
console.warn('Message pagination request failed with error', _context24.t0);
|
|
2229
|
+
if (_context24.t0 instanceof Error) {
|
|
2230
|
+
setError(_context24.t0);
|
|
2084
2231
|
} else {
|
|
2085
2232
|
setError(true);
|
|
2086
2233
|
}
|
|
2087
2234
|
setThreadLoadingMore(false);
|
|
2088
|
-
throw
|
|
2235
|
+
throw _context24.t0;
|
|
2089
2236
|
case 23:
|
|
2090
2237
|
case "end":
|
|
2091
|
-
return
|
|
2238
|
+
return _context24.stop();
|
|
2092
2239
|
}
|
|
2093
|
-
},
|
|
2240
|
+
}, _callee24, null, [[3, 17]]);
|
|
2094
2241
|
}));
|
|
2095
2242
|
return function loadMoreThread() {
|
|
2096
|
-
return
|
|
2243
|
+
return _ref29.apply(this, arguments);
|
|
2097
2244
|
};
|
|
2098
2245
|
}();
|
|
2099
2246
|
var disabledValue = (0, _react.useMemo)(function () {
|
|
@@ -2111,7 +2258,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2111
2258
|
enableMessageGroupingByUser: enableMessageGroupingByUser,
|
|
2112
2259
|
enforceUniqueReaction: enforceUniqueReaction,
|
|
2113
2260
|
error: error,
|
|
2114
|
-
giphyEnabled: giphyEnabled != null ? giphyEnabled : !!((
|
|
2261
|
+
giphyEnabled: giphyEnabled != null ? giphyEnabled : !!((_ref30 = (clientChannelConfig == null ? void 0 : clientChannelConfig.commands) || []) != null && _ref30.some(function (command) {
|
|
2115
2262
|
return command.name === 'giphy';
|
|
2116
2263
|
})),
|
|
2117
2264
|
hideDateSeparators: hideDateSeparators,
|
|
@@ -2122,6 +2269,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2122
2269
|
isOwner: isOwner,
|
|
2123
2270
|
lastRead: lastRead,
|
|
2124
2271
|
loadChannelAroundMessage: loadChannelAroundMessage,
|
|
2272
|
+
loadChannelAtMessage: loadChannelAtMessage,
|
|
2125
2273
|
loading: loading,
|
|
2126
2274
|
LoadingIndicator: LoadingIndicator,
|
|
2127
2275
|
markRead: markRead,
|
|
@@ -2164,6 +2312,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2164
2312
|
CommandsButton: CommandsButton,
|
|
2165
2313
|
compressImageQuality: compressImageQuality,
|
|
2166
2314
|
CooldownTimer: CooldownTimer,
|
|
2315
|
+
CreatePollContent: CreatePollContent,
|
|
2167
2316
|
doDocUploadRequest: doDocUploadRequest,
|
|
2168
2317
|
doImageUploadRequest: doImageUploadRequest,
|
|
2169
2318
|
editing: editing,
|
|
@@ -2182,13 +2331,14 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2182
2331
|
InputEditingStateHeader: InputEditingStateHeader,
|
|
2183
2332
|
InputGiphySearch: InputGiphySearch,
|
|
2184
2333
|
InputReplyStateHeader: InputReplyStateHeader,
|
|
2185
|
-
maxMessageLength: (
|
|
2334
|
+
maxMessageLength: (_ref31 = maxMessageLengthProp != null ? maxMessageLengthProp : clientChannelConfig == null ? void 0 : clientChannelConfig.max_message_length) != null ? _ref31 : undefined,
|
|
2186
2335
|
maxNumberOfFiles: maxNumberOfFiles,
|
|
2187
2336
|
mentionAllAppUsersEnabled: mentionAllAppUsersEnabled,
|
|
2188
2337
|
mentionAllAppUsersQuery: mentionAllAppUsersQuery,
|
|
2189
2338
|
MoreOptionsButton: MoreOptionsButton,
|
|
2190
2339
|
numberOfLines: numberOfLines,
|
|
2191
2340
|
onChangeText: onChangeText,
|
|
2341
|
+
openPollCreationDialog: openPollCreationDialog,
|
|
2192
2342
|
quotedMessage: quotedMessage,
|
|
2193
2343
|
SendButton: SendButton,
|
|
2194
2344
|
sendImageAsync: sendImageAsync,
|
|
@@ -2215,7 +2365,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2215
2365
|
setLoadingMoreRecent: setLoadingMoreRecent
|
|
2216
2366
|
});
|
|
2217
2367
|
var messagesContext = (0, _useCreateMessagesContext.useCreateMessagesContext)({
|
|
2218
|
-
|
|
2368
|
+
additionalTouchableProps: additionalTouchableProps,
|
|
2219
2369
|
Attachment: Attachment,
|
|
2220
2370
|
AttachmentActions: AttachmentActions,
|
|
2221
2371
|
AudioAttachment: AudioAttachment,
|
|
@@ -2241,6 +2391,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2241
2391
|
Giphy: Giphy,
|
|
2242
2392
|
giphyVersion: giphyVersion,
|
|
2243
2393
|
handleBan: handleBan,
|
|
2394
|
+
handleBlock: handleBlock,
|
|
2244
2395
|
handleCopy: handleCopy,
|
|
2245
2396
|
handleDelete: handleDelete,
|
|
2246
2397
|
handleEdit: handleEdit,
|
|
@@ -2251,6 +2402,7 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2251
2402
|
handleReaction: handleReaction,
|
|
2252
2403
|
handleRetry: handleRetry,
|
|
2253
2404
|
handleThreadReply: handleThreadReply,
|
|
2405
|
+
hasCreatePoll: hasCreatePoll === undefined ? pollCreationEnabled : hasCreatePoll && pollCreationEnabled,
|
|
2254
2406
|
ImageLoadingFailedIndicator: ImageLoadingFailedIndicator,
|
|
2255
2407
|
ImageLoadingIndicator: ImageLoadingIndicator,
|
|
2256
2408
|
initialScrollToFirstUnreadMessage: !messageId && initialScrollToFirstUnreadMessage,
|
|
@@ -2260,8 +2412,6 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2260
2412
|
legacyImageViewerSwipeBehaviour: legacyImageViewerSwipeBehaviour,
|
|
2261
2413
|
markdownRules: markdownRules,
|
|
2262
2414
|
Message: Message,
|
|
2263
|
-
MessageActionList: MessageActionList,
|
|
2264
|
-
MessageActionListItem: MessageActionListItem,
|
|
2265
2415
|
messageActions: messageActions,
|
|
2266
2416
|
MessageAvatar: MessageAvatar,
|
|
2267
2417
|
MessageBounce: MessageBounce,
|
|
@@ -2273,27 +2423,21 @@ var ChannelWithContext = function ChannelWithContext(props) {
|
|
|
2273
2423
|
MessageFooter: MessageFooter,
|
|
2274
2424
|
MessageHeader: MessageHeader,
|
|
2275
2425
|
MessageList: MessageList,
|
|
2276
|
-
MessageMenu: MessageMenu,
|
|
2277
2426
|
MessagePinnedHeader: MessagePinnedHeader,
|
|
2278
|
-
MessageReactionPicker: MessageReactionPicker,
|
|
2279
2427
|
MessageReplies: MessageReplies,
|
|
2280
2428
|
MessageRepliesAvatars: MessageRepliesAvatars,
|
|
2281
2429
|
MessageSimple: MessageSimple,
|
|
2282
2430
|
MessageStatus: MessageStatus,
|
|
2283
2431
|
MessageSystem: MessageSystem,
|
|
2284
2432
|
MessageText: MessageText,
|
|
2285
|
-
messageTextNumberOfLines: messageTextNumberOfLines,
|
|
2286
2433
|
MessageTimestamp: MessageTimestamp,
|
|
2287
|
-
MessageUserReactions: MessageUserReactions,
|
|
2288
|
-
MessageUserReactionsAvatar: MessageUserReactionsAvatar,
|
|
2289
|
-
MessageUserReactionsItem: MessageUserReactionsItem,
|
|
2290
2434
|
myMessageTheme: myMessageTheme,
|
|
2291
2435
|
onLongPressMessage: onLongPressMessage,
|
|
2292
2436
|
onPressInMessage: onPressInMessage,
|
|
2293
2437
|
onPressMessage: onPressMessage,
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2438
|
+
OverlayReactionList: OverlayReactionList,
|
|
2439
|
+
PollContent: PollContent,
|
|
2440
|
+
ReactionList: ReactionList,
|
|
2297
2441
|
removeMessage: removeMessage,
|
|
2298
2442
|
Reply: Reply,
|
|
2299
2443
|
retrySendMessage: retrySendMessage,
|