@ethora/chat-component-rn 26.9.1 → 26.10.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/CHANGELOG.md +30 -0
- package/README.md +19 -0
- package/lib/commonjs/assets/icons.js +2 -2
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/Header/HeaderRoomList.js +22 -6
- package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/commonjs/components/InputComponents/Search.js +38 -1
- package/lib/commonjs/components/InputComponents/Search.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ArchivedMessageCard.js +166 -0
- package/lib/commonjs/components/MainComponents/ArchivedMessageCard.js.map +1 -0
- package/lib/commonjs/components/MainComponents/ChatHeader.js +22 -5
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatRoom.js +56 -25
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatWrapper.js +31 -1
- package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MediaMessage.js +18 -3
- package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageList.js +739 -42
- package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageSearchButton.js +58 -0
- package/lib/commonjs/components/MainComponents/MessageSearchButton.js.map +1 -0
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js +15 -6
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomList.js +110 -1
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +14 -3
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/BubbleHighlight.js +112 -0
- package/lib/commonjs/components/MessageBubble/BubbleHighlight.js.map +1 -0
- package/lib/commonjs/components/MessageBubble/Message.js +169 -125
- package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js +98 -78
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/messageMenuLayout.js +50 -0
- package/lib/commonjs/components/MessageBubble/messageMenuLayout.js.map +1 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +73 -37
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/MessageSearchModal/MessageHitResults.js +253 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/MessageHitResults.js.map +1 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/MessageSearchModal.js +488 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/MessageSearchModal.js.map +1 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/openHit.js +51 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/openHit.js.map +1 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/resolveSender.js +47 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/resolveSender.js.map +1 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/searchFilters.js +83 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/searchFilters.js.map +1 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/snippet.js +61 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/snippet.js.map +1 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/useMessageSearch.js +136 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/useMessageSearch.js.map +1 -0
- package/lib/commonjs/components/Modals/PublicChatsModal/PublicChatsModal.js +306 -0
- package/lib/commonjs/components/Modals/PublicChatsModal/PublicChatsModal.js.map +1 -0
- package/lib/commonjs/components/Modals/PublicChatsModal/publicChatsLogic.js +36 -0
- package/lib/commonjs/components/Modals/PublicChatsModal/publicChatsLogic.js.map +1 -0
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +8 -1
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +13 -2
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/SwipeableRoomRow.js +38 -6
- package/lib/commonjs/components/RoomComponents/SwipeableRoomRow.js.map +1 -1
- package/lib/commonjs/components/Thread/ThreadHeader.js +3 -1
- package/lib/commonjs/components/Thread/ThreadHeader.js.map +1 -1
- package/lib/commonjs/components/Thread/ThreadWrapper.js +90 -10
- package/lib/commonjs/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/commonjs/components/styled/AudioDecoderHost.js +338 -0
- package/lib/commonjs/components/styled/AudioDecoderHost.js.map +1 -0
- package/lib/commonjs/components/styled/AudioMessage.js +493 -420
- package/lib/commonjs/components/styled/AudioMessage.js.map +1 -1
- package/lib/commonjs/components/styled/SendInput.js +31 -5
- package/lib/commonjs/components/styled/SendInput.js.map +1 -1
- package/lib/commonjs/context/MessageNotificationContext.js +14 -4
- package/lib/commonjs/context/MessageNotificationContext.js.map +1 -1
- package/lib/commonjs/context/xmppProvider.js +41 -77
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/helpers/audioWaveform.js +165 -0
- package/lib/commonjs/helpers/audioWaveform.js.map +1 -0
- package/lib/commonjs/helpers/backgroundJoinSweep.js +36 -0
- package/lib/commonjs/helpers/backgroundJoinSweep.js.map +1 -0
- package/lib/commonjs/helpers/bubbleHighlight.js +44 -0
- package/lib/commonjs/helpers/bubbleHighlight.js.map +1 -0
- package/lib/commonjs/helpers/checkUniqueUsers.js +14 -12
- package/lib/commonjs/helpers/checkUniqueUsers.js.map +1 -1
- package/lib/commonjs/helpers/constants/MODAL_COMPONENTS.js +5 -1
- package/lib/commonjs/helpers/constants/MODAL_COMPONENTS.js.map +1 -1
- package/lib/commonjs/helpers/constants/MODAL_TYPES.js +3 -1
- package/lib/commonjs/helpers/constants/MODAL_TYPES.js.map +1 -1
- package/lib/commonjs/helpers/createRoomFromApi.js +40 -3
- package/lib/commonjs/helpers/createRoomFromApi.js.map +1 -1
- package/lib/commonjs/helpers/dedupeMembers.js +34 -0
- package/lib/commonjs/helpers/dedupeMembers.js.map +1 -0
- package/lib/commonjs/helpers/ethoraLogger.js +56 -0
- package/lib/commonjs/helpers/ethoraLogger.js.map +1 -0
- package/lib/commonjs/helpers/getUnnamedUsers.js +9 -4
- package/lib/commonjs/helpers/getUnnamedUsers.js.map +1 -1
- package/lib/commonjs/helpers/historyPreloadConfig.js +44 -0
- package/lib/commonjs/helpers/historyPreloadConfig.js.map +1 -0
- package/lib/commonjs/helpers/historyPreloadScheduler.js +372 -137
- package/lib/commonjs/helpers/historyPreloadScheduler.js.map +1 -1
- package/lib/commonjs/helpers/initRoomsPresence.js +17 -5
- package/lib/commonjs/helpers/initRoomsPresence.js.map +1 -1
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js +5 -0
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/commonjs/helpers/isLikelyMucJid.js +67 -0
- package/lib/commonjs/helpers/isLikelyMucJid.js.map +1 -0
- package/lib/commonjs/helpers/isMessageSearchEnabled.js +18 -0
- package/lib/commonjs/helpers/isMessageSearchEnabled.js.map +1 -0
- package/lib/commonjs/helpers/joiningRoom.js +14 -0
- package/lib/commonjs/helpers/joiningRoom.js.map +1 -0
- package/lib/commonjs/helpers/jumpThread.js +100 -0
- package/lib/commonjs/helpers/jumpThread.js.map +1 -0
- package/lib/commonjs/helpers/jumpToMessage.js +58 -0
- package/lib/commonjs/helpers/jumpToMessage.js.map +1 -0
- package/lib/commonjs/helpers/jumpWindow.js +187 -0
- package/lib/commonjs/helpers/jumpWindow.js.map +1 -0
- package/lib/commonjs/helpers/loadRoomHistory.js +75 -0
- package/lib/commonjs/helpers/loadRoomHistory.js.map +1 -0
- package/lib/commonjs/helpers/notificationPolicy.js +77 -0
- package/lib/commonjs/helpers/notificationPolicy.js.map +1 -0
- package/lib/commonjs/helpers/openRoomAtMessage.js +47 -0
- package/lib/commonjs/helpers/openRoomAtMessage.js.map +1 -0
- package/lib/commonjs/helpers/openThreadForJump.js +72 -0
- package/lib/commonjs/helpers/openThreadForJump.js.map +1 -0
- package/lib/commonjs/helpers/parseMessageReference.js +27 -8
- package/lib/commonjs/helpers/parseMessageReference.js.map +1 -1
- package/lib/commonjs/helpers/publicChatsEntry.js +17 -0
- package/lib/commonjs/helpers/publicChatsEntry.js.map +1 -0
- package/lib/commonjs/helpers/roomActivityScore.js +37 -0
- package/lib/commonjs/helpers/roomActivityScore.js.map +1 -0
- package/lib/commonjs/helpers/roomUserCount.js +36 -0
- package/lib/commonjs/helpers/roomUserCount.js.map +1 -0
- package/lib/commonjs/helpers/runConfiguredHistoryPreload.js +68 -0
- package/lib/commonjs/helpers/runConfiguredHistoryPreload.js.map +1 -0
- package/lib/commonjs/helpers/sessionAppId.js +24 -0
- package/lib/commonjs/helpers/sessionAppId.js.map +1 -0
- package/lib/commonjs/helpers/timestamp.js +43 -0
- package/lib/commonjs/helpers/timestamp.js.map +1 -0
- package/lib/commonjs/helpers/userResolver.js +517 -0
- package/lib/commonjs/helpers/userResolver.js.map +1 -0
- package/lib/commonjs/helpers/xmppIdShape.js +52 -0
- package/lib/commonjs/helpers/xmppIdShape.js.map +1 -0
- package/lib/commonjs/hooks/useChatWrapperInit.js +27 -5
- package/lib/commonjs/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/commonjs/hooks/useHeapSender.js +54 -3
- package/lib/commonjs/hooks/useHeapSender.js.map +1 -1
- package/lib/commonjs/hooks/useJumpToMessage.js +411 -0
- package/lib/commonjs/hooks/useJumpToMessage.js.map +1 -0
- package/lib/commonjs/hooks/useMessageLoaderQueue.js +32 -5
- package/lib/commonjs/hooks/useMessageLoaderQueue.js.map +1 -1
- package/lib/commonjs/hooks/useMessageQueue.js +13 -5
- package/lib/commonjs/hooks/useMessageQueue.js.map +1 -1
- package/lib/commonjs/hooks/useRoomDirectory.js +29 -0
- package/lib/commonjs/hooks/useRoomDirectory.js.map +1 -0
- package/lib/commonjs/hooks/useRoomInitialization.js +27 -5
- package/lib/commonjs/hooks/useRoomInitialization.js.map +1 -1
- package/lib/commonjs/hooks/useRoomMute.js +62 -0
- package/lib/commonjs/hooks/useRoomMute.js.map +1 -0
- package/lib/commonjs/hooks/useRoomState.js +3 -1
- package/lib/commonjs/hooks/useRoomState.js.map +1 -1
- package/lib/commonjs/hooks/useSendMessage.js +13 -3
- package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
- package/lib/commonjs/i18n/strings.js +288 -6
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/networking/api-requests/messageSearch.api.js +87 -0
- package/lib/commonjs/networking/api-requests/messageSearch.api.js.map +1 -0
- package/lib/commonjs/networking/api-requests/publicChats.api.js +48 -0
- package/lib/commonjs/networking/api-requests/publicChats.api.js.map +1 -0
- package/lib/commonjs/networking/api-requests/roomMembers.api.js +253 -4
- package/lib/commonjs/networking/api-requests/roomMembers.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +48 -12
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/xmppToken.api.js +71 -0
- package/lib/commonjs/networking/api-requests/xmppToken.api.js.map +1 -0
- package/lib/commonjs/networking/ethoraEvents.js +227 -0
- package/lib/commonjs/networking/ethoraEvents.js.map +1 -0
- package/lib/commonjs/networking/stanzaHandlers.js +153 -16
- package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
- package/lib/commonjs/networking/xmpp/allRoomPresences.xmpp.js +124 -3
- package/lib/commonjs/networking/xmpp/allRoomPresences.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/getHistory.xmpp.js +319 -35
- package/lib/commonjs/networking/xmpp/getHistory.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/handleStanzas.xmpp.js +7 -0
- package/lib/commonjs/networking/xmpp/handleStanzas.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/historyCursor.js +101 -0
- package/lib/commonjs/networking/xmpp/historyCursor.js.map +1 -0
- package/lib/commonjs/networking/xmpp/mamQueryIds.js +17 -0
- package/lib/commonjs/networking/xmpp/mamQueryIds.js.map +1 -0
- package/lib/commonjs/networking/xmpp/mamRouter.js +24 -9
- package/lib/commonjs/networking/xmpp/mamRouter.js.map +1 -1
- package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js +70 -65
- package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/roomJoinSweep.js +389 -0
- package/lib/commonjs/networking/xmpp/roomJoinSweep.js.map +1 -0
- package/lib/commonjs/networking/xmpp/sendMediaMessage.xmpp.js +0 -1
- package/lib/commonjs/networking/xmpp/sendMediaMessage.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/sendTextMessage.xmpp.js +0 -1
- package/lib/commonjs/networking/xmpp/sendTextMessage.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.js +0 -1
- package/lib/commonjs/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js +269 -41
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/networking/xmppCredentials.js +80 -0
- package/lib/commonjs/networking/xmppCredentials.js.map +1 -0
- package/lib/commonjs/roomStore/Middleware/jumpThreadMiddleware.js +158 -0
- package/lib/commonjs/roomStore/Middleware/jumpThreadMiddleware.js.map +1 -0
- package/lib/commonjs/roomStore/Middleware/reactionsMiddleware.js +6 -0
- package/lib/commonjs/roomStore/Middleware/reactionsMiddleware.js.map +1 -1
- package/lib/commonjs/roomStore/Middleware/unreadMidlleware.js +45 -7
- package/lib/commonjs/roomStore/Middleware/unreadMidlleware.js.map +1 -1
- package/lib/commonjs/roomStore/chatSettingsSlice.js +15 -1
- package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/commonjs/roomStore/index.js +13 -3
- package/lib/commonjs/roomStore/index.js.map +1 -1
- package/lib/commonjs/roomStore/persistence.js +48 -1
- package/lib/commonjs/roomStore/persistence.js.map +1 -1
- package/lib/commonjs/roomStore/roomsSlice.js +474 -60
- package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
- package/lib/commonjs/roomStore/safeKey.js +44 -0
- package/lib/commonjs/roomStore/safeKey.js.map +1 -0
- package/lib/commonjs/roomStore/usersSetCap.js +37 -0
- package/lib/commonjs/roomStore/usersSetCap.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/assets/icons.js +1 -1
- package/lib/module/assets/icons.js.map +1 -1
- package/lib/module/components/Header/HeaderRoomList.js +23 -7
- package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/module/components/InputComponents/Search.js +39 -2
- package/lib/module/components/InputComponents/Search.js.map +1 -1
- package/lib/module/components/MainComponents/ArchivedMessageCard.js +161 -0
- package/lib/module/components/MainComponents/ArchivedMessageCard.js.map +1 -0
- package/lib/module/components/MainComponents/ChatHeader.js +22 -5
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/ChatRoom.js +57 -26
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/ChatWrapper.js +31 -1
- package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/MediaMessage.js +18 -3
- package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/module/components/MainComponents/MessageList.js +740 -42
- package/lib/module/components/MainComponents/MessageList.js.map +1 -1
- package/lib/module/components/MainComponents/MessageSearchButton.js +48 -0
- package/lib/module/components/MainComponents/MessageSearchButton.js.map +1 -0
- package/lib/module/components/MainComponents/ReduxWrapper.js +15 -7
- package/lib/module/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/RoomList.js +111 -2
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/Menu/HeaderRoomListMenu.js +15 -4
- package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/module/components/MessageBubble/BubbleHighlight.js +106 -0
- package/lib/module/components/MessageBubble/BubbleHighlight.js.map +1 -0
- package/lib/module/components/MessageBubble/Message.js +172 -127
- package/lib/module/components/MessageBubble/Message.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageInteractions.js +98 -78
- package/lib/module/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/module/components/MessageBubble/messageMenuLayout.js +45 -0
- package/lib/module/components/MessageBubble/messageMenuLayout.js.map +1 -0
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +74 -38
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/MessageSearchModal/MessageHitResults.js +243 -0
- package/lib/module/components/Modals/MessageSearchModal/MessageHitResults.js.map +1 -0
- package/lib/module/components/Modals/MessageSearchModal/MessageSearchModal.js +482 -0
- package/lib/module/components/Modals/MessageSearchModal/MessageSearchModal.js.map +1 -0
- package/lib/module/components/Modals/MessageSearchModal/openHit.js +45 -0
- package/lib/module/components/Modals/MessageSearchModal/openHit.js.map +1 -0
- package/lib/module/components/Modals/MessageSearchModal/resolveSender.js +41 -0
- package/lib/module/components/Modals/MessageSearchModal/resolveSender.js.map +1 -0
- package/lib/module/components/Modals/MessageSearchModal/searchFilters.js +74 -0
- package/lib/module/components/Modals/MessageSearchModal/searchFilters.js.map +1 -0
- package/lib/module/components/Modals/MessageSearchModal/snippet.js +57 -0
- package/lib/module/components/Modals/MessageSearchModal/snippet.js.map +1 -0
- package/lib/module/components/Modals/MessageSearchModal/useMessageSearch.js +131 -0
- package/lib/module/components/Modals/MessageSearchModal/useMessageSearch.js.map +1 -0
- package/lib/module/components/Modals/PublicChatsModal/PublicChatsModal.js +300 -0
- package/lib/module/components/Modals/PublicChatsModal/PublicChatsModal.js.map +1 -0
- package/lib/module/components/Modals/PublicChatsModal/publicChatsLogic.js +30 -0
- package/lib/module/components/Modals/PublicChatsModal/publicChatsLogic.js.map +1 -0
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +8 -1
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js +14 -3
- package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/module/components/RoomComponents/SwipeableRoomRow.js +39 -7
- package/lib/module/components/RoomComponents/SwipeableRoomRow.js.map +1 -1
- package/lib/module/components/Thread/ThreadHeader.js +3 -1
- package/lib/module/components/Thread/ThreadHeader.js.map +1 -1
- package/lib/module/components/Thread/ThreadWrapper.js +89 -9
- package/lib/module/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/module/components/styled/AudioDecoderHost.js +332 -0
- package/lib/module/components/styled/AudioDecoderHost.js.map +1 -0
- package/lib/module/components/styled/AudioMessage.js +495 -422
- package/lib/module/components/styled/AudioMessage.js.map +1 -1
- package/lib/module/components/styled/SendInput.js +32 -6
- package/lib/module/components/styled/SendInput.js.map +1 -1
- package/lib/module/context/MessageNotificationContext.js +15 -5
- package/lib/module/context/MessageNotificationContext.js.map +1 -1
- package/lib/module/context/xmppProvider.js +42 -78
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/helpers/audioWaveform.js +153 -0
- package/lib/module/helpers/audioWaveform.js.map +1 -0
- package/lib/module/helpers/backgroundJoinSweep.js +30 -0
- package/lib/module/helpers/backgroundJoinSweep.js.map +1 -0
- package/lib/module/helpers/bubbleHighlight.js +38 -0
- package/lib/module/helpers/bubbleHighlight.js.map +1 -0
- package/lib/module/helpers/checkUniqueUsers.js +15 -13
- package/lib/module/helpers/checkUniqueUsers.js.map +1 -1
- package/lib/module/helpers/constants/MODAL_COMPONENTS.js +5 -1
- package/lib/module/helpers/constants/MODAL_COMPONENTS.js.map +1 -1
- package/lib/module/helpers/constants/MODAL_TYPES.js +3 -1
- package/lib/module/helpers/constants/MODAL_TYPES.js.map +1 -1
- package/lib/module/helpers/createRoomFromApi.js +37 -3
- package/lib/module/helpers/createRoomFromApi.js.map +1 -1
- package/lib/module/helpers/dedupeMembers.js +28 -0
- package/lib/module/helpers/dedupeMembers.js.map +1 -0
- package/lib/module/helpers/ethoraLogger.js +52 -0
- package/lib/module/helpers/ethoraLogger.js.map +1 -0
- package/lib/module/helpers/getUnnamedUsers.js +9 -4
- package/lib/module/helpers/getUnnamedUsers.js.map +1 -1
- package/lib/module/helpers/historyPreloadConfig.js +39 -0
- package/lib/module/helpers/historyPreloadConfig.js.map +1 -0
- package/lib/module/helpers/historyPreloadScheduler.js +368 -134
- package/lib/module/helpers/historyPreloadScheduler.js.map +1 -1
- package/lib/module/helpers/initRoomsPresence.js +18 -5
- package/lib/module/helpers/initRoomsPresence.js.map +1 -1
- package/lib/module/helpers/insertMessageWithDelimiter.js +5 -0
- package/lib/module/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/module/helpers/isLikelyMucJid.js +60 -0
- package/lib/module/helpers/isLikelyMucJid.js.map +1 -0
- package/lib/module/helpers/isMessageSearchEnabled.js +13 -0
- package/lib/module/helpers/isMessageSearchEnabled.js.map +1 -0
- package/lib/module/helpers/joiningRoom.js +9 -0
- package/lib/module/helpers/joiningRoom.js.map +1 -0
- package/lib/module/helpers/jumpThread.js +83 -0
- package/lib/module/helpers/jumpThread.js.map +1 -0
- package/lib/module/helpers/jumpToMessage.js +52 -0
- package/lib/module/helpers/jumpToMessage.js.map +1 -0
- package/lib/module/helpers/jumpWindow.js +177 -0
- package/lib/module/helpers/jumpWindow.js.map +1 -0
- package/lib/module/helpers/loadRoomHistory.js +69 -0
- package/lib/module/helpers/loadRoomHistory.js.map +1 -0
- package/lib/module/helpers/notificationPolicy.js +70 -0
- package/lib/module/helpers/notificationPolicy.js.map +1 -0
- package/lib/module/helpers/openRoomAtMessage.js +41 -0
- package/lib/module/helpers/openRoomAtMessage.js.map +1 -0
- package/lib/module/helpers/openThreadForJump.js +68 -0
- package/lib/module/helpers/openThreadForJump.js.map +1 -0
- package/lib/module/helpers/parseMessageReference.js +26 -6
- package/lib/module/helpers/parseMessageReference.js.map +1 -1
- package/lib/module/helpers/publicChatsEntry.js +12 -0
- package/lib/module/helpers/publicChatsEntry.js.map +1 -0
- package/lib/module/helpers/roomActivityScore.js +30 -0
- package/lib/module/helpers/roomActivityScore.js.map +1 -0
- package/lib/module/helpers/roomUserCount.js +29 -0
- package/lib/module/helpers/roomUserCount.js.map +1 -0
- package/lib/module/helpers/runConfiguredHistoryPreload.js +63 -0
- package/lib/module/helpers/runConfiguredHistoryPreload.js.map +1 -0
- package/lib/module/helpers/sessionAppId.js +20 -0
- package/lib/module/helpers/sessionAppId.js.map +1 -0
- package/lib/module/helpers/timestamp.js +37 -0
- package/lib/module/helpers/timestamp.js.map +1 -0
- package/lib/module/helpers/userResolver.js +503 -0
- package/lib/module/helpers/userResolver.js.map +1 -0
- package/lib/module/helpers/xmppIdShape.js +46 -0
- package/lib/module/helpers/xmppIdShape.js.map +1 -0
- package/lib/module/hooks/useChatWrapperInit.js +16 -5
- package/lib/module/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/module/hooks/useHeapSender.js +54 -3
- package/lib/module/hooks/useHeapSender.js.map +1 -1
- package/lib/module/hooks/useJumpToMessage.js +389 -0
- package/lib/module/hooks/useJumpToMessage.js.map +1 -0
- package/lib/module/hooks/useMessageLoaderQueue.js +32 -5
- package/lib/module/hooks/useMessageLoaderQueue.js.map +1 -1
- package/lib/module/hooks/useMessageQueue.js +13 -5
- package/lib/module/hooks/useMessageQueue.js.map +1 -1
- package/lib/module/hooks/useRoomDirectory.js +24 -0
- package/lib/module/hooks/useRoomDirectory.js.map +1 -0
- package/lib/module/hooks/useRoomInitialization.js +29 -7
- package/lib/module/hooks/useRoomInitialization.js.map +1 -1
- package/lib/module/hooks/useRoomMute.js +58 -0
- package/lib/module/hooks/useRoomMute.js.map +1 -0
- package/lib/module/hooks/useRoomState.js +3 -1
- package/lib/module/hooks/useRoomState.js.map +1 -1
- package/lib/module/hooks/useSendMessage.js +13 -3
- package/lib/module/hooks/useSendMessage.js.map +1 -1
- package/lib/module/i18n/strings.js +288 -6
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/networking/api-requests/messageSearch.api.js +81 -0
- package/lib/module/networking/api-requests/messageSearch.api.js.map +1 -0
- package/lib/module/networking/api-requests/publicChats.api.js +43 -0
- package/lib/module/networking/api-requests/publicChats.api.js.map +1 -0
- package/lib/module/networking/api-requests/roomMembers.api.js +248 -4
- package/lib/module/networking/api-requests/roomMembers.api.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +48 -12
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/api-requests/xmppToken.api.js +66 -0
- package/lib/module/networking/api-requests/xmppToken.api.js.map +1 -0
- package/lib/module/networking/ethoraEvents.js +220 -0
- package/lib/module/networking/ethoraEvents.js.map +1 -0
- package/lib/module/networking/stanzaHandlers.js +155 -18
- package/lib/module/networking/stanzaHandlers.js.map +1 -1
- package/lib/module/networking/xmpp/allRoomPresences.xmpp.js +125 -3
- package/lib/module/networking/xmpp/allRoomPresences.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/getHistory.xmpp.js +318 -35
- package/lib/module/networking/xmpp/getHistory.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/handleStanzas.xmpp.js +7 -0
- package/lib/module/networking/xmpp/handleStanzas.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/historyCursor.js +95 -0
- package/lib/module/networking/xmpp/historyCursor.js.map +1 -0
- package/lib/module/networking/xmpp/mamQueryIds.js +12 -0
- package/lib/module/networking/xmpp/mamQueryIds.js.map +1 -0
- package/lib/module/networking/xmpp/mamRouter.js +22 -8
- package/lib/module/networking/xmpp/mamRouter.js.map +1 -1
- package/lib/module/networking/xmpp/presenceInRoom.xmpp.js +68 -62
- package/lib/module/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/roomJoinSweep.js +385 -0
- package/lib/module/networking/xmpp/roomJoinSweep.js.map +1 -0
- package/lib/module/networking/xmpp/sendMediaMessage.xmpp.js +0 -1
- package/lib/module/networking/xmpp/sendMediaMessage.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/sendTextMessage.xmpp.js +0 -1
- package/lib/module/networking/xmpp/sendTextMessage.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.js +0 -1
- package/lib/module/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.js.map +1 -1
- package/lib/module/networking/xmppClient.js +269 -41
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/networking/xmppCredentials.js +76 -0
- package/lib/module/networking/xmppCredentials.js.map +1 -0
- package/lib/module/roomStore/Middleware/jumpThreadMiddleware.js +153 -0
- package/lib/module/roomStore/Middleware/jumpThreadMiddleware.js.map +1 -0
- package/lib/module/roomStore/Middleware/reactionsMiddleware.js +6 -0
- package/lib/module/roomStore/Middleware/reactionsMiddleware.js.map +1 -1
- package/lib/module/roomStore/Middleware/unreadMidlleware.js +46 -7
- package/lib/module/roomStore/Middleware/unreadMidlleware.js.map +1 -1
- package/lib/module/roomStore/chatSettingsSlice.js +13 -0
- package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/module/roomStore/index.js +7 -3
- package/lib/module/roomStore/index.js.map +1 -1
- package/lib/module/roomStore/persistence.js +46 -1
- package/lib/module/roomStore/persistence.js.map +1 -1
- package/lib/module/roomStore/roomsSlice.js +459 -58
- package/lib/module/roomStore/roomsSlice.js.map +1 -1
- package/lib/module/roomStore/safeKey.js +37 -0
- package/lib/module/roomStore/safeKey.js.map +1 -0
- package/lib/module/roomStore/usersSetCap.js +32 -0
- package/lib/module/roomStore/usersSetCap.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/assets/icons.d.ts +4 -0
- package/lib/typescript/assets/icons.d.ts.map +1 -1
- package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
- package/lib/typescript/components/InputComponents/Search.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ArchivedMessageCard.d.ts +12 -0
- package/lib/typescript/components/MainComponents/ArchivedMessageCard.d.ts.map +1 -0
- package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageList.d.ts +22 -1
- package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageSearchButton.d.ts +7 -0
- package/lib/typescript/components/MainComponents/MessageSearchButton.d.ts.map +1 -0
- package/lib/typescript/components/MainComponents/ReduxWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/BubbleHighlight.d.ts +12 -0
- package/lib/typescript/components/MessageBubble/BubbleHighlight.d.ts.map +1 -0
- package/lib/typescript/components/MessageBubble/Message.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/MessageInteractions.d.ts +5 -0
- package/lib/typescript/components/MessageBubble/MessageInteractions.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/messageMenuLayout.d.ts +29 -0
- package/lib/typescript/components/MessageBubble/messageMenuLayout.d.ts.map +1 -0
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts +2 -0
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/MessageSearchModal/MessageHitResults.d.ts +44 -0
- package/lib/typescript/components/Modals/MessageSearchModal/MessageHitResults.d.ts.map +1 -0
- package/lib/typescript/components/Modals/MessageSearchModal/MessageSearchModal.d.ts +12 -0
- package/lib/typescript/components/Modals/MessageSearchModal/MessageSearchModal.d.ts.map +1 -0
- package/lib/typescript/components/Modals/MessageSearchModal/openHit.d.ts +15 -0
- package/lib/typescript/components/Modals/MessageSearchModal/openHit.d.ts.map +1 -0
- package/lib/typescript/components/Modals/MessageSearchModal/resolveSender.d.ts +34 -0
- package/lib/typescript/components/Modals/MessageSearchModal/resolveSender.d.ts.map +1 -0
- package/lib/typescript/components/Modals/MessageSearchModal/searchFilters.d.ts +41 -0
- package/lib/typescript/components/Modals/MessageSearchModal/searchFilters.d.ts.map +1 -0
- package/lib/typescript/components/Modals/MessageSearchModal/snippet.d.ts +15 -0
- package/lib/typescript/components/Modals/MessageSearchModal/snippet.d.ts.map +1 -0
- package/lib/typescript/components/Modals/MessageSearchModal/useMessageSearch.d.ts +23 -0
- package/lib/typescript/components/Modals/MessageSearchModal/useMessageSearch.d.ts.map +1 -0
- package/lib/typescript/components/Modals/PublicChatsModal/PublicChatsModal.d.ts +16 -0
- package/lib/typescript/components/Modals/PublicChatsModal/PublicChatsModal.d.ts.map +1 -0
- package/lib/typescript/components/Modals/PublicChatsModal/publicChatsLogic.d.ts +14 -0
- package/lib/typescript/components/Modals/PublicChatsModal/publicChatsLogic.d.ts.map +1 -0
- package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/SwipeableRoomRow.d.ts +5 -1
- package/lib/typescript/components/RoomComponents/SwipeableRoomRow.d.ts.map +1 -1
- package/lib/typescript/components/Thread/ThreadHeader.d.ts.map +1 -1
- package/lib/typescript/components/Thread/ThreadWrapper.d.ts +1 -0
- package/lib/typescript/components/Thread/ThreadWrapper.d.ts.map +1 -1
- package/lib/typescript/components/styled/AudioDecoderHost.d.ts +39 -0
- package/lib/typescript/components/styled/AudioDecoderHost.d.ts.map +1 -0
- package/lib/typescript/components/styled/AudioMessage.d.ts +14 -1
- package/lib/typescript/components/styled/AudioMessage.d.ts.map +1 -1
- package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
- package/lib/typescript/context/MessageNotificationContext.d.ts.map +1 -1
- package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
- package/lib/typescript/helpers/audioWaveform.d.ts +54 -0
- package/lib/typescript/helpers/audioWaveform.d.ts.map +1 -0
- package/lib/typescript/helpers/backgroundJoinSweep.d.ts +14 -0
- package/lib/typescript/helpers/backgroundJoinSweep.d.ts.map +1 -0
- package/lib/typescript/helpers/bubbleHighlight.d.ts +17 -0
- package/lib/typescript/helpers/bubbleHighlight.d.ts.map +1 -0
- package/lib/typescript/helpers/checkUniqueUsers.d.ts +2 -2
- package/lib/typescript/helpers/checkUniqueUsers.d.ts.map +1 -1
- package/lib/typescript/helpers/constants/MODAL_COMPONENTS.d.ts.map +1 -1
- package/lib/typescript/helpers/constants/MODAL_TYPES.d.ts +2 -0
- package/lib/typescript/helpers/constants/MODAL_TYPES.d.ts.map +1 -1
- package/lib/typescript/helpers/createRoomFromApi.d.ts +25 -0
- package/lib/typescript/helpers/createRoomFromApi.d.ts.map +1 -1
- package/lib/typescript/helpers/dedupeMembers.d.ts +11 -0
- package/lib/typescript/helpers/dedupeMembers.d.ts.map +1 -0
- package/lib/typescript/helpers/ethoraLogger.d.ts +13 -0
- package/lib/typescript/helpers/ethoraLogger.d.ts.map +1 -0
- package/lib/typescript/helpers/getUnnamedUsers.d.ts.map +1 -1
- package/lib/typescript/helpers/historyPreloadConfig.d.ts +26 -0
- package/lib/typescript/helpers/historyPreloadConfig.d.ts.map +1 -0
- package/lib/typescript/helpers/historyPreloadScheduler.d.ts +8 -4
- package/lib/typescript/helpers/historyPreloadScheduler.d.ts.map +1 -1
- package/lib/typescript/helpers/initRoomsPresence.d.ts +7 -0
- package/lib/typescript/helpers/initRoomsPresence.d.ts.map +1 -1
- package/lib/typescript/helpers/insertMessageWithDelimiter.d.ts.map +1 -1
- package/lib/typescript/helpers/isLikelyMucJid.d.ts +19 -0
- package/lib/typescript/helpers/isLikelyMucJid.d.ts.map +1 -0
- package/lib/typescript/helpers/isMessageSearchEnabled.d.ts +12 -0
- package/lib/typescript/helpers/isMessageSearchEnabled.d.ts.map +1 -0
- package/lib/typescript/helpers/joiningRoom.d.ts +7 -0
- package/lib/typescript/helpers/joiningRoom.d.ts.map +1 -0
- package/lib/typescript/helpers/jumpThread.d.ts +48 -0
- package/lib/typescript/helpers/jumpThread.d.ts.map +1 -0
- package/lib/typescript/helpers/jumpToMessage.d.ts +26 -0
- package/lib/typescript/helpers/jumpToMessage.d.ts.map +1 -0
- package/lib/typescript/helpers/jumpWindow.d.ts +74 -0
- package/lib/typescript/helpers/jumpWindow.d.ts.map +1 -0
- package/lib/typescript/helpers/loadRoomHistory.d.ts +34 -0
- package/lib/typescript/helpers/loadRoomHistory.d.ts.map +1 -0
- package/lib/typescript/helpers/notificationPolicy.d.ts +42 -0
- package/lib/typescript/helpers/notificationPolicy.d.ts.map +1 -0
- package/lib/typescript/helpers/openRoomAtMessage.d.ts +17 -0
- package/lib/typescript/helpers/openRoomAtMessage.d.ts.map +1 -0
- package/lib/typescript/helpers/openThreadForJump.d.ts +27 -0
- package/lib/typescript/helpers/openThreadForJump.d.ts.map +1 -0
- package/lib/typescript/helpers/parseMessageReference.d.ts +18 -5
- package/lib/typescript/helpers/parseMessageReference.d.ts.map +1 -1
- package/lib/typescript/helpers/publicChatsEntry.d.ts +11 -0
- package/lib/typescript/helpers/publicChatsEntry.d.ts.map +1 -0
- package/lib/typescript/helpers/roomActivityScore.d.ts +5 -0
- package/lib/typescript/helpers/roomActivityScore.d.ts.map +1 -0
- package/lib/typescript/helpers/roomUserCount.d.ts +20 -0
- package/lib/typescript/helpers/roomUserCount.d.ts.map +1 -0
- package/lib/typescript/helpers/runConfiguredHistoryPreload.d.ts +21 -0
- package/lib/typescript/helpers/runConfiguredHistoryPreload.d.ts.map +1 -0
- package/lib/typescript/helpers/sessionAppId.d.ts +8 -0
- package/lib/typescript/helpers/sessionAppId.d.ts.map +1 -0
- package/lib/typescript/helpers/timestamp.d.ts +3 -0
- package/lib/typescript/helpers/timestamp.d.ts.map +1 -0
- package/lib/typescript/helpers/userResolver.d.ts +58 -0
- package/lib/typescript/helpers/userResolver.d.ts.map +1 -0
- package/lib/typescript/helpers/xmppIdShape.d.ts +10 -0
- package/lib/typescript/helpers/xmppIdShape.d.ts.map +1 -0
- package/lib/typescript/hooks/useChatWrapperInit.d.ts +2 -0
- package/lib/typescript/hooks/useChatWrapperInit.d.ts.map +1 -1
- package/lib/typescript/hooks/useHeapSender.d.ts.map +1 -1
- package/lib/typescript/hooks/useJumpToMessage.d.ts +116 -0
- package/lib/typescript/hooks/useJumpToMessage.d.ts.map +1 -0
- package/lib/typescript/hooks/useMessageLoaderQueue.d.ts.map +1 -1
- package/lib/typescript/hooks/useMessageQueue.d.ts.map +1 -1
- package/lib/typescript/hooks/useRoomDirectory.d.ts +12 -0
- package/lib/typescript/hooks/useRoomDirectory.d.ts.map +1 -0
- package/lib/typescript/hooks/useRoomInitialization.d.ts.map +1 -1
- package/lib/typescript/hooks/useRoomMute.d.ts +8 -0
- package/lib/typescript/hooks/useRoomMute.d.ts.map +1 -0
- package/lib/typescript/hooks/useRoomState.d.ts +1 -0
- package/lib/typescript/hooks/useRoomState.d.ts.map +1 -1
- package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/messageSearch.api.d.ts +57 -0
- package/lib/typescript/networking/api-requests/messageSearch.api.d.ts.map +1 -0
- package/lib/typescript/networking/api-requests/publicChats.api.d.ts +24 -0
- package/lib/typescript/networking/api-requests/publicChats.api.d.ts.map +1 -0
- package/lib/typescript/networking/api-requests/roomMembers.api.d.ts +19 -1
- package/lib/typescript/networking/api-requests/roomMembers.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/xmppToken.api.d.ts +2 -0
- package/lib/typescript/networking/api-requests/xmppToken.api.d.ts.map +1 -0
- package/lib/typescript/networking/ethoraEvents.d.ts +45 -0
- package/lib/typescript/networking/ethoraEvents.d.ts.map +1 -0
- package/lib/typescript/networking/stanzaHandlers.d.ts +1 -1
- package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/allRoomPresences.xmpp.d.ts +32 -1
- package/lib/typescript/networking/xmpp/allRoomPresences.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/getHistory.xmpp.d.ts +64 -0
- package/lib/typescript/networking/xmpp/getHistory.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/handleStanzas.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/historyCursor.d.ts +35 -0
- package/lib/typescript/networking/xmpp/historyCursor.d.ts.map +1 -0
- package/lib/typescript/networking/xmpp/mamQueryIds.d.ts +10 -0
- package/lib/typescript/networking/xmpp/mamQueryIds.d.ts.map +1 -0
- package/lib/typescript/networking/xmpp/mamRouter.d.ts +7 -0
- package/lib/typescript/networking/xmpp/mamRouter.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts +13 -2
- package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/roomJoinSweep.d.ts +82 -0
- package/lib/typescript/networking/xmpp/roomJoinSweep.d.ts.map +1 -0
- package/lib/typescript/networking/xmpp/sendMediaMessage.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/sendTextMessage.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts +90 -4
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/networking/xmppCredentials.d.ts +12 -0
- package/lib/typescript/networking/xmppCredentials.d.ts.map +1 -0
- package/lib/typescript/roomStore/Middleware/jumpThreadMiddleware.d.ts +3 -0
- package/lib/typescript/roomStore/Middleware/jumpThreadMiddleware.d.ts.map +1 -0
- package/lib/typescript/roomStore/Middleware/reactionsMiddleware.d.ts.map +1 -1
- package/lib/typescript/roomStore/Middleware/unreadMidlleware.d.ts.map +1 -1
- package/lib/typescript/roomStore/chatSettingsSlice.d.ts +8 -1
- package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
- package/lib/typescript/roomStore/index.d.ts +2 -1
- package/lib/typescript/roomStore/index.d.ts.map +1 -1
- package/lib/typescript/roomStore/persistence.d.ts +8 -0
- package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts +138 -2
- package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
- package/lib/typescript/roomStore/safeKey.d.ts +13 -0
- package/lib/typescript/roomStore/safeKey.d.ts.map +1 -0
- package/lib/typescript/roomStore/usersSetCap.d.ts +16 -0
- package/lib/typescript/roomStore/usersSetCap.d.ts.map +1 -0
- package/lib/typescript/types/models/media.model.d.ts +2 -0
- package/lib/typescript/types/models/media.model.d.ts.map +1 -1
- package/lib/typescript/types/models/room.model.d.ts +18 -5
- package/lib/typescript/types/models/room.model.d.ts.map +1 -1
- package/lib/typescript/types/models/xmpp.model.d.ts +8 -1
- package/lib/typescript/types/models/xmpp.model.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +88 -5
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/lib/typescript/version.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/icons.tsx +13 -0
- package/src/components/Header/HeaderRoomList.tsx +21 -4
- package/src/components/InputComponents/Search.tsx +33 -0
- package/src/components/MainComponents/ArchivedMessageCard.tsx +139 -0
- package/src/components/MainComponents/ChatHeader.tsx +19 -3
- package/src/components/MainComponents/ChatRoom.tsx +60 -23
- package/src/components/MainComponents/ChatWrapper.tsx +23 -4
- package/src/components/MainComponents/MediaMessage.tsx +17 -0
- package/src/components/MainComponents/MessageList.tsx +823 -84
- package/src/components/MainComponents/MessageSearchButton.tsx +48 -0
- package/src/components/MainComponents/ReduxWrapper.tsx +16 -5
- package/src/components/MainComponents/RoomList.tsx +125 -0
- package/src/components/Menu/HeaderRoomListMenu.tsx +26 -2
- package/src/components/MessageBubble/BubbleHighlight.tsx +106 -0
- package/src/components/MessageBubble/Message.tsx +265 -177
- package/src/components/MessageBubble/MessageInteractions.tsx +109 -86
- package/src/components/MessageBubble/messageMenuLayout.ts +59 -0
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +92 -21
- package/src/components/Modals/MessageSearchModal/MessageHitResults.tsx +271 -0
- package/src/components/Modals/MessageSearchModal/MessageSearchModal.tsx +487 -0
- package/src/components/Modals/MessageSearchModal/openHit.ts +50 -0
- package/src/components/Modals/MessageSearchModal/resolveSender.ts +57 -0
- package/src/components/Modals/MessageSearchModal/searchFilters.ts +109 -0
- package/src/components/Modals/MessageSearchModal/snippet.ts +58 -0
- package/src/components/Modals/MessageSearchModal/useMessageSearch.ts +151 -0
- package/src/components/Modals/PublicChatsModal/PublicChatsModal.tsx +288 -0
- package/src/components/Modals/PublicChatsModal/publicChatsLogic.ts +36 -0
- package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +8 -1
- package/src/components/RoomComponents/ChatRoomItem.tsx +16 -3
- package/src/components/RoomComponents/SwipeableRoomRow.tsx +39 -6
- package/src/components/Thread/ThreadHeader.tsx +3 -1
- package/src/components/Thread/ThreadWrapper.tsx +96 -10
- package/src/components/styled/AudioDecoderHost.tsx +351 -0
- package/src/components/styled/AudioMessage.tsx +482 -425
- package/src/components/styled/SendInput.tsx +42 -4
- package/src/context/MessageNotificationContext.tsx +19 -5
- package/src/context/xmppProvider.tsx +44 -91
- package/src/helpers/audioWaveform.ts +142 -0
- package/src/helpers/backgroundJoinSweep.ts +35 -0
- package/src/helpers/bubbleHighlight.ts +47 -0
- package/src/helpers/checkUniqueUsers.tsx +15 -17
- package/src/helpers/constants/MODAL_COMPONENTS.tsx +4 -0
- package/src/helpers/constants/MODAL_TYPES.ts +3 -0
- package/src/helpers/createRoomFromApi.tsx +45 -4
- package/src/helpers/dedupeMembers.ts +29 -0
- package/src/helpers/ethoraLogger.ts +50 -0
- package/src/helpers/getUnnamedUsers.ts +7 -4
- package/src/helpers/historyPreloadConfig.ts +68 -0
- package/src/helpers/historyPreloadScheduler.ts +437 -199
- package/src/helpers/initRoomsPresence.ts +20 -7
- package/src/helpers/insertMessageWithDelimiter.ts +3 -0
- package/src/helpers/isLikelyMucJid.ts +72 -0
- package/src/helpers/isMessageSearchEnabled.ts +18 -0
- package/src/helpers/joiningRoom.ts +13 -0
- package/src/helpers/jumpThread.ts +102 -0
- package/src/helpers/jumpToMessage.ts +57 -0
- package/src/helpers/jumpWindow.ts +212 -0
- package/src/helpers/loadRoomHistory.ts +83 -0
- package/src/helpers/notificationPolicy.ts +82 -0
- package/src/helpers/openRoomAtMessage.ts +38 -0
- package/src/helpers/openThreadForJump.ts +96 -0
- package/src/helpers/parseMessageReference.ts +37 -8
- package/src/helpers/publicChatsEntry.ts +15 -0
- package/src/helpers/roomActivityScore.ts +45 -0
- package/src/helpers/roomUserCount.ts +44 -0
- package/src/helpers/runConfiguredHistoryPreload.ts +76 -0
- package/src/helpers/sessionAppId.ts +17 -0
- package/src/helpers/timestamp.ts +44 -0
- package/src/helpers/userResolver.ts +542 -0
- package/src/helpers/xmppIdShape.ts +46 -0
- package/src/hooks/useChatWrapperInit.ts +22 -4
- package/src/hooks/useHeapSender.tsx +54 -3
- package/src/hooks/useJumpToMessage.ts +538 -0
- package/src/hooks/useMessageLoaderQueue.tsx +40 -4
- package/src/hooks/useMessageQueue.ts +9 -5
- package/src/hooks/useRoomDirectory.ts +39 -0
- package/src/hooks/useRoomInitialization.tsx +33 -7
- package/src/hooks/useRoomMute.ts +42 -0
- package/src/hooks/useRoomState.tsx +6 -0
- package/src/hooks/useSendMessage.tsx +14 -2
- package/src/i18n/strings.ts +282 -0
- package/src/networking/api-requests/messageSearch.api.ts +130 -0
- package/src/networking/api-requests/publicChats.api.ts +71 -0
- package/src/networking/api-requests/roomMembers.api.ts +263 -11
- package/src/networking/api-requests/rooms.api.ts +52 -12
- package/src/networking/api-requests/xmppToken.api.ts +62 -0
- package/src/networking/ethoraEvents.ts +262 -0
- package/src/networking/stanzaHandlers.ts +145 -19
- package/src/networking/xmpp/allRoomPresences.xmpp.ts +155 -5
- package/src/networking/xmpp/getHistory.xmpp.ts +433 -47
- package/src/networking/xmpp/handleStanzas.xmpp.ts +8 -0
- package/src/networking/xmpp/historyCursor.ts +124 -0
- package/src/networking/xmpp/mamQueryIds.ts +11 -0
- package/src/networking/xmpp/mamRouter.ts +24 -10
- package/src/networking/xmpp/presenceInRoom.xmpp.ts +91 -68
- package/src/networking/xmpp/roomJoinSweep.ts +412 -0
- package/src/networking/xmpp/sendMediaMessage.xmpp.ts +0 -1
- package/src/networking/xmpp/sendTextMessage.xmpp.ts +0 -1
- package/src/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.ts +0 -1
- package/src/networking/xmppClient.ts +323 -47
- package/src/networking/xmppCredentials.ts +87 -0
- package/src/roomStore/Middleware/jumpThreadMiddleware.ts +163 -0
- package/src/roomStore/Middleware/reactionsMiddleware.tsx +4 -0
- package/src/roomStore/Middleware/unreadMidlleware.tsx +59 -11
- package/src/roomStore/chatSettingsSlice.ts +11 -0
- package/src/roomStore/index.ts +10 -3
- package/src/roomStore/persistence.ts +54 -0
- package/src/roomStore/roomsSlice.ts +547 -65
- package/src/roomStore/safeKey.ts +49 -0
- package/src/roomStore/usersSetCap.ts +37 -0
- package/src/types/models/media.model.ts +4 -0
- package/src/types/models/room.model.ts +18 -5
- package/src/types/models/xmpp.model.ts +15 -1
- package/src/types/types.ts +93 -5
- package/src/version.ts +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ETHORA_CHAT_COMPONENT_VERSION = "26.
|
|
1
|
+
export declare const ETHORA_CHAT_COMPONENT_VERSION = "26.10.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,6BAA6B,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,6BAA6B,YAAY,CAAC"}
|
package/package.json
CHANGED
package/src/assets/icons.tsx
CHANGED
|
@@ -194,6 +194,19 @@ export const MoreIcon = ({ color = '#8C8C8C', ...props }) => (
|
|
|
194
194
|
</Svg>
|
|
195
195
|
);
|
|
196
196
|
|
|
197
|
+
export const DiscoverIcon = ({ color = '#8C8C8C', ...props }) => (
|
|
198
|
+
<Svg width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
|
|
199
|
+
<Circle cx="12" cy="12" r="9" stroke={color} strokeWidth="1.8" />
|
|
200
|
+
<Path
|
|
201
|
+
d="M15.8 8.2L13.6 13.6L8.2 15.8L10.4 10.4L15.8 8.2Z"
|
|
202
|
+
stroke={color}
|
|
203
|
+
strokeWidth="1.6"
|
|
204
|
+
strokeLinejoin="round"
|
|
205
|
+
/>
|
|
206
|
+
<Circle cx="12" cy="12" r="1.1" fill={color} />
|
|
207
|
+
</Svg>
|
|
208
|
+
);
|
|
209
|
+
|
|
197
210
|
export const SearchIcon = ({ color = '#8C8C8C', ...props }) => (
|
|
198
211
|
<Svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
199
212
|
<Path
|
|
@@ -5,10 +5,14 @@ import React, { FC, useMemo } from 'react';
|
|
|
5
5
|
import { ActivityIndicator, View, StyleSheet, Image, Text } from 'react-native';
|
|
6
6
|
import { ProfileImagePlaceholder } from '../MainComponents/ProfileImagePlaceholder';
|
|
7
7
|
import { useChatSettingState } from '../../hooks/useChatSettingState';
|
|
8
|
-
import { BurgerMenuIcon } from '../../assets/icons';
|
|
8
|
+
import { BurgerMenuIcon, DiscoverIcon } from '../../assets/icons';
|
|
9
9
|
import Button from '../styled/Button';
|
|
10
10
|
import { useTheme } from '../../hooks/useTheme';
|
|
11
11
|
import { useT } from '../../i18n/useT';
|
|
12
|
+
import { useDispatch } from 'react-redux';
|
|
13
|
+
import { setActiveModal } from '../../roomStore/chatSettingsSlice';
|
|
14
|
+
import { MODAL_TYPES } from '../../helpers/constants/MODAL_TYPES';
|
|
15
|
+
import { showsStandaloneDiscoverButton } from '../../helpers/publicChatsEntry';
|
|
12
16
|
import { useConnectionLabel } from '../../hooks/useConnectionLabel';
|
|
13
17
|
import { resolveHeaderHeight } from '../../helpers/headerLayout';
|
|
14
18
|
|
|
@@ -23,6 +27,7 @@ export const HeaderRoomList: FC<HeaderRoomListProps> = ({ setDrawerOpen }) => {
|
|
|
23
27
|
const { config, user, selectedUser } = useChatSettingState();
|
|
24
28
|
const theme = useTheme();
|
|
25
29
|
const t = useT();
|
|
30
|
+
const dispatch = useDispatch();
|
|
26
31
|
const connectionLabel = useConnectionLabel();
|
|
27
32
|
const insets = useSafeAreaInsets();
|
|
28
33
|
const topInset = config?.headerLayout?.safeAreaTop ? insets.top : 0;
|
|
@@ -100,6 +105,16 @@ export const HeaderRoomList: FC<HeaderRoomListProps> = ({ setDrawerOpen }) => {
|
|
|
100
105
|
)}
|
|
101
106
|
</View>
|
|
102
107
|
<View style={styles.rightContainer}>
|
|
108
|
+
{showsStandaloneDiscoverButton(config) && (
|
|
109
|
+
<Button
|
|
110
|
+
testID="room-list-discover"
|
|
111
|
+
style={styles.menuButton}
|
|
112
|
+
unstyled
|
|
113
|
+
EndIcon={<DiscoverIcon color={theme.icon} />}
|
|
114
|
+
onPress={() => dispatch(setActiveModal(MODAL_TYPES.PUBLIC_CHATS))}
|
|
115
|
+
accessibilityLabel={t('publicChats.title')}
|
|
116
|
+
/>
|
|
117
|
+
)}
|
|
103
118
|
<ProfileImagePlaceholder
|
|
104
119
|
icon={modalUser?.profileImage ?? null}
|
|
105
120
|
name={modalUser?.name ?? modalUser?.firstName}
|
|
@@ -152,8 +167,10 @@ const styles = StyleSheet.create({
|
|
|
152
167
|
justifyContent: 'center',
|
|
153
168
|
},
|
|
154
169
|
rightContainer: {
|
|
155
|
-
|
|
156
|
-
alignItems: '
|
|
157
|
-
justifyContent: '
|
|
170
|
+
flexDirection: 'row',
|
|
171
|
+
alignItems: 'center',
|
|
172
|
+
justifyContent: 'flex-end',
|
|
173
|
+
gap: 4,
|
|
174
|
+
minWidth: 44,
|
|
158
175
|
},
|
|
159
176
|
});
|
|
@@ -5,8 +5,11 @@ import {
|
|
|
5
5
|
View,
|
|
6
6
|
TouchableOpacity,
|
|
7
7
|
TextInputProps,
|
|
8
|
+
Text,
|
|
9
|
+
StyleSheet,
|
|
8
10
|
} from 'react-native';
|
|
9
11
|
import { useTheme } from '../../hooks/useTheme';
|
|
12
|
+
import { useT } from '../../i18n/useT';
|
|
10
13
|
|
|
11
14
|
const shouldForwardProp = (prop: string) =>
|
|
12
15
|
prop !== 'animated' && prop !== 'expanded' && prop !== 'direction';
|
|
@@ -71,6 +74,17 @@ interface SearchInputProps extends TextInputProps {
|
|
|
71
74
|
value: string;
|
|
72
75
|
}
|
|
73
76
|
|
|
77
|
+
const clearStyles = StyleSheet.create({
|
|
78
|
+
button: {
|
|
79
|
+
width: 28,
|
|
80
|
+
height: 28,
|
|
81
|
+
marginLeft: 4,
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
justifyContent: 'center',
|
|
84
|
+
},
|
|
85
|
+
glyph: { fontSize: 22, lineHeight: 24 },
|
|
86
|
+
});
|
|
87
|
+
|
|
74
88
|
const SearchInput: React.FC<SearchInputProps> = ({
|
|
75
89
|
icon,
|
|
76
90
|
animated = false,
|
|
@@ -79,6 +93,7 @@ const SearchInput: React.FC<SearchInputProps> = ({
|
|
|
79
93
|
...props
|
|
80
94
|
}) => {
|
|
81
95
|
const theme = useTheme();
|
|
96
|
+
const t = useT();
|
|
82
97
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
83
98
|
const [isTyping, setIsTyping] = useState(false);
|
|
84
99
|
const inputRef = useRef<TextInput | null>(null);
|
|
@@ -134,6 +149,24 @@ const SearchInput: React.FC<SearchInputProps> = ({
|
|
|
134
149
|
keyboardAppearance={theme.dark ? 'dark' : 'light'}
|
|
135
150
|
{...props}
|
|
136
151
|
/>
|
|
152
|
+
{props.value ? (
|
|
153
|
+
<TouchableOpacity
|
|
154
|
+
testID="search-clear"
|
|
155
|
+
accessibilityRole="button"
|
|
156
|
+
accessibilityLabel={t('search.clear')}
|
|
157
|
+
hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}
|
|
158
|
+
onPress={() => {
|
|
159
|
+
props.onChangeText?.('');
|
|
160
|
+
setIsTyping(false);
|
|
161
|
+
inputRef.current?.focus();
|
|
162
|
+
}}
|
|
163
|
+
style={clearStyles.button}
|
|
164
|
+
>
|
|
165
|
+
<Text style={[clearStyles.glyph, { color: theme.textMuted }]}>
|
|
166
|
+
{'\u00D7'}
|
|
167
|
+
</Text>
|
|
168
|
+
</TouchableOpacity>
|
|
169
|
+
) : null}
|
|
137
170
|
</SearchInputWrapper>
|
|
138
171
|
);
|
|
139
172
|
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Pressable,
|
|
4
|
+
ScrollView,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
Text,
|
|
7
|
+
View,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
10
|
+
import { RootState } from '../../roomStore';
|
|
11
|
+
import { clearArchivedMessage } from '../../roomStore/roomsSlice';
|
|
12
|
+
import { useT } from '../../i18n/useT';
|
|
13
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
14
|
+
|
|
15
|
+
const formatWhen = (iso: string): string => {
|
|
16
|
+
const date = new Date(iso);
|
|
17
|
+
if (Number.isNaN(date.getTime())) {return '';}
|
|
18
|
+
try {
|
|
19
|
+
return date.toLocaleString();
|
|
20
|
+
} catch {
|
|
21
|
+
return date.toISOString();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The message a search hit points at, shown when the transcript cannot reach
|
|
27
|
+
* it (the search archive is deeper than the chat's own history). It sits over
|
|
28
|
+
* the conversation of the room it came from, so it needs no navigation and
|
|
29
|
+
* says what the message is instead of reporting that it was not found.
|
|
30
|
+
*/
|
|
31
|
+
const ArchivedMessageCard: React.FC<{ roomJID: string }> = ({ roomJID }) => {
|
|
32
|
+
const t = useT();
|
|
33
|
+
const theme = useTheme();
|
|
34
|
+
const dispatch = useDispatch();
|
|
35
|
+
const message = useSelector(
|
|
36
|
+
(state: RootState) => state.rooms.archivedMessage
|
|
37
|
+
);
|
|
38
|
+
const visible = Boolean(message && message.roomJID === roomJID);
|
|
39
|
+
|
|
40
|
+
// Gone with the conversation it belongs to.
|
|
41
|
+
useEffect(
|
|
42
|
+
() => () => {
|
|
43
|
+
dispatch(clearArchivedMessage());
|
|
44
|
+
},
|
|
45
|
+
[dispatch]
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
if (!visible || !message) {return null;}
|
|
49
|
+
|
|
50
|
+
const close = () => dispatch(clearArchivedMessage());
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Pressable
|
|
54
|
+
testID="archived-message-card"
|
|
55
|
+
style={[styles.scrim, { backgroundColor: theme.overlay }]}
|
|
56
|
+
onPress={close}
|
|
57
|
+
accessibilityRole="button"
|
|
58
|
+
accessibilityLabel={t('action.close')}
|
|
59
|
+
>
|
|
60
|
+
{/* A tap on the card itself must not close it (text stays selectable). */}
|
|
61
|
+
<Pressable
|
|
62
|
+
style={[
|
|
63
|
+
styles.card,
|
|
64
|
+
{ backgroundColor: theme.surface, shadowColor: theme.shadow },
|
|
65
|
+
]}
|
|
66
|
+
onPress={() => undefined}
|
|
67
|
+
accessibilityRole="alert"
|
|
68
|
+
accessibilityLabel={t('search.messages.archivedTitle')}
|
|
69
|
+
>
|
|
70
|
+
<View>
|
|
71
|
+
<Text style={[styles.sender, { color: theme.text }]}>
|
|
72
|
+
{message.sender}
|
|
73
|
+
</Text>
|
|
74
|
+
<Text style={[styles.meta, { color: theme.textSecondary }]}>
|
|
75
|
+
{formatWhen(message.createdAt)}
|
|
76
|
+
</Text>
|
|
77
|
+
</View>
|
|
78
|
+
<ScrollView
|
|
79
|
+
style={[styles.bodyBox, { backgroundColor: theme.surfaceSecondary }]}
|
|
80
|
+
>
|
|
81
|
+
<Text selectable style={[styles.body, { color: theme.text }]}>
|
|
82
|
+
{message.body}
|
|
83
|
+
</Text>
|
|
84
|
+
</ScrollView>
|
|
85
|
+
<Text style={[styles.note, { color: theme.textSecondary }]}>
|
|
86
|
+
{t('search.messages.archivedNote')}
|
|
87
|
+
</Text>
|
|
88
|
+
<Pressable
|
|
89
|
+
testID="archived-message-close"
|
|
90
|
+
onPress={close}
|
|
91
|
+
style={[styles.close, { borderColor: theme.border }]}
|
|
92
|
+
accessibilityRole="button"
|
|
93
|
+
>
|
|
94
|
+
<Text style={{ color: theme.text }}>{t('action.close')}</Text>
|
|
95
|
+
</Pressable>
|
|
96
|
+
</Pressable>
|
|
97
|
+
</Pressable>
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const styles = StyleSheet.create({
|
|
102
|
+
scrim: {
|
|
103
|
+
position: 'absolute',
|
|
104
|
+
top: 0,
|
|
105
|
+
left: 0,
|
|
106
|
+
right: 0,
|
|
107
|
+
bottom: 0,
|
|
108
|
+
zIndex: 5,
|
|
109
|
+
alignItems: 'center',
|
|
110
|
+
justifyContent: 'center',
|
|
111
|
+
padding: 16,
|
|
112
|
+
},
|
|
113
|
+
card: {
|
|
114
|
+
width: '100%',
|
|
115
|
+
maxWidth: 460,
|
|
116
|
+
maxHeight: '100%',
|
|
117
|
+
padding: 16,
|
|
118
|
+
borderRadius: 16,
|
|
119
|
+
gap: 12,
|
|
120
|
+
shadowOffset: { width: 0, height: 8 },
|
|
121
|
+
shadowOpacity: 0.18,
|
|
122
|
+
shadowRadius: 24,
|
|
123
|
+
elevation: 8,
|
|
124
|
+
},
|
|
125
|
+
sender: { fontSize: 16, fontWeight: '600' },
|
|
126
|
+
meta: { fontSize: 12 },
|
|
127
|
+
bodyBox: { padding: 12, borderRadius: 12, maxHeight: 280 },
|
|
128
|
+
body: { fontSize: 14, lineHeight: 21 },
|
|
129
|
+
note: { fontSize: 12 },
|
|
130
|
+
close: {
|
|
131
|
+
alignSelf: 'flex-end',
|
|
132
|
+
paddingVertical: 6,
|
|
133
|
+
paddingHorizontal: 16,
|
|
134
|
+
borderWidth: 1,
|
|
135
|
+
borderRadius: 999,
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
export default ArchivedMessageCard;
|
|
@@ -16,6 +16,7 @@ import Button from '../styled/Button';
|
|
|
16
16
|
import { BackIcon, BurgerMenuIcon, LockIcon } from '../../assets/icons';
|
|
17
17
|
import { CallButtons } from '../VideoCalls/CallButtons';
|
|
18
18
|
import { LanguageSelectorButton } from './LanguageSelectorButton';
|
|
19
|
+
import { MessageSearchButton } from './MessageSearchButton';
|
|
19
20
|
import { useDispatch, useSelector, useStore } from 'react-redux';
|
|
20
21
|
import type { RootState } from '../../roomStore';
|
|
21
22
|
import Composing from '../styled/StyledInputComponents/Composing';
|
|
@@ -37,6 +38,7 @@ import { useTheme } from '../../hooks/useTheme';
|
|
|
37
38
|
import { resolveHeaderHeight } from '../../helpers/headerLayout';
|
|
38
39
|
import { getElementFont } from '../../helpers/getElementFont';
|
|
39
40
|
import { useT } from '../../i18n/useT';
|
|
41
|
+
import { getRoomUserCount } from '../../helpers/roomUserCount';
|
|
40
42
|
import { useConnectionLabel } from '../../hooks/useConnectionLabel';
|
|
41
43
|
|
|
42
44
|
interface ChatHeaderProps {
|
|
@@ -68,6 +70,10 @@ const ChatHeader: React.FC<ChatHeaderProps> = ({
|
|
|
68
70
|
const t = useT();
|
|
69
71
|
const connectionLabel = useConnectionLabel();
|
|
70
72
|
|
|
73
|
+
// usersCnt is the room's true total, members[] can be a truncated page of
|
|
74
|
+
// a big room: show the larger of the two.
|
|
75
|
+
const userCount = getRoomUserCount(roomState || currentRoom);
|
|
76
|
+
|
|
71
77
|
const handleChangeChat = (chat: IRoom) => {
|
|
72
78
|
dispatch(setCurrentRoom({ roomJID: chat.jid }));
|
|
73
79
|
dispatch(setIsLoading({ chatJID: chat.jid, loading: true }));
|
|
@@ -201,7 +207,7 @@ const ChatHeader: React.FC<ChatHeaderProps> = ({
|
|
|
201
207
|
</View>
|
|
202
208
|
)}
|
|
203
209
|
</View>
|
|
204
|
-
<View>
|
|
210
|
+
<View style={styles.subtitleBox}>
|
|
205
211
|
{connectionLabel ? (
|
|
206
212
|
// The session's state takes the subtitle's place: no
|
|
207
213
|
// typing or member count is current while it is off.
|
|
@@ -219,6 +225,10 @@ const ChatHeader: React.FC<ChatHeaderProps> = ({
|
|
|
219
225
|
<Composing usersTyping={currentRoom?.composingList} />
|
|
220
226
|
) : config?.disableUserCount ? undefined : (
|
|
221
227
|
<ChatContainerHeaderLabel
|
|
228
|
+
// One line, ellipsized: a long count in a narrow header
|
|
229
|
+
// must not wrap and push the header buttons around.
|
|
230
|
+
numberOfLines={1}
|
|
231
|
+
ellipsizeMode="tail"
|
|
222
232
|
style={[
|
|
223
233
|
styles.subLabel,
|
|
224
234
|
{ color: theme.textSecondary },
|
|
@@ -227,10 +237,10 @@ const ChatHeader: React.FC<ChatHeaderProps> = ({
|
|
|
227
237
|
>
|
|
228
238
|
<Text>
|
|
229
239
|
{t(
|
|
230
|
-
|
|
240
|
+
userCount === 1
|
|
231
241
|
? 'header.userCountSingular'
|
|
232
242
|
: 'header.userCountPlural',
|
|
233
|
-
{ count:
|
|
243
|
+
{ count: userCount }
|
|
234
244
|
)}
|
|
235
245
|
</Text>
|
|
236
246
|
</ChatContainerHeaderLabel>
|
|
@@ -243,6 +253,7 @@ const ChatHeader: React.FC<ChatHeaderProps> = ({
|
|
|
243
253
|
<View style={styles.rightContainer}>
|
|
244
254
|
{/* Renders nothing unless config.videoCalls is on and this is a
|
|
245
255
|
1:1 room, so it costs non-call hosts nothing. */}
|
|
256
|
+
<MessageSearchButton />
|
|
246
257
|
<LanguageSelectorButton />
|
|
247
258
|
<CallButtons />
|
|
248
259
|
{!config?.disableChatInfo?.disableRoomMenu && (
|
|
@@ -260,6 +271,11 @@ const styles = StyleSheet.create({
|
|
|
260
271
|
subLabel: {
|
|
261
272
|
color: '#8C8C8C',
|
|
262
273
|
fontSize: 14,
|
|
274
|
+
flexShrink: 1,
|
|
275
|
+
},
|
|
276
|
+
subtitleBox: {
|
|
277
|
+
flexShrink: 1,
|
|
278
|
+
minWidth: 0,
|
|
263
279
|
},
|
|
264
280
|
titleRow: {
|
|
265
281
|
flexDirection: 'row',
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
|
|
3
|
+
import { isJoiningRoom } from '../../helpers/joiningRoom';
|
|
3
4
|
import React, { useState, useEffect, useCallback, useRef } from 'react';
|
|
4
5
|
import { ChatContainer, NonRoomChat } from '../styled/StyledComponents';
|
|
5
6
|
import { useDispatch, useSelector, useStore } from 'react-redux';
|
|
6
7
|
import type { RootState } from '../../roomStore';
|
|
7
8
|
import MessageList from './MessageList';
|
|
9
|
+
import ArchivedMessageCard from './ArchivedMessageCard';
|
|
10
|
+
import { loadRoomHistory } from '../../helpers/loadRoomHistory';
|
|
8
11
|
import SendInput from '../styled/SendInput';
|
|
9
12
|
import {
|
|
13
|
+
clearJumpWindow,
|
|
10
14
|
clearReadBoundary,
|
|
11
15
|
clearVisibleRoom,
|
|
12
16
|
deleteRoomMessage,
|
|
@@ -124,6 +128,9 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
|
|
|
124
128
|
const globalLoading = useSelector(
|
|
125
129
|
(state: RootState) => state.rooms.isLoading,
|
|
126
130
|
);
|
|
131
|
+
const joiningRoomJID = useSelector(
|
|
132
|
+
(state: RootState) => state.rooms.joiningRoomJID,
|
|
133
|
+
);
|
|
127
134
|
const loading = !!activeRoom?.isLoading;
|
|
128
135
|
const e2eeRoom = !!activeRoom?.e2ee;
|
|
129
136
|
const e2eeOn = storeConfig?.e2ee?.enabled === true;
|
|
@@ -183,9 +190,14 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
|
|
|
183
190
|
if (!activeRoomJID) {
|
|
184
191
|
return;
|
|
185
192
|
}
|
|
193
|
+
// Writing into a room means being at its latest messages: leave a
|
|
194
|
+
// jump window (old history) first, so the sent message is in view.
|
|
195
|
+
if (store.getState().rooms.jumpWindow) {
|
|
196
|
+
dispatch(clearJumpWindow());
|
|
197
|
+
}
|
|
186
198
|
sendMs(message, activeRoomJID);
|
|
187
199
|
},
|
|
188
|
-
[activeRoomJID, sendMs]
|
|
200
|
+
[activeRoomJID, sendMs, dispatch]
|
|
189
201
|
);
|
|
190
202
|
|
|
191
203
|
const sendMedia = useCallback(
|
|
@@ -193,33 +205,35 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
|
|
|
193
205
|
// Return the promise so callers can sequence the follow-up
|
|
194
206
|
// text send AFTER the upload finishes (consumer expectation:
|
|
195
207
|
// media first, text second — never interleaved).
|
|
208
|
+
if (store.getState().rooms.jumpWindow) {
|
|
209
|
+
dispatch(clearJumpWindow());
|
|
210
|
+
}
|
|
196
211
|
return sendMessageMedia(data, type, activeRoomJID || '');
|
|
197
212
|
},
|
|
198
|
-
[activeRoomJID],
|
|
213
|
+
[activeRoomJID, dispatch],
|
|
199
214
|
);
|
|
200
215
|
|
|
216
|
+
// One history request per room at a time. Everything the request needs
|
|
217
|
+
// (the room, its cursor, the messages used for the fallback cursor) is read
|
|
218
|
+
// from the store at call time, so a stale render closure can never act on
|
|
219
|
+
// old values.
|
|
220
|
+
const inFlightRoomsRef = useRef<Set<string>>(new Set());
|
|
201
221
|
const loadMoreMessages = useCallback(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
} finally {
|
|
218
|
-
setIsLoadingMore(false);
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
222
|
-
[client?.client?.jid, isLoadingMore, reduxStore],
|
|
222
|
+
(
|
|
223
|
+
chatJID: string,
|
|
224
|
+
max: number,
|
|
225
|
+
idOfMessageBefore?: number
|
|
226
|
+
): Promise<void> =>
|
|
227
|
+
loadRoomHistory({
|
|
228
|
+
client,
|
|
229
|
+
room: store.getState().rooms.rooms?.[chatJID],
|
|
230
|
+
inFlight: inFlightRoomsRef.current,
|
|
231
|
+
chatJID,
|
|
232
|
+
max,
|
|
233
|
+
before: idOfMessageBefore,
|
|
234
|
+
onBusyChange: setIsLoadingMore,
|
|
235
|
+
}),
|
|
236
|
+
[client]
|
|
223
237
|
);
|
|
224
238
|
|
|
225
239
|
const onCloseEdit = () => {
|
|
@@ -349,6 +363,26 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
|
|
|
349
363
|
(configWithEventHandlers || storeConfig || {}) as IConfig,
|
|
350
364
|
);
|
|
351
365
|
|
|
366
|
+
// A join for the requested room is still in flight: the server registers
|
|
367
|
+
// the membership a moment after our presence, so say "joining" with a
|
|
368
|
+
// loader instead of the "choose a chat" placeholder (or the empty-list
|
|
369
|
+
// new-chat screen). Bounded: useRoomInitialization clears the flag when
|
|
370
|
+
// the join and the room-list refresh settle, even if the room never shows.
|
|
371
|
+
if (isJoiningRoom(
|
|
372
|
+
activeRoomJID,
|
|
373
|
+
activeRoom && activeRoomJID ? { [activeRoomJID]: true } : undefined,
|
|
374
|
+
joiningRoomJID
|
|
375
|
+
)) {
|
|
376
|
+
return (
|
|
377
|
+
<View
|
|
378
|
+
testID="chat-room-joining-loader"
|
|
379
|
+
style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}
|
|
380
|
+
>
|
|
381
|
+
<Loader color={configWithEventHandlers?.colors?.primary} />
|
|
382
|
+
</View>
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
|
|
352
386
|
if (!hasRooms && !loading && !globalLoading) {
|
|
353
387
|
return (
|
|
354
388
|
<NonRoomChat>
|
|
@@ -582,6 +616,7 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
|
|
|
582
616
|
/>
|
|
583
617
|
) : (
|
|
584
618
|
<MessageList
|
|
619
|
+
client={client}
|
|
585
620
|
loadMoreMessages={loadMoreMessages}
|
|
586
621
|
CustomMessage={CustomMessageComponent}
|
|
587
622
|
CustomDaySeparator={CustomDaySeparator}
|
|
@@ -594,6 +629,8 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
|
|
|
594
629
|
onReadBoundaryChange={handleReadBoundaryChange}
|
|
595
630
|
/>
|
|
596
631
|
)}
|
|
632
|
+
{/* A search hit that is older than the chat's own history. */}
|
|
633
|
+
<ArchivedMessageCard roomJID={activeRoomJID} />
|
|
597
634
|
</View>
|
|
598
635
|
{editAction && editAction.isEdit && (
|
|
599
636
|
<EditWrapper text={editAction.text || ''} onClose={onCloseEdit} />
|
|
@@ -45,6 +45,7 @@ import {normalizeRoomJid} from '../../helpers/normalizeRoomJid';
|
|
|
45
45
|
import {buildSeedRoom} from '../../helpers/buildSeedRoom';
|
|
46
46
|
import {shallowEqual} from '../../helpers/shallowEqual';
|
|
47
47
|
import {InteractionsOverlayProvider} from '../MessageBubble/InteractionsOverlay';
|
|
48
|
+
import {useJumpThread} from '../../helpers/jumpThread';
|
|
48
49
|
|
|
49
50
|
interface ChatWrapperProps {
|
|
50
51
|
token?: string;
|
|
@@ -123,10 +124,28 @@ const ChatWrapper: FC<ChatWrapperProps> = ({
|
|
|
123
124
|
activeRoomJID ? state.rooms.rooms[activeRoomJID]?.messages : undefined,
|
|
124
125
|
);
|
|
125
126
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
// The thread's parent: the live message flagged active or, when the thread
|
|
128
|
+
// was opened on a message that exists only in a jump window (or that a jump
|
|
129
|
+
// to a thread reply fetched), the window's copy or the one kept by
|
|
130
|
+
// helpers/jumpThread, which outlives the window. Reads the active room's
|
|
131
|
+
// message list (granular), not the whole rooms map.
|
|
132
|
+
const jumpWindow = useSelector((state: RootState) => state.rooms.jumpWindow);
|
|
133
|
+
const jumpThread = useJumpThread();
|
|
134
|
+
const activeMessage = useMemo(() => {
|
|
135
|
+
if (!activeRoomJID) {return undefined;}
|
|
136
|
+
const live = activeRoomMessages?.find(message => message?.activeMessage);
|
|
137
|
+
if (live) {return live;}
|
|
138
|
+
if (jumpWindow && jumpWindow.roomJID === activeRoomJID) {
|
|
139
|
+
const inWindow = jumpWindow.messages.find(
|
|
140
|
+
message => message?.activeMessage,
|
|
141
|
+
);
|
|
142
|
+
if (inWindow) {return inWindow;}
|
|
143
|
+
}
|
|
144
|
+
if (jumpThread?.parent && jumpThread.roomJID === activeRoomJID) {
|
|
145
|
+
return {...jumpThread.parent, activeMessage: true};
|
|
146
|
+
}
|
|
147
|
+
return undefined;
|
|
148
|
+
}, [activeRoomMessages, activeRoomJID, jumpWindow, jumpThread]);
|
|
130
149
|
|
|
131
150
|
const handleChangeChat = (chat: IRoom) => {
|
|
132
151
|
dispatch(setCurrentRoom({roomJID: chat.jid}));
|
|
@@ -189,6 +189,20 @@ const MediaMessage: React.FC<MediaMessageProps> = ({
|
|
|
189
189
|
originalName: (message as any)?.originalName,
|
|
190
190
|
}
|
|
191
191
|
);
|
|
192
|
+
// The sender's own voice note plays from its local file while it
|
|
193
|
+
// uploads, waveform and all — no placeholder card in between.
|
|
194
|
+
if (message?.pending && isAudioPayload && (messageText || location)) {
|
|
195
|
+
return (
|
|
196
|
+
<AudioMessage
|
|
197
|
+
src={messageText || location || ''}
|
|
198
|
+
mimeType={mimeType}
|
|
199
|
+
fileName={displayName}
|
|
200
|
+
duration={(message as any)?.duration}
|
|
201
|
+
waveForm={(message as any)?.waveForm}
|
|
202
|
+
isUser={isUser}
|
|
203
|
+
/>
|
|
204
|
+
);
|
|
205
|
+
}
|
|
192
206
|
if (message?.pending) {
|
|
193
207
|
return (
|
|
194
208
|
<PendingMediaMessage
|
|
@@ -237,6 +251,7 @@ const MediaMessage: React.FC<MediaMessageProps> = ({
|
|
|
237
251
|
originalName={(message as any)?.originalName}
|
|
238
252
|
duration={(message as any)?.duration}
|
|
239
253
|
waveForm={(message as any)?.waveForm}
|
|
254
|
+
isUser={isUser}
|
|
240
255
|
/>
|
|
241
256
|
);
|
|
242
257
|
}
|
|
@@ -249,6 +264,7 @@ const MediaMessage: React.FC<MediaMessageProps> = ({
|
|
|
249
264
|
originalName={(message as any)?.originalName}
|
|
250
265
|
duration={(message as any)?.duration}
|
|
251
266
|
waveForm={(message as any)?.waveForm}
|
|
267
|
+
isUser={isUser}
|
|
252
268
|
/>
|
|
253
269
|
);
|
|
254
270
|
}
|
|
@@ -270,6 +286,7 @@ const MediaMessage: React.FC<MediaMessageProps> = ({
|
|
|
270
286
|
originalName={(message as any)?.originalName}
|
|
271
287
|
duration={(message as any)?.duration}
|
|
272
288
|
waveForm={(message as any)?.waveForm}
|
|
289
|
+
isUser={isUser}
|
|
273
290
|
/>
|
|
274
291
|
);
|
|
275
292
|
}
|