@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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const ethoraLogger: {
|
|
2
|
+
log: (...args: unknown[]) => void;
|
|
3
|
+
info: (...args: unknown[]) => void;
|
|
4
|
+
debug: (...args: unknown[]) => void;
|
|
5
|
+
error: (...args: unknown[]) => void;
|
|
6
|
+
always: (...args: unknown[]) => void;
|
|
7
|
+
/**
|
|
8
|
+
* For failures that must never be silent, whatever the verbose-console
|
|
9
|
+
* setting is.
|
|
10
|
+
*/
|
|
11
|
+
criticalError: (...args: unknown[]) => void;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=ethoraLogger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ethoraLogger.d.ts","sourceRoot":"","sources":["../../../src/helpers/ethoraLogger.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,YAAY;mBACR,OAAO,EAAE;oBAKR,OAAO,EAAE;qBAKR,OAAO,EAAE;qBAKT,OAAO,EAAE;sBAKR,OAAO,EAAE;IAG3B;;;OAGG;6BACsB,OAAO,EAAE;CAGnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUnnamedUsers.d.ts","sourceRoot":"","sources":["../../../src/helpers/getUnnamedUsers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"getUnnamedUsers.d.ts","sourceRoot":"","sources":["../../../src/helpers/getUnnamedUsers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAgB7D,eAAO,MAAM,eAAe,GAAI,UAAU,QAAQ,EAAE,KAAG,KAAK,EAO3D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,cAAc,KAAK,EAAE,KACpB,OAAO,CAAC,UAAU,EAAE,CAYtB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IConfig } from '../types/types';
|
|
2
|
+
export type HistoryPreloadMode = 'staged' | 'all' | 'off';
|
|
3
|
+
export interface ResolvedHistoryPreload {
|
|
4
|
+
/**
|
|
5
|
+
* 'legacy' only when a host explicitly pinned
|
|
6
|
+
* `historyQoS.stagedPreloadEnabled: false`: the old cache catch-up path
|
|
7
|
+
* (updateMessagesTillLast). Everything else resolves to a public mode.
|
|
8
|
+
*/
|
|
9
|
+
mode: HistoryPreloadMode | 'legacy';
|
|
10
|
+
/** Rooms (by recent activity) the background sweep covers. 0 = no cap. */
|
|
11
|
+
topRooms: number;
|
|
12
|
+
concurrency: number;
|
|
13
|
+
firstPassSize: number;
|
|
14
|
+
secondPassSize: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const DEFAULT_PRELOAD_TOP_ROOMS = 8;
|
|
17
|
+
export declare const DEFAULT_PRELOAD_CONCURRENCY = 3;
|
|
18
|
+
export declare const TEASER_ROOM_FACTOR = 4;
|
|
19
|
+
/**
|
|
20
|
+
* One place that turns `config.historyPreload` (and the older
|
|
21
|
+
* `historyQoS.stagedPreload*` / `preloadTopKRooms` names, still honoured)
|
|
22
|
+
* into the numbers the preload sweeps use. Staged preload is the default:
|
|
23
|
+
* the sweep covers the top N rooms, every other room loads when it is opened.
|
|
24
|
+
*/
|
|
25
|
+
export declare const resolveHistoryPreloadConfig: (config?: Pick<IConfig, "historyPreload" | "historyQoS"> | null) => ResolvedHistoryPreload;
|
|
26
|
+
//# sourceMappingURL=historyPreloadConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"historyPreloadConfig.d.ts","sourceRoot":"","sources":["../../../src/helpers/historyPreloadConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAC;AAE1D,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,IAAI,EAAE,kBAAkB,GAAG,QAAQ,CAAC;IACpC,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAG7C,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAOpC;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GACtC,SAAS,IAAI,CAAC,OAAO,EAAE,gBAAgB,GAAG,YAAY,CAAC,GAAG,IAAI,KAC7D,sBA8BF,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import XmppClient from '../networking/xmppClient';
|
|
2
|
+
import { IRoom } from '../types/types';
|
|
2
3
|
interface HistoryPreloadSchedulerOptions {
|
|
3
4
|
client: XmppClient;
|
|
4
5
|
signal?: AbortSignal;
|
|
@@ -10,12 +11,15 @@ interface HistoryPreloadSchedulerOptions {
|
|
|
10
11
|
selectedRoomJid?: string | null;
|
|
11
12
|
defaultRoomJids?: string[];
|
|
12
13
|
forceReload?: boolean;
|
|
14
|
+
completionState?: 'done' | 'partial';
|
|
15
|
+
skipApiPreview?: boolean;
|
|
13
16
|
}
|
|
17
|
+
export declare const hasApiPreview: (room?: IRoom) => boolean;
|
|
14
18
|
/**
|
|
15
|
-
* Background-loads message history
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
+
* Background-loads message history into the redux store. Rooms are picked by
|
|
20
|
+
* selected/default rooms first, then by recent activity; a room the user
|
|
21
|
+
* opens while the sweep runs jumps the queue. Coalesces with the XMPP
|
|
22
|
+
* client's MAM queue (so the active-room scroll fetch wins).
|
|
19
23
|
*/
|
|
20
24
|
export declare const runHistoryPreloadScheduler: (options: HistoryPreloadSchedulerOptions) => Promise<void>;
|
|
21
25
|
export default runHistoryPreloadScheduler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"historyPreloadScheduler.d.ts","sourceRoot":"","sources":["../../../src/helpers/historyPreloadScheduler.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"historyPreloadScheduler.d.ts","sourceRoot":"","sources":["../../../src/helpers/historyPreloadScheduler.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAOlD,OAAO,EAAY,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAMjD,UAAU,8BAA8B;IACtC,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IAItB,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAKrC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA+FD,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,KAAG,OAGE,CAAC;AAwBhD;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAS,8BAA8B,KACtC,OAAO,CAAC,IAAI,CAiBd,CAAC;AAoYF,eAAe,0BAA0B,CAAC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import XmppClient from '../networking/xmppClient';
|
|
2
2
|
import { IRoom } from '../types/types';
|
|
3
|
+
/**
|
|
4
|
+
* Joins the known rooms and subscribes them for push. Callers should NOT
|
|
5
|
+
* await it on a path that gates first paint: with a real XmppClient the
|
|
6
|
+
* joins are the shared background sweep (open room first, then recent
|
|
7
|
+
* activity, bounded concurrency), started here and not waited for. Only a
|
|
8
|
+
* bare client without the sweep falls back to joining every room at once.
|
|
9
|
+
*/
|
|
3
10
|
export declare const initRoomsPresence: (client: XmppClient, rooms: {
|
|
4
11
|
[jid: string]: IRoom;
|
|
5
12
|
}) => Promise<null | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initRoomsPresence.d.ts","sourceRoot":"","sources":["../../../src/helpers/initRoomsPresence.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"initRoomsPresence.d.ts","sourceRoot":"","sources":["../../../src/helpers/initRoomsPresence.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAKvC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,UAAU,EAClB,OAAO;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAA;CAAE,8BA6BhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertMessageWithDelimiter.d.ts","sourceRoot":"","sources":["../../../src/helpers/insertMessageWithDelimiter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"insertMessageWithDelimiter.d.ts","sourceRoot":"","sources":["../../../src/helpers/insertMessageWithDelimiter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AA+D1C,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,EACjC,OAAO,EAAE,QAAQ,EACjB,mBAAmB,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;CAAE,GAAG,IAAI,QAiHhE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const isLikelyMucJid: (jid: unknown) => jid is string;
|
|
2
|
+
/**
|
|
3
|
+
* True when `value` can be used as the localpart of a MUC room JID, i.e. it is
|
|
4
|
+
* safe to build `${value}@conference.<host>` from it.
|
|
5
|
+
*
|
|
6
|
+
* Ethora room localparts are always `<appId>_<roomId>`, so the underscore is a
|
|
7
|
+
* reliable discriminator against slice keys, plain flags and stray strings.
|
|
8
|
+
* Callers that already hold a full JID should use `isLikelyMucJid` instead.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isLikelyRoomLocalpart: (value: unknown) => value is string;
|
|
11
|
+
/**
|
|
12
|
+
* Normalise a room reference into a full MUC JID, or return null when the
|
|
13
|
+
* input cannot be one. Use at every point that would otherwise blindly do
|
|
14
|
+
* `chatJID.includes('@') ? chatJID : chatJID + '@' + conference`: that pattern
|
|
15
|
+
* silently manufactures a valid-looking JID out of any garbage handed to it,
|
|
16
|
+
* which is how slice keys ended up being joined as rooms.
|
|
17
|
+
*/
|
|
18
|
+
export declare const toRoomJid: (chatJID: unknown, conference: string | undefined) => string | null;
|
|
19
|
+
//# sourceMappingURL=isLikelyMucJid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isLikelyMucJid.d.ts","sourceRoot":"","sources":["../../../src/helpers/isLikelyMucJid.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,GAAI,KAAK,OAAO,KAAG,GAAG,IAAI,MAMpD,CAAC;AAwBF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAM/D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,GACpB,SAAS,OAAO,EAChB,YAAY,MAAM,GAAG,SAAS,KAC7B,MAAM,GAAG,IAMX,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IConfig } from '../types/types';
|
|
2
|
+
/**
|
|
3
|
+
* Single gate for every message search entry point (header button, chat
|
|
4
|
+
* profile row, the search screen and its request).
|
|
5
|
+
*
|
|
6
|
+
* Search is opt-in: it needs `enableMessageSearch: true` and an `appId` (the
|
|
7
|
+
* archive it queries is scoped by app). The deprecated `disableMessageSearch`
|
|
8
|
+
* is still honoured as a hard off.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isMessageSearchEnabled: (config?: Pick<IConfig, "enableMessageSearch" | "disableMessageSearch" | "appId"> | null) => boolean;
|
|
11
|
+
export default isMessageSearchEnabled;
|
|
12
|
+
//# sourceMappingURL=isMessageSearchEnabled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isMessageSearchEnabled.d.ts","sourceRoot":"","sources":["../../../src/helpers/isMessageSearchEnabled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,IAAI,CAAC,OAAO,EAAE,qBAAqB,GAAG,sBAAsB,GAAG,OAAO,CAAC,GAAG,IAAI,KACtF,OAG4B,CAAC;AAEhC,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True while the pane should say "joining" instead of "choose a chat": the
|
|
3
|
+
* requested room is not in the list yet and a join for exactly that room is
|
|
4
|
+
* in flight (see useRoomInitialization).
|
|
5
|
+
*/
|
|
6
|
+
export declare const isJoiningRoom: (activeRoomJID: string | null | undefined, roomsList: Record<string, unknown> | undefined, joiningRoomJID: string | null | undefined) => boolean;
|
|
7
|
+
//# sourceMappingURL=joiningRoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joiningRoom.d.ts","sourceRoot":"","sources":["../../../src/helpers/joiningRoom.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,eAAe,MAAM,GAAG,IAAI,GAAG,SAAS,EACxC,WAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC9C,gBAAgB,MAAM,GAAG,IAAI,GAAG,SAAS,KACxC,OAG+B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { IMessage } from '../types/types';
|
|
2
|
+
import { findMessageIndex } from './jumpToMessage';
|
|
3
|
+
export { findMessageIndex };
|
|
4
|
+
/** How long a jump request may stay pending before it is dropped. */
|
|
5
|
+
export declare const JUMP_TTL_MS = 60000;
|
|
6
|
+
/**
|
|
7
|
+
* Where a jump to a thread REPLY lands, and the thread panel's parent message
|
|
8
|
+
* when that message is not in the room's live list.
|
|
9
|
+
*
|
|
10
|
+
* Replies never appear in the main list (it hides them unless they are also
|
|
11
|
+
* shown in the channel), so a jump to one has to open its parent's thread and
|
|
12
|
+
* highlight the reply there. Two things have to be remembered for that:
|
|
13
|
+
* - which list owns the jump: `at` is the pending request this entry serves,
|
|
14
|
+
* `parentId` the thread that owns it. The main list stays inert for a jump
|
|
15
|
+
* that has an owner thread, and a thread list stays inert for any jump that
|
|
16
|
+
* is not its own (see useJumpToMessage);
|
|
17
|
+
* - the parent and the replies when they exist only in a jump window or came
|
|
18
|
+
* from a separate fetch: the thread panel reads them from here, so it does
|
|
19
|
+
* not depend on the window that found them still being on screen.
|
|
20
|
+
*
|
|
21
|
+
* Kept outside redux on purpose: the room slice's thread flag lives on
|
|
22
|
+
* messages of the live list, which is exactly what these messages are not in.
|
|
23
|
+
*/
|
|
24
|
+
export interface JumpThreadState {
|
|
25
|
+
roomJID: string;
|
|
26
|
+
parentId: string;
|
|
27
|
+
/** The pending request this entry serves; null for a thread opened by hand. */
|
|
28
|
+
at: number | null;
|
|
29
|
+
/** Set only when the parent is not in the room's live messages. */
|
|
30
|
+
parent: IMessage | null;
|
|
31
|
+
/** Replies known to belong to the thread beyond the live list. */
|
|
32
|
+
replies: IMessage[];
|
|
33
|
+
}
|
|
34
|
+
export declare const getJumpThread: () => JumpThreadState | null;
|
|
35
|
+
export declare const setJumpThread: (next: JumpThreadState | null) => void;
|
|
36
|
+
export declare const clearJumpThread: () => void;
|
|
37
|
+
export declare const subscribeJumpThread: (listener: () => void) => (() => void);
|
|
38
|
+
export declare const useJumpThread: () => JumpThreadState | null;
|
|
39
|
+
/** The thread that owns the jump `at`, or null when the main list does. */
|
|
40
|
+
export declare const ownerThreadFor: (thread: JumpThreadState | null, at: number | undefined) => string | null;
|
|
41
|
+
/**
|
|
42
|
+
* The parent id of a message that is a thread reply and nothing else, or null:
|
|
43
|
+
* a reply also shown in the channel is in the main list, so it needs no thread.
|
|
44
|
+
*/
|
|
45
|
+
export declare const replyParentId: (message: IMessage) => string | null;
|
|
46
|
+
/** `a` then `b`, one entry per message id, oldest first. */
|
|
47
|
+
export declare const mergeById: (a: IMessage[], b: IMessage[]) => IMessage[];
|
|
48
|
+
//# sourceMappingURL=jumpThread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jumpThread.d.ts","sourceRoot":"","sources":["../../../src/helpers/jumpThread.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,qEAAqE;AACrE,eAAO,MAAM,WAAW,QAAS,CAAC;AAElC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,mEAAmE;IACnE,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;IACxB,kEAAkE;IAClE,OAAO,EAAE,QAAQ,EAAE,CAAC;CACrB;AAOD,eAAO,MAAM,aAAa,QAAO,eAAe,GAAG,IAAa,CAAC;AAEjE,eAAO,MAAM,aAAa,GAAI,MAAM,eAAe,GAAG,IAAI,KAAG,IAG5D,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,IAIlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAKrE,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,eAAe,GAAG,IACsB,CAAC;AAE1E,2EAA2E;AAC3E,eAAO,MAAM,cAAc,GACzB,QAAQ,eAAe,GAAG,IAAI,EAC9B,IAAI,MAAM,GAAG,SAAS,KACrB,MAAM,GAAG,IAC6D,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS,QAAQ,KAAG,MAAM,GAAG,IAK1D,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,SAAS,GAAI,GAAG,QAAQ,EAAE,EAAE,GAAG,QAAQ,EAAE,KAAG,QAAQ,EAchE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IMessage } from '../types/types';
|
|
2
|
+
export declare const CONTENT_MATCH_WINDOW_MS = 5000;
|
|
3
|
+
/**
|
|
4
|
+
* Index of the message a jump names.
|
|
5
|
+
*
|
|
6
|
+
* By id first (message.id is the MAM stanza id for history, xmppId the client
|
|
7
|
+
* message id). When the request has no id at all, which is common for archive
|
|
8
|
+
* rows, by content: same text, sent within a few seconds of the same time.
|
|
9
|
+
*/
|
|
10
|
+
export declare const findMessageIndex: (messages: IMessage[], ids: string[], content?: {
|
|
11
|
+
createdAt?: string;
|
|
12
|
+
body?: string;
|
|
13
|
+
}) => number;
|
|
14
|
+
export declare const MAX_SCROLL_RETRIES = 4;
|
|
15
|
+
/**
|
|
16
|
+
* FlatList only knows the position of rows it has measured, so
|
|
17
|
+
* scrollToIndex fails for a row far from the rendered window. The usual
|
|
18
|
+
* remedy: scroll to an estimated offset (which renders that region), then
|
|
19
|
+
* try scrollToIndex again. Returns the offset to estimate to, or null once
|
|
20
|
+
* the retry budget is spent.
|
|
21
|
+
*/
|
|
22
|
+
export declare const scrollRetryOffset: (info: {
|
|
23
|
+
index: number;
|
|
24
|
+
averageItemLength: number;
|
|
25
|
+
}, attempt: number) => number | null;
|
|
26
|
+
//# sourceMappingURL=jumpToMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jumpToMessage.d.ts","sourceRoot":"","sources":["../../../src/helpers/jumpToMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAK/C,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,QAAQ,EAAE,EACpB,KAAK,MAAM,EAAE,EACb,UAAU;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,KAC9C,MAqBF,CAAC;AAEF,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,MAAM;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,EAClD,SAAS,MAAM,KACd,MAAM,GAAG,IAGX,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { HistoryWindowPage } from '../networking/xmppClient';
|
|
2
|
+
import type { JumpWindow } from '../roomStore/roomsSlice';
|
|
3
|
+
import { IMessage } from '../types/types';
|
|
4
|
+
/** Messages shown above / below the target when a window opens (tunable). */
|
|
5
|
+
export declare const JUMP_WINDOW_BEFORE = 10;
|
|
6
|
+
export declare const JUMP_WINDOW_AFTER = 10;
|
|
7
|
+
/** Page size for loading more once the reader scrolls toward either edge. */
|
|
8
|
+
export declare const JUMP_WINDOW_PAGE = 20;
|
|
9
|
+
/** The slice of the XMPP client the window helpers need. */
|
|
10
|
+
export interface HistoryWindowClient {
|
|
11
|
+
getHistoryWindow: (chatJID: string, max: number, cursor: {
|
|
12
|
+
before?: number;
|
|
13
|
+
after?: number;
|
|
14
|
+
start?: string;
|
|
15
|
+
end?: string;
|
|
16
|
+
}) => Promise<HistoryWindowPage>;
|
|
17
|
+
}
|
|
18
|
+
export type JumpWindowResult =
|
|
19
|
+
/** The window around the target is ready to be shown. */
|
|
20
|
+
{
|
|
21
|
+
status: 'found';
|
|
22
|
+
window: JumpWindow;
|
|
23
|
+
}
|
|
24
|
+
/** The server answered, and the target is not in the archive. */
|
|
25
|
+
| {
|
|
26
|
+
status: 'missing';
|
|
27
|
+
}
|
|
28
|
+
/** No usable id, or a request failed: use the paging path instead. */
|
|
29
|
+
| {
|
|
30
|
+
status: 'unavailable';
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* How far apart the archive's timestamp and the transcript's may be for the
|
|
34
|
+
* same message. They are recorded by different components, so they are not
|
|
35
|
+
* identical, but never more than a moment apart.
|
|
36
|
+
*/
|
|
37
|
+
export declare const CONTENT_MATCH_WINDOW_MS = 5000;
|
|
38
|
+
/** What a hit with no archive id can be located by. */
|
|
39
|
+
export interface JumpContent {
|
|
40
|
+
createdAt?: string;
|
|
41
|
+
body?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const mamIdCandidates: (ids: string[]) => string[];
|
|
44
|
+
/**
|
|
45
|
+
* Fetches about JUMP_WINDOW_BEFORE messages before the target, the target and
|
|
46
|
+
* about JUMP_WINDOW_AFTER after it: two MAM queries in parallel (the target
|
|
47
|
+
* itself comes with the "after" page, asked from one microsecond before it).
|
|
48
|
+
* Nothing is written to the store here.
|
|
49
|
+
*/
|
|
50
|
+
export declare function loadJumpWindow(client: HistoryWindowClient, roomJID: string, ids: string[], content?: JumpContent): Promise<JumpWindowResult>;
|
|
51
|
+
/**
|
|
52
|
+
* For a hit with no usable archive id (older archive documents carry neither a
|
|
53
|
+
* stanza id nor a message id): ask the server for the rows within a few
|
|
54
|
+
* seconds of its timestamp (MAM start/end filter), find the one with the same
|
|
55
|
+
* text, and continue exactly as the id-based window does with that row's id.
|
|
56
|
+
* The server's answer is final: 'missing' only when it said the range holds no
|
|
57
|
+
* such row.
|
|
58
|
+
*/
|
|
59
|
+
export declare function loadJumpWindowByTime(client: HistoryWindowClient, roomJID: string, content: JumpContent): Promise<JumpWindowResult>;
|
|
60
|
+
export interface OlderWindowPage {
|
|
61
|
+
messages: IMessage[];
|
|
62
|
+
olderCursor: number | null;
|
|
63
|
+
hasOlder: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface NewerWindowPage {
|
|
66
|
+
messages: IMessage[];
|
|
67
|
+
newerCursor: number | null;
|
|
68
|
+
hasNewer: boolean;
|
|
69
|
+
}
|
|
70
|
+
/** The page above the window; null when the request failed. */
|
|
71
|
+
export declare function loadOlderWindowPage(client: HistoryWindowClient, window: JumpWindow): Promise<OlderWindowPage | null>;
|
|
72
|
+
/** The page below the window; null when the request failed. */
|
|
73
|
+
export declare function loadNewerWindowPage(client: HistoryWindowClient, window: JumpWindow): Promise<NewerWindowPage | null>;
|
|
74
|
+
//# sourceMappingURL=jumpWindow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jumpWindow.d.ts","sourceRoot":"","sources":["../../../src/helpers/jumpWindow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,4DAA4D;AAC5D,MAAM,WAAW,mBAAmB;IAClC,gBAAgB,EAAE,CAChB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,KACtE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACjC;AAED,MAAM,MAAM,gBAAgB;AAC1B,yDAAyD;AACvD;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE;AACzC,iEAAiE;GAC/D;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE;AACvB,sEAAsE;GACpE;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC;AAK9B;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAM5C,uDAAuD;AACvD,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,EAAE,KAAG,MAAM,EACgB,CAAC;AAEvE;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EAAE,EACb,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,gBAAgB,CAAC,CA4C3B;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAuC3B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,+DAA+D;AAC/D,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAejC;AAED,+DAA+D;AAC/D,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAcjC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { IRoom } from '../types/types';
|
|
2
|
+
/** The slice of the XMPP client the history loader needs. */
|
|
3
|
+
export interface HistoryPageClient {
|
|
4
|
+
getHistoryStanza: (chatJID: string, max: number, before?: number, id?: string, options?: {
|
|
5
|
+
source?: 'active' | 'send_ack' | 'background' | 'default';
|
|
6
|
+
}) => Promise<unknown>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Where the next page of older history starts when the caller names no
|
|
10
|
+
* anchor: the server's own paging cursor, or the oldest message that carries a
|
|
11
|
+
* numeric archive id, whichever is older. Never a position in the message
|
|
12
|
+
* list: a page made only of receipts or reactions adds nothing to it, so a
|
|
13
|
+
* position keeps pointing at the same message and paging stalls.
|
|
14
|
+
*/
|
|
15
|
+
export declare const resolveHistoryBefore: (room: Pick<IRoom, "messages" | "messageStats"> | undefined, explicit?: number) => number | undefined;
|
|
16
|
+
export interface LoadRoomHistoryParams {
|
|
17
|
+
client: HistoryPageClient | null | undefined;
|
|
18
|
+
/** The room as it is in the store NOW (read at call time, not from a render). */
|
|
19
|
+
room: IRoom | undefined;
|
|
20
|
+
/** Rooms with a request in flight: one request per room at a time. */
|
|
21
|
+
inFlight: Set<string>;
|
|
22
|
+
chatJID: string;
|
|
23
|
+
max: number;
|
|
24
|
+
before?: number;
|
|
25
|
+
/** Told when the first request starts and when the last one ends. */
|
|
26
|
+
onBusyChange?: (busy: boolean) => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* One page of older history for a room. Always settles and never rejects: a
|
|
30
|
+
* failed page must not leave the room blocked or reject into the caller's
|
|
31
|
+
* chain. Does nothing for a room that is complete, unknown, or already loading.
|
|
32
|
+
*/
|
|
33
|
+
export declare function loadRoomHistory({ client, room, inFlight, chatJID, max, before, onBusyChange, }: LoadRoomHistoryParams): Promise<void>;
|
|
34
|
+
//# sourceMappingURL=loadRoomHistory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadRoomHistory.d.ts","sourceRoot":"","sources":["../../../src/helpers/loadRoomHistory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,6DAA6D;AAC7D,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,CAChB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,EAAE,CAAC,EAAE,MAAM,EACX,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,CAAA;KAAE,KACpE,OAAO,CAAC,OAAO,CAAC,CAAC;CACvB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAC/B,MAAM,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,cAAc,CAAC,GAAG,SAAS,EAC1D,WAAW,MAAM,KAChB,MAAM,GAAG,SAaX,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,iFAAiF;IACjF,IAAI,EAAE,KAAK,GAAG,SAAS,CAAC;IACxB,sEAAsE;IACtE,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,EACpC,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,GAAG,EACH,MAAM,EACN,YAAY,GACb,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBvC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { IMessage } from '../types/types';
|
|
2
|
+
/**
|
|
3
|
+
* Who decides whether an incoming live message raises an in-app toast.
|
|
4
|
+
* Same rules as the web client's notificationPolicy, plus the room-level
|
|
5
|
+
* one RN shows: a toast is for a message in ANOTHER chat, from SOMEONE
|
|
6
|
+
* ELSE, while the app is on screen.
|
|
7
|
+
*/
|
|
8
|
+
/** `Room@Conference.Host/nick` → `room@conference.host`. */
|
|
9
|
+
export declare const bareJid: (jid: unknown) => string;
|
|
10
|
+
export interface CurrentUserIds {
|
|
11
|
+
xmppUsername?: string | null;
|
|
12
|
+
walletAddress?: string | null;
|
|
13
|
+
id?: string | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The reader's own message, coming back from the room. Any one of these is
|
|
17
|
+
* enough, because each sender path fills a different one:
|
|
18
|
+
* • the MUC nickname (the occupant resource of the stanza's `from`),
|
|
19
|
+
* which is the sender's XMPP local part;
|
|
20
|
+
* • the `senderJID` the sender put in `<data>`;
|
|
21
|
+
* • the parsed message's user id (what the bubble's own/other side uses).
|
|
22
|
+
* The old check only looked for the wallet address inside `senderJID`, so
|
|
23
|
+
* an account whose XMPP name is not its wallet got toasts for its own
|
|
24
|
+
* messages.
|
|
25
|
+
*/
|
|
26
|
+
export declare const isOwnIncomingMessage: ({ message, stanzaFrom, senderJID, user, }: {
|
|
27
|
+
message: Pick<IMessage, "user"> | null | undefined;
|
|
28
|
+
stanzaFrom?: string | null;
|
|
29
|
+
senderJID?: string | null;
|
|
30
|
+
user: CurrentUserIds | null | undefined;
|
|
31
|
+
}) => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether a toast for a message in `roomJID` should show right now. Read
|
|
34
|
+
* at the moment the message arrives (not from a render closure).
|
|
35
|
+
*/
|
|
36
|
+
export declare const shouldToastForRoom: ({ roomJID, visibleRoomJID, appActive, muted, }: {
|
|
37
|
+
roomJID: string;
|
|
38
|
+
visibleRoomJID?: string | null;
|
|
39
|
+
appActive: boolean;
|
|
40
|
+
muted?: boolean;
|
|
41
|
+
}) => boolean;
|
|
42
|
+
//# sourceMappingURL=notificationPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationPolicy.d.ts","sourceRoot":"","sources":["../../../src/helpers/notificationPolicy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;GAKG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,OAAO,GAAI,KAAK,OAAO,KAAG,MACe,CAAC;AAMvD,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAAI,2CAKlC;IACD,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,KAAG,OASH,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,gDAKhC;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,KAAG,OAWH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AppDispatch } from '../roomStore';
|
|
2
|
+
type MaybeId = string | number | null | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Every id a caller may know the target message by, without blanks and
|
|
5
|
+
* duplicates. A notification, a push payload or a link can carry the client
|
|
6
|
+
* (xmpp) message id, the archive stanza id or the stored message id, and the
|
|
7
|
+
* jump matcher checks message.id and message.xmppId, so all of them go in.
|
|
8
|
+
*/
|
|
9
|
+
export declare const collectMessageIds: (...candidates: MaybeId[]) => string[];
|
|
10
|
+
/**
|
|
11
|
+
* Open a room and, when the caller knows which message it is about, ask the
|
|
12
|
+
* mounted room to land on it (see useJumpToMessage). With no message id this
|
|
13
|
+
* is just "open the room".
|
|
14
|
+
*/
|
|
15
|
+
export declare const openRoomAtMessage: (dispatch: AppDispatch, roomJID: string, ...messageIds: MaybeId[]) => void;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=openRoomAtMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openRoomAtMessage.d.ts","sourceRoot":"","sources":["../../../src/helpers/openRoomAtMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,KAAK,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,GAAG,YAAY,OAAO,EAAE,KAAG,MAAM,EAUlE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,WAAW,EACrB,SAAS,MAAM,EACf,GAAG,YAAY,OAAO,EAAE,KACvB,IAKF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AppDispatch } from '../roomStore';
|
|
2
|
+
import { IMessage } from '../types/types';
|
|
3
|
+
import { HistoryWindowClient } from './jumpWindow';
|
|
4
|
+
export interface OpenThreadForJumpParams {
|
|
5
|
+
client?: HistoryWindowClient | null;
|
|
6
|
+
dispatch: AppDispatch;
|
|
7
|
+
roomJID: string;
|
|
8
|
+
/** The pending request this opens a thread for. */
|
|
9
|
+
at: number;
|
|
10
|
+
/** The reply the jump named. */
|
|
11
|
+
reply: IMessage;
|
|
12
|
+
/** The room's live messages, unfiltered. */
|
|
13
|
+
live: IMessage[];
|
|
14
|
+
/** Messages found alongside the reply (a window), unfiltered. */
|
|
15
|
+
nearby?: IMessage[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Opens the thread a reply belongs to, so a jump to the reply can highlight it
|
|
19
|
+
* there. Resolves true when the thread is open (or about to be), false when
|
|
20
|
+
* the parent could not be obtained.
|
|
21
|
+
*
|
|
22
|
+
* The parent comes from the live list (the usual thread flag), from the
|
|
23
|
+
* messages found next to the reply, or, when it is in neither, from a window
|
|
24
|
+
* around the parent fetched for the purpose.
|
|
25
|
+
*/
|
|
26
|
+
export declare function openThreadForJump({ client, dispatch, roomJID, at, reply, live, nearby, }: OpenThreadForJumpParams): Promise<boolean>;
|
|
27
|
+
//# sourceMappingURL=openThreadForJump.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openThreadForJump.d.ts","sourceRoot":"","sources":["../../../src/helpers/openThreadForJump.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,mBAAmB,EAEpB,MAAM,cAAc,CAAC;AAetB,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACpC,QAAQ,EAAE,WAAW,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,KAAK,EAAE,QAAQ,CAAC;IAChB,4CAA4C;IAC5C,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,iEAAiE;IACjE,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,MAAM,EACN,QAAQ,EACR,OAAO,EACP,EAAE,EACF,KAAK,EACL,IAAI,EACJ,MAAW,GACZ,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC,CA2C5C"}
|
|
@@ -5,12 +5,25 @@ export interface MessageReference {
|
|
|
5
5
|
roomJid: string;
|
|
6
6
|
userName?: string;
|
|
7
7
|
}
|
|
8
|
+
/** Loose view of a raw `mainMessage` JSON string (fields as sent). */
|
|
9
|
+
export interface ParsedMessageReference {
|
|
10
|
+
id?: string;
|
|
11
|
+
text?: string;
|
|
12
|
+
roomJid?: string;
|
|
13
|
+
userName?: string;
|
|
14
|
+
}
|
|
8
15
|
/**
|
|
9
|
-
* Safe read of
|
|
10
|
-
*
|
|
11
|
-
*
|
|
16
|
+
* Safe read of a reply's parent reference. Null for a missing or malformed
|
|
17
|
+
* value: a bad payload must not crash a bubble.
|
|
18
|
+
*
|
|
19
|
+
* Two call forms are supported:
|
|
20
|
+
* - `parseMessageReference(message)` reads `message.mainMessage`, returns a
|
|
21
|
+
* normalised MessageReference (id always a string) and is cached per
|
|
22
|
+
* message object;
|
|
23
|
+
* - `parseMessageReference(rawJsonString)` returns the parsed object as sent.
|
|
12
24
|
*/
|
|
13
|
-
export declare
|
|
25
|
+
export declare function parseMessageReference(input: {
|
|
14
26
|
mainMessage?: string;
|
|
15
|
-
} | null | undefined)
|
|
27
|
+
} | null | undefined): MessageReference | null;
|
|
28
|
+
export declare function parseMessageReference(input: unknown): ParsedMessageReference | null;
|
|
16
29
|
//# sourceMappingURL=parseMessageReference.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseMessageReference.d.ts","sourceRoot":"","sources":["../../../src/helpers/parseMessageReference.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID
|
|
1
|
+
{"version":3,"file":"parseMessageReference.d.ts","sourceRoot":"","sources":["../../../src/helpers/parseMessageReference.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,sEAAsE;AACtE,MAAM,WAAW,sBAAsB;IACrC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GACjD,gBAAgB,GAAG,IAAI,CAAC;AAC3B,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,OAAO,GACb,sBAAsB,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IConfig } from '../types/types';
|
|
2
|
+
/**
|
|
3
|
+
* "Discover chats" lives in the room list menu sheet. A host that takes the
|
|
4
|
+
* burger over (`headerMenu` as a function) or hides the menu
|
|
5
|
+
* (`chatHeaderSettings.disableMenu`) would otherwise have no obvious way to
|
|
6
|
+
* reach the directory, so it also gets a button of its own in the room list
|
|
7
|
+
* header. `disableRoomMenu` removes the menu entry point, and with it the
|
|
8
|
+
* button; `disablePublicChatsDirectory` removes the feature altogether.
|
|
9
|
+
*/
|
|
10
|
+
export declare const showsStandaloneDiscoverButton: (config?: IConfig) => boolean;
|
|
11
|
+
//# sourceMappingURL=publicChatsEntry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicChatsEntry.d.ts","sourceRoot":"","sources":["../../../src/helpers/publicChatsEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,GAAI,SAAS,OAAO,KAAG,OAIpB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IMessage, IRoom } from '../types/types';
|
|
2
|
+
export declare const getMessageTimestamp: (message?: IMessage) => number;
|
|
3
|
+
export declare const getLastLocalMessageTimestamp: (room?: IRoom) => number;
|
|
4
|
+
export declare const getRoomLastActivityScore: (room?: IRoom) => number;
|
|
5
|
+
//# sourceMappingURL=roomActivityScore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roomActivityScore.d.ts","sourceRoot":"","sources":["../../../src/helpers/roomActivityScore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,mBAAmB,GAAI,UAAU,QAAQ,KAAG,MAgBxD,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,OAAO,KAAK,KAAG,MAS3D,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,OAAO,KAAK,KAAG,MAYvD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IRoom } from '../types/types';
|
|
2
|
+
type CountSource = Pick<IRoom, 'members' | 'usersCnt'> | {
|
|
3
|
+
members?: unknown;
|
|
4
|
+
usersCnt?: unknown;
|
|
5
|
+
} | null | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* User count to DISPLAY for a room. /chats/my returns `usersCnt` (the true
|
|
8
|
+
* total) but at most 30 members for big public rooms, so the truncated
|
|
9
|
+
* members array must never win over usersCnt.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getRoomUserCount: (room: CountSource) => number;
|
|
12
|
+
/** True when the room is known to have more users than members loaded. */
|
|
13
|
+
export declare const isRoomMembersTruncated: (room: CountSource) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Next usersCnt after a live join (+1) or leave (-1). Adjusts the CURRENT
|
|
16
|
+
* count instead of recomputing from the (possibly truncated) members array.
|
|
17
|
+
*/
|
|
18
|
+
export declare const adjustUsersCnt: (room: CountSource, delta: 1 | -1, nextMembersLength: number) => number;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=roomUserCount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roomUserCount.d.ts","sourceRoot":"","sources":["../../../src/helpers/roomUserCount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,KAAK,WAAW,GACZ,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,CAAC,GACnC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GACzC,IAAI,GACJ,SAAS,CAAC;AAEd;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,WAAW,KAAG,MAOpD,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,sBAAsB,GAAI,MAAM,WAAW,KAAG,OAO1D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,WAAW,EACjB,OAAO,CAAC,GAAG,CAAC,CAAC,EACb,mBAAmB,MAAM,KACxB,MAGF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import XmppClient from '../networking/xmppClient';
|
|
2
|
+
import { IConfig } from '../types/types';
|
|
3
|
+
export interface ConfiguredPreloadOptions {
|
|
4
|
+
client: XmppClient;
|
|
5
|
+
config?: Pick<IConfig, 'historyPreload' | 'historyQoS' | 'defaultRooms'> | null;
|
|
6
|
+
signal?: AbortSignal;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The preload a host's config asks for, in one place (the provider's
|
|
10
|
+
* initBeforeLoad bootstrap and any other start point share it):
|
|
11
|
+
* - 'off': nothing, rooms load when opened.
|
|
12
|
+
* - 'all': every room, one pass (the old behaviour for small accounts).
|
|
13
|
+
* - 'staged' (default): rooms still lacking a list preview get a one-message
|
|
14
|
+
* page first, then the top-N rooms by activity get a full first page;
|
|
15
|
+
* everything else loads when opened.
|
|
16
|
+
* - 'legacy' (historyQoS.stagedPreloadEnabled === false): the previous single
|
|
17
|
+
* pass over every room (capped by preloadTopKRooms when set).
|
|
18
|
+
*/
|
|
19
|
+
export declare const runConfiguredHistoryPreload: ({ client, config, signal, }: ConfiguredPreloadOptions) => Promise<void>;
|
|
20
|
+
export default runConfiguredHistoryPreload;
|
|
21
|
+
//# sourceMappingURL=runConfiguredHistoryPreload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runConfiguredHistoryPreload.d.ts","sourceRoot":"","sources":["../../../src/helpers/runConfiguredHistoryPreload.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAOzC,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,gBAAgB,GAAG,YAAY,GAAG,cAAc,CAAC,GAAG,IAAI,CAAC;IAChF,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,GAAU,6BAI/C,wBAAwB,KAAG,OAAO,CAAC,IAAI,CA2CzC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The appId of the current session. RN's chat store has no standalone
|
|
3
|
+
* `appId` field the way web's does, so it is read from the signed-in user
|
|
4
|
+
* (`user.appId`), then the host config (`config.appId`), then the prefix of
|
|
5
|
+
* the user's own `<appId>_<userId>` xmppUsername. Empty when unknown.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getSessionAppId: () => string;
|
|
8
|
+
//# sourceMappingURL=sessionAppId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionAppId.d.ts","sourceRoot":"","sources":["../../../src/helpers/sessionAppId.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAO,MAQlC,CAAC"}
|