@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,389 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SWEEP_RETRY_DELAYS_MS = exports.RoomJoinManager = void 0;
|
|
7
|
+
var _roomStore = require("../../roomStore");
|
|
8
|
+
var _presenceInRoom = require("./presenceInRoom.xmpp");
|
|
9
|
+
var _allRoomPresences = require("./allRoomPresences.xmpp");
|
|
10
|
+
var _isLikelyMucJid = require("../../helpers/isLikelyMucJid");
|
|
11
|
+
var _roomActivityScore = require("../../helpers/roomActivityScore");
|
|
12
|
+
/**
|
|
13
|
+
* The slice of XmppClient the join manager needs. Keeping it an interface
|
|
14
|
+
* keeps this file free of an import cycle with xmppClient.ts.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
18
|
+
const SWEEP_RETRY_DELAYS_MS = exports.SWEEP_RETRY_DELAYS_MS = [2000, 5000, 10000];
|
|
19
|
+
const DEFAULT_JOIN_CONCURRENCY = 5;
|
|
20
|
+
const DEFAULT_FAILURE_BACKOFF_MS = 10000;
|
|
21
|
+
const formatError = error => error instanceof Error ? error.message : String(error);
|
|
22
|
+
const emptySummary = () => ({
|
|
23
|
+
total: 0,
|
|
24
|
+
success: 0,
|
|
25
|
+
failed: 0,
|
|
26
|
+
failedRooms: [],
|
|
27
|
+
sweptRooms: [],
|
|
28
|
+
failures: []
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Per-connection MUC join state and the background join sweep.
|
|
33
|
+
*
|
|
34
|
+
* Why it exists: the RN client used to join every room with a Promise.all
|
|
35
|
+
* and only then call the session ready, so the room list waited for the
|
|
36
|
+
* slowest of N joins and a join in flight when the socket dropped could
|
|
37
|
+
* poison the next connection. Here joins go through one dedup layer
|
|
38
|
+
* (ensureRoomPresence), the sweep is a bounded pool that runs in the
|
|
39
|
+
* background (active room first, then by recent activity), and every join
|
|
40
|
+
* remembers the connection epoch it started on: when the socket was
|
|
41
|
+
* replaced meanwhile its outcome is discarded (no joined mark, no backoff).
|
|
42
|
+
*
|
|
43
|
+
* `presencesReady` means the whole sweep finished, `priorityPresencesReady`
|
|
44
|
+
* that its first wave (active room + one pool width) settled.
|
|
45
|
+
*/
|
|
46
|
+
class RoomJoinManager {
|
|
47
|
+
presencesReady = false;
|
|
48
|
+
priorityPresencesReady = false;
|
|
49
|
+
joinedRooms = new Set();
|
|
50
|
+
roomPresenceInFlight = new Map();
|
|
51
|
+
roomPresenceBlockedUntil = new Map();
|
|
52
|
+
sweepRetryTimer = null;
|
|
53
|
+
sweepRetryRunning = false;
|
|
54
|
+
sendAllPresencesInFlight = null;
|
|
55
|
+
constructor(host) {
|
|
56
|
+
this.host = host;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// ---- config -------------------------------------------------------
|
|
60
|
+
qos() {
|
|
61
|
+
const own = this.host.getHistoryQoS() || {};
|
|
62
|
+
let fromConfig = {};
|
|
63
|
+
try {
|
|
64
|
+
fromConfig = _roomStore.store.getState()?.chatSettingStore?.config?.historyQoS || {};
|
|
65
|
+
} catch {
|
|
66
|
+
fromConfig = {};
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
...fromConfig,
|
|
70
|
+
...own
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
get joinConcurrency() {
|
|
74
|
+
return Math.max(1, Math.floor(Number(this.qos().joinConcurrency) || DEFAULT_JOIN_CONCURRENCY));
|
|
75
|
+
}
|
|
76
|
+
get joinHistoryStanzas() {
|
|
77
|
+
return Math.max(0, Math.floor(Number(this.qos().joinHistoryStanzas) || 0));
|
|
78
|
+
}
|
|
79
|
+
get failureBackoffMs() {
|
|
80
|
+
return Math.max(0, Number(this.qos().presenceFailureBackoffMs || DEFAULT_FAILURE_BACKOFF_MS));
|
|
81
|
+
}
|
|
82
|
+
get epoch() {
|
|
83
|
+
return this.host.getConnectionEpoch();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// A room the sweep may fan out over: a conference-domain JID (or the
|
|
87
|
+
// server's own, possibly custom, conference domain).
|
|
88
|
+
isValidRoomJid(jid) {
|
|
89
|
+
if ((0, _isLikelyMucJid.isLikelyMucJid)(jid)) {
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
if (typeof jid !== 'string') {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
const conference = this.host.getConference?.();
|
|
96
|
+
const at = jid.indexOf('@');
|
|
97
|
+
return !!conference && at > 0 && jid.slice(at + 1).split('/')[0] === conference;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// An explicit join of one room (a send, an open room, an invite) only
|
|
101
|
+
// needs a well-formed `local@domain`: the caller named the room.
|
|
102
|
+
isJoinableJid(jid) {
|
|
103
|
+
if (typeof jid !== 'string') {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
const at = jid.indexOf('@');
|
|
107
|
+
return at > 0 && at < jid.length - 1;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// ---- lifecycle ----------------------------------------------------
|
|
111
|
+
/** Called on every disconnect / reconnect / close: nothing carries over. */
|
|
112
|
+
reset() {
|
|
113
|
+
this.presencesReady = false;
|
|
114
|
+
this.priorityPresencesReady = false;
|
|
115
|
+
this.clearSweepRetry();
|
|
116
|
+
this.sendAllPresencesInFlight = null;
|
|
117
|
+
this.joinedRooms.clear();
|
|
118
|
+
this.roomPresenceInFlight.clear();
|
|
119
|
+
this.roomPresenceBlockedUntil.clear();
|
|
120
|
+
}
|
|
121
|
+
isJoined(roomJid) {
|
|
122
|
+
return this.joinedRooms.has(roomJid);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// ---- one room -----------------------------------------------------
|
|
126
|
+
ensureRoomPresence = async (roomJID, options) => {
|
|
127
|
+
if (!roomJID) {
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
const source = options?.source || 'other';
|
|
131
|
+
if (!this.isJoinableJid(roomJID)) {
|
|
132
|
+
console.warn(`[XMPP] room_presence_skipped_invalid_jid jid=${String(roomJID)} source=${source}`);
|
|
133
|
+
// Block for a long time so repeated callers don't keep retrying.
|
|
134
|
+
this.roomPresenceBlockedUntil.set(roomJID, Date.now() + DAY_MS);
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
if (this.joinedRooms.has(roomJID)) {
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
const blockedUntil = this.roomPresenceBlockedUntil.get(roomJID) || 0;
|
|
141
|
+
if (Date.now() < blockedUntil) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
const settleDelay = options?.settleDelay ?? 0;
|
|
145
|
+
const timeoutMs = options?.timeoutMs ?? 2000;
|
|
146
|
+
const waitForJoin = options?.waitForJoin ?? true;
|
|
147
|
+
const existing = this.roomPresenceInFlight.get(roomJID);
|
|
148
|
+
if (existing) {
|
|
149
|
+
if (!waitForJoin) {
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
// Piggyback on someone else's in-flight join but never wait past OUR
|
|
153
|
+
// OWN budget: that join may have been started with a longer timeout
|
|
154
|
+
// (the sweep uses 5 s, a send wants less).
|
|
155
|
+
const OWN_TIMEOUT = Symbol('ensureRoomPresence_own_timeout');
|
|
156
|
+
let timer;
|
|
157
|
+
const ownTimeout = new Promise(resolve => {
|
|
158
|
+
timer = setTimeout(() => resolve(OWN_TIMEOUT), timeoutMs);
|
|
159
|
+
});
|
|
160
|
+
const result = await Promise.race([existing, ownTimeout]);
|
|
161
|
+
if (timer) {
|
|
162
|
+
clearTimeout(timer);
|
|
163
|
+
}
|
|
164
|
+
return result === OWN_TIMEOUT ? false : result;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// A join that outlives its connection (socket dropped while it waited)
|
|
168
|
+
// must not write into the NEW connection's state: neither joined nor a
|
|
169
|
+
// failure backoff.
|
|
170
|
+
const joinEpoch = this.epoch;
|
|
171
|
+
const promise = (async () => {
|
|
172
|
+
// Online: go straight to the write (synchronously for the first
|
|
173
|
+
// caller), so a send queued right behind it stays ordered after it.
|
|
174
|
+
if (!this.host.isOnline?.()) {
|
|
175
|
+
await this.host.waitForOnline(Math.max(timeoutMs, 1000));
|
|
176
|
+
}
|
|
177
|
+
if (joinEpoch !== this.epoch) {
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
const client = this.host.getClient();
|
|
181
|
+
if (!client) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
await (0, _presenceInRoom.presenceInRoom)(client, roomJID, settleDelay, timeoutMs, this.joinHistoryStanzas);
|
|
185
|
+
if (joinEpoch !== this.epoch) {
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
this.joinedRooms.add(roomJID);
|
|
189
|
+
this.roomPresenceBlockedUntil.delete(roomJID);
|
|
190
|
+
return true;
|
|
191
|
+
})().catch(error => {
|
|
192
|
+
if (joinEpoch !== this.epoch) {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
const message = formatError(error);
|
|
196
|
+
// Permanent / long-lived failures: "you are not a member" or "this
|
|
197
|
+
// room does not exist". No point retrying for an hour.
|
|
198
|
+
const isHardFailure = message.includes('presence_error:forbidden') || message.includes('presence_error:not-allowed') || message.includes('presence_error:remote-server-not-found') || message.includes('presence_error:item-not-found') || message.includes('presence_invalid_jid');
|
|
199
|
+
if (isHardFailure) {
|
|
200
|
+
this.roomPresenceBlockedUntil.set(roomJID, Date.now() + 60 * 60 * 1000);
|
|
201
|
+
} else if (message.includes('presence_timeout') || message.includes('presence_send_failed') || message.includes('presence_error')) {
|
|
202
|
+
this.roomPresenceBlockedUntil.set(roomJID, Date.now() + this.failureBackoffMs);
|
|
203
|
+
}
|
|
204
|
+
console.warn(`[XMPP] room_presence_failed room=${roomJID} source=${source} error=${message}`);
|
|
205
|
+
return false;
|
|
206
|
+
}).finally(() => {
|
|
207
|
+
// The map was cleared on disconnect: only drop our own entry.
|
|
208
|
+
if (this.roomPresenceInFlight.get(roomJID) === promise) {
|
|
209
|
+
this.roomPresenceInFlight.delete(roomJID);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
this.roomPresenceInFlight.set(roomJID, promise);
|
|
213
|
+
if (waitForJoin) {
|
|
214
|
+
return promise;
|
|
215
|
+
}
|
|
216
|
+
return true;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
// ---- the sweep ----------------------------------------------------
|
|
220
|
+
/**
|
|
221
|
+
* Start the background join sweep. Every caller shares one in-flight
|
|
222
|
+
* sweep; a finished sweep is only repeated when rooms appeared since.
|
|
223
|
+
* Never throws.
|
|
224
|
+
*/
|
|
225
|
+
async sendAllPresencesAndMarkReady() {
|
|
226
|
+
if (this.sendAllPresencesInFlight) {
|
|
227
|
+
return this.sendAllPresencesInFlight;
|
|
228
|
+
}
|
|
229
|
+
if (this.presencesReady && !this.hasUnjoinedRooms()) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
const run = this.runAllPresencesSweep().finally(() => {
|
|
233
|
+
if (this.sendAllPresencesInFlight === run) {
|
|
234
|
+
this.sendAllPresencesInFlight = null;
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
this.sendAllPresencesInFlight = run;
|
|
238
|
+
return run;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// Store rooms this connection has not joined and is not backing off from.
|
|
242
|
+
hasUnjoinedRooms() {
|
|
243
|
+
const rooms = _roomStore.store.getState().rooms.rooms;
|
|
244
|
+
const now = Date.now();
|
|
245
|
+
return Object.keys(rooms || {}).some(jid => this.isValidRoomJid(jid) && !this.joinedRooms.has(jid) && now >= (this.roomPresenceBlockedUntil.get(jid) || 0));
|
|
246
|
+
}
|
|
247
|
+
async runAllPresencesSweep() {
|
|
248
|
+
const epoch = this.epoch;
|
|
249
|
+
this.presencesReady = false;
|
|
250
|
+
let summary = emptySummary();
|
|
251
|
+
try {
|
|
252
|
+
summary = await this.allRoomPresencesStanza(epoch);
|
|
253
|
+
} catch (error) {
|
|
254
|
+
console.warn(`[XMPP] allRoomPresences fallback reason=${formatError(error)}`);
|
|
255
|
+
}
|
|
256
|
+
// The connection dropped mid-sweep: a newer connection owns the state.
|
|
257
|
+
if (epoch !== this.epoch) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
// Only rooms the sweep actually sent a presence for count as joined.
|
|
261
|
+
// Reading the store here would also mark rooms discovered DURING the
|
|
262
|
+
// sweep, and ensureRoomPresence would then short-circuit for them.
|
|
263
|
+
summary.sweptRooms.forEach(jid => {
|
|
264
|
+
if (!summary.failedRooms.includes(jid)) {
|
|
265
|
+
this.joinedRooms.add(jid);
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
if (summary.failed > 0 && summary.failures?.length) {
|
|
269
|
+
const text = summary.failures.slice(0, 3).map(item => `${item.roomJid}:${item.reason}`).join(' | ');
|
|
270
|
+
console.warn(`[XMPP] allRoomPresences failures_top3=${text}`);
|
|
271
|
+
}
|
|
272
|
+
this.priorityPresencesReady = true;
|
|
273
|
+
this.presencesReady = true;
|
|
274
|
+
this.scheduleSweepRetry(epoch, 0);
|
|
275
|
+
}
|
|
276
|
+
clearSweepRetry() {
|
|
277
|
+
if (this.sweepRetryTimer) {
|
|
278
|
+
clearTimeout(this.sweepRetryTimer);
|
|
279
|
+
}
|
|
280
|
+
this.sweepRetryTimer = null;
|
|
281
|
+
this.sweepRetryRunning = false;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Rooms the connection has not joined that a retry can still help: not
|
|
285
|
+
// joined, not under a long (hard) block. Returns the soonest moment a retry
|
|
286
|
+
// is worthwhile (0 = now) or null when nothing is left.
|
|
287
|
+
nextSweepRetryAt() {
|
|
288
|
+
const rooms = _roomStore.store.getState().rooms?.rooms;
|
|
289
|
+
const now = Date.now();
|
|
290
|
+
let soonest = null;
|
|
291
|
+
Object.keys(rooms || {}).forEach(jid => {
|
|
292
|
+
if (!this.isValidRoomJid(jid) || this.joinedRooms.has(jid)) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
const until = this.roomPresenceBlockedUntil.get(jid) || 0;
|
|
296
|
+
// Hard failures (1 h) and invalid JIDs (24 h) are not worth a retry.
|
|
297
|
+
if (until - now > Math.max(this.failureBackoffMs, 1000) * 2) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
const at = Math.max(until, now);
|
|
301
|
+
if (soonest === null || at < soonest) {
|
|
302
|
+
soonest = at;
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
return soonest;
|
|
306
|
+
}
|
|
307
|
+
scheduleSweepRetry(epoch, round) {
|
|
308
|
+
if (epoch !== this.epoch) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
if (round >= SWEEP_RETRY_DELAYS_MS.length) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
const at = this.nextSweepRetryAt();
|
|
315
|
+
if (at === null) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
if (this.sweepRetryTimer) {
|
|
319
|
+
clearTimeout(this.sweepRetryTimer);
|
|
320
|
+
}
|
|
321
|
+
const delay = Math.max(SWEEP_RETRY_DELAYS_MS[round], at - Date.now() + 100);
|
|
322
|
+
this.sweepRetryTimer = setTimeout(() => {
|
|
323
|
+
this.sweepRetryTimer = null;
|
|
324
|
+
this.runSweepRetry(epoch, round).catch(() => undefined);
|
|
325
|
+
}, delay);
|
|
326
|
+
}
|
|
327
|
+
async runSweepRetry(epoch, round) {
|
|
328
|
+
if (epoch !== this.epoch || !this.host.getClient()) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
// A fresh full sweep owns the pool right now: try again after it.
|
|
332
|
+
if (this.sweepRetryRunning || this.sendAllPresencesInFlight) {
|
|
333
|
+
this.scheduleSweepRetry(epoch, round);
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
if (this.nextSweepRetryAt() === null) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
this.sweepRetryRunning = true;
|
|
340
|
+
try {
|
|
341
|
+
const summary = await this.allRoomPresencesStanza(epoch);
|
|
342
|
+
if (epoch !== this.epoch) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const failed = new Set(summary.failedRooms);
|
|
346
|
+
summary.sweptRooms.forEach(jid => {
|
|
347
|
+
if (!failed.has(jid)) {
|
|
348
|
+
this.joinedRooms.add(jid);
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
} catch (error) {
|
|
352
|
+
console.warn(`[XMPP] sweep_retry:error ${formatError(error)}`);
|
|
353
|
+
} finally {
|
|
354
|
+
this.sweepRetryRunning = false;
|
|
355
|
+
}
|
|
356
|
+
this.scheduleSweepRetry(epoch, round + 1);
|
|
357
|
+
}
|
|
358
|
+
async allRoomPresencesStanza(epoch = this.epoch) {
|
|
359
|
+
const client = this.host.getClient();
|
|
360
|
+
if (!client) {
|
|
361
|
+
return emptySummary();
|
|
362
|
+
}
|
|
363
|
+
try {
|
|
364
|
+
return await (0, _allRoomPresences.allRoomPresences)(client, roomJid => this.ensureRoomPresence(roomJid, {
|
|
365
|
+
settleDelay: 0,
|
|
366
|
+
timeoutMs: 5000,
|
|
367
|
+
waitForJoin: true,
|
|
368
|
+
source: 'background'
|
|
369
|
+
}), {
|
|
370
|
+
concurrency: this.joinConcurrency,
|
|
371
|
+
isJoined: jid => this.joinedRooms.has(jid),
|
|
372
|
+
getActiveRoomJid: () => _roomStore.store.getState().rooms.activeRoomJID,
|
|
373
|
+
rank: jid => (0, _roomActivityScore.getRoomLastActivityScore)(_roomStore.store.getState().rooms.rooms?.[jid]),
|
|
374
|
+
isCancelled: () => epoch !== this.epoch,
|
|
375
|
+
isRoomJid: jid => this.isValidRoomJid(jid),
|
|
376
|
+
onPriorityDone: () => {
|
|
377
|
+
if (epoch === this.epoch) {
|
|
378
|
+
this.priorityPresencesReady = true;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
} catch (error) {
|
|
383
|
+
console.warn(`[XMPP] allRoomPresencesStanza:error ${formatError(error)}`);
|
|
384
|
+
return emptySummary();
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
exports.RoomJoinManager = RoomJoinManager;
|
|
389
|
+
//# sourceMappingURL=roomJoinSweep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_roomStore","require","_presenceInRoom","_allRoomPresences","_isLikelyMucJid","_roomActivityScore","DAY_MS","SWEEP_RETRY_DELAYS_MS","exports","DEFAULT_JOIN_CONCURRENCY","DEFAULT_FAILURE_BACKOFF_MS","formatError","error","Error","message","String","emptySummary","total","success","failed","failedRooms","sweptRooms","failures","RoomJoinManager","presencesReady","priorityPresencesReady","joinedRooms","Set","roomPresenceInFlight","Map","roomPresenceBlockedUntil","sweepRetryTimer","sweepRetryRunning","sendAllPresencesInFlight","constructor","host","qos","own","getHistoryQoS","fromConfig","store","getState","chatSettingStore","config","historyQoS","joinConcurrency","Math","max","floor","Number","joinHistoryStanzas","failureBackoffMs","presenceFailureBackoffMs","epoch","getConnectionEpoch","isValidRoomJid","jid","isLikelyMucJid","conference","getConference","at","indexOf","slice","split","isJoinableJid","length","reset","clearSweepRetry","clear","isJoined","roomJid","has","ensureRoomPresence","roomJID","options","source","console","warn","set","Date","now","blockedUntil","get","settleDelay","timeoutMs","waitForJoin","existing","OWN_TIMEOUT","Symbol","timer","ownTimeout","Promise","resolve","setTimeout","result","race","clearTimeout","joinEpoch","promise","isOnline","waitForOnline","client","getClient","presenceInRoom","add","delete","catch","isHardFailure","includes","finally","sendAllPresencesAndMarkReady","hasUnjoinedRooms","run","runAllPresencesSweep","rooms","Object","keys","some","summary","allRoomPresencesStanza","forEach","text","map","item","reason","join","scheduleSweepRetry","nextSweepRetryAt","soonest","until","round","delay","runSweepRetry","undefined","allRoomPresences","concurrency","getActiveRoomJid","activeRoomJID","rank","getRoomLastActivityScore","isCancelled","isRoomJid","onPriorityDone"],"sourceRoot":"../../../../src","sources":["networking/xmpp/roomJoinSweep.ts"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAIA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AAGA;AACA;AACA;AACA;;AAyBA,MAAMK,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;AAC3B,MAAMC,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC;AACxD,MAAME,wBAAwB,GAAG,CAAC;AAClC,MAAMC,0BAA0B,GAAG,KAAK;AAExC,MAAMC,WAAW,GAAIC,KAAc,IACjCA,KAAK,YAAYC,KAAK,GAAGD,KAAK,CAACE,OAAO,GAAGC,MAAM,CAACH,KAAK,CAAC;AAExD,MAAMI,YAAY,GAAGA,CAAA,MAA+B;EAClDC,KAAK,EAAE,CAAC;EACRC,OAAO,EAAE,CAAC;EACVC,MAAM,EAAE,CAAC;EACTC,WAAW,EAAE,EAAE;EACfC,UAAU,EAAE,EAAE;EACdC,QAAQ,EAAE;AACZ,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAe,CAAC;EAC3BC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QAC5DC,IAAI,EAAGlF,GAAG,IACR,IAAAmF,2CAAwB,EAACnG,gBAAK,CAACC,QAAQ,CAAC,CAAC,CAACyE,KAAK,CAACA,KAAK,GAAG1D,GAAG,CAAC,CAAC;QAC/DoF,WAAW,EAAEA,CAAA,KAAMvF,KAAK,KAAK,IAAI,CAACA,KAAK;QACvCwF,SAAS,EAAGrF,GAAG,IAAK,IAAI,CAACD,cAAc,CAACC,GAAG,CAAC;QAC5CsF,cAAc,EAAEA,CAAA,KAAM;UACpB,IAAIzF,KAAK,KAAK,IAAI,CAACA,KAAK,EAAE;YAAC,IAAI,CAAC5B,sBAAsB,GAAG,IAAI;UAAC;QAChE;MACF,CACF,CAAC;IACH,CAAC,CAAC,OAAOb,KAAK,EAAE;MACdgE,OAAO,CAACC,IAAI,CAAC,uCAAuClE,WAAW,CAACC,KAAK,CAAC,EAAE,CAAC;MACzE,OAAOI,YAAY,CAAC,CAAC;IACvB;EACF;AACF;AAACR,OAAA,CAAAe,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -40,7 +40,6 @@ function sendMediaMessage(client, roomJID, data, customId, devServer) {
|
|
|
40
40
|
senderFirstName: data.firstName,
|
|
41
41
|
senderLastName: data.lastName,
|
|
42
42
|
senderWalletAddress: data.walletAddress,
|
|
43
|
-
isSystemMessage: false,
|
|
44
43
|
tokenAmount: '0',
|
|
45
44
|
receiverMessageId: '0',
|
|
46
45
|
mucname: data.chatName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_client","require","_send","_sendMediaSeq","toServiceXmlns","devServer","client","clientService","options","service","test","ds","trim","includes","replace","sendMediaMessage","roomJID","data","customId","id","Date","now","dataToSend","xmlns","senderJID","jid","toString","senderFirstName","firstName","senderLastName","lastName","senderWalletAddress","walletAddress","
|
|
1
|
+
{"version":3,"names":["_client","require","_send","_sendMediaSeq","toServiceXmlns","devServer","client","clientService","options","service","test","ds","trim","includes","replace","sendMediaMessage","roomJID","data","customId","id","Date","now","dataToSend","xmlns","senderJID","jid","toString","senderFirstName","firstName","senderLastName","lastName","senderWalletAddress","walletAddress","tokenAmount","receiverMessageId","mucname","chatName","photoURL","userAvatar","isMediafile","createdAt","expiresAt","fileName","isVisible","location","locationPreview","mimetype","originalName","ownerKey","size","duration","updatedAt","userId","waveForm","attachmentId","isReply","showInChannel","mainMessage","roomJid","push","keys","e2eeKeys","length","clientEncrypted","hints","xml","shouldEncrypt","sendSealedMedia","JSON","stringify","v","message","type","from","to","sendResult","send","then","console","log","catch","err","error"],"sourceRoot":"../../../../src","sources":["networking/xmpp/sendMediaMessage.xmpp.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA;AACA;AACA,IAAIE,aAAa,GAAG,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAGA,CAACC,SAA6B,EAAEC,MAAc,KAAa;EAChF,MAAMC,aAAa,GAAID,MAAM,EAAUE,OAAO,EAAEC,OAA6B;EAC7E,IAAIF,aAAa,IAAI,YAAY,CAACG,IAAI,CAACH,aAAa,CAAC,EAAE;IAAC,OAAOA,aAAa;EAAC;EAC7E,MAAMI,EAAE,GAAG,CAACN,SAAS,IAAI,EAAE,EAAEO,IAAI,CAAC,CAAC;EACnC,IAAI,CAACD,EAAE,EAAE;IAAC,OAAO,6BAA6B;EAAC;EAC/C,IAAI,YAAY,CAACD,IAAI,CAACC,EAAE,CAAC,EAAE;IAAC,OAAOA,EAAE;EAAC;EACtC,IAAIA,EAAE,CAACE,QAAQ,CAAC,KAAK,CAAC,EAAE;IAAC,OAAOF,EAAE;EAAC;EACnC,OAAO,SAASA,EAAE,CAACG,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,KAAK;AACnD,CAAC;AAEM,SAASC,gBAAgBA,CAC9BT,MAAc,EACdU,OAAe,EACfC,IAAS,EACTC,QAAiB,EACjBb,SAAkB,EAClB;EACA,MAAMc,EAAE,GAC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ACvC,IAAII,UAAU,IAAI,OAAQA,UAAU,CAASE,IAAI,KAAK,UAAU,EAAE;MAC/DF,UAAU,CACRE,IAAI,CAAC,MAAMC,OAAO,CAACC,GAAG,CAAC,sBAAsB,EAAE;QAAE5D;MAAG,CAAC,CAAC,CAAC,CACvD6D,KAAK,CAAEC,GAAG,IACTH,OAAO,CAACI,KAAK,CAAC,sBAAsB,EAAE;QACpC/D,EAAE;QACFoD,OAAO,EAAGU,GAAG,EAAUV;MACzB,CAAC,CACH,CAAC;IACL;EACF,CAAC,CAAC,OAAOW,KAAK,EAAE;IACdJ,OAAO,CAACI,KAAK,CAACA,KAAK,CAAC;EACtB;EACA,OAAO/D,EAAE;AACX","ignoreList":[]}
|
|
@@ -56,7 +56,6 @@ const sendTextMessage = (client, roomJID, firstName, lastName, photo, walletAddr
|
|
|
56
56
|
senderJID: client.jid?.toString(),
|
|
57
57
|
senderWalletAddress: walletAddress,
|
|
58
58
|
roomJid: roomJID,
|
|
59
|
-
isSystemMessage: false,
|
|
60
59
|
tokenAmount: 0,
|
|
61
60
|
quickReplies: '',
|
|
62
61
|
notDisplayedValue: '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_client","require","_send","_sendTextSeq","toServiceXmlns","devServer","client","clientService","options","service","test","ds","trim","includes","replace","exports","sendTextMessage","roomJID","firstName","lastName","photo","walletAddress","userMessage","notDisplayedValue","isReply","showInChannel","mainMessage","customId","id","Date","now","dataXmlns","data","xml","xmlns","senderFirstName","senderLastName","fullName","photoURL","senderJID","jid","toString","senderWalletAddress","roomJid","
|
|
1
|
+
{"version":3,"names":["_client","require","_send","_sendTextSeq","toServiceXmlns","devServer","client","clientService","options","service","test","ds","trim","includes","replace","exports","sendTextMessage","roomJID","firstName","lastName","photo","walletAddress","userMessage","notDisplayedValue","isReply","showInChannel","mainMessage","customId","id","Date","now","dataXmlns","data","xml","xmlns","senderFirstName","senderLastName","fullName","photoURL","senderJID","jid","toString","senderWalletAddress","roomJid","tokenAmount","quickReplies","push","body","message","to","type","shouldEncrypt","sendEncrypted","sendResult","send","then","console","log","catch","err","error","name","stack"],"sourceRoot":"../../../../src","sources":["networking/xmpp/sendTextMessage.xmpp.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA;AACA,IAAIE,YAAY,GAAG,CAAC;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,cAAc,GAAGA,CAACC,SAA6B,EAAEC,MAAc,KAAa;EACvF;EACA;EACA,MAAMC,aAAa,GAAID,MAAM,EAAUE,OAAO,EAAEC,OAA6B;EAC7E,IAAIF,aAAa,IAAI,YAAY,CAACG,IAAI,CAACH,aAAa,CAAC,EAAE;IAAC,OAAOA,aAAa;EAAC;EAC7E,MAAMI,EAAE,GAAG,CAACN,SAAS,IAAI,EAAE,EAAEO,IAAI,CAAC,CAAC;EACnC,IAAI,CAACD,EAAE,EAAE;IAAC,OAAO,6BAA6B;EAAC;EAC/C,IAAI,YAAY,CAACD,IAAI,CAACC,EAAE,CAAC,EAAE;IAAC,OAAOA,EAAE;EAAC;EACtC,IAAIA,EAAE,CAACE,QAAQ,CAAC,KAAK,CAAC,EAAE;IAAC,OAAOF,EAAE;EAAC;EACnC;EACA,OAAO,SAASA,EAAE,CAACG,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,KAAK;AACnD,CAAC;AAACC,OAAA,CAAAX,cAAA,GAAAA,cAAA;AAEK,MAAMY,eAAe,GAAGA,CAC7BV,MAAc,EACdW,OAAe,EACfC,SAAiB,EACjBC,QAAgB,EAChBC,KAAa,EACbC,aAAqB,EACrBC,WAAmB,EACnBC,iBAA0B,EAC1BC,OAAiB,EACjBC,aAAuB,EACvBC,WAAoB,EACpBrB,SAAkB,EAClBsB,QAAiB,KACd;EACH;EACA;EACA;EACA,IAAI,CAACxB,YAAY,EAAE,CAAC;EACpB,MAAMyB,EAAE,GAAGD,Q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AAa,EAAC9C,MAAM,EAAEW,OAAO,EAAEW,EAAE,EAAEI,IAAI,EAAEe,IAAI,EAAEC,OAAO,CAAC;MACvD;IACF;IACA,MAAMK,UAAU,GAAG/C,MAAM,CAACgD,IAAI,CAACN,OAAO,CAAC;IACvC,IAAIK,UAAU,IAAI,OAAQA,UAAU,CAASE,IAAI,KAAK,UAAU,EAAE;MAC/DF,UAAU,CACRE,IAAI,CAAC,MAAMC,OAAO,CAACC,GAAG,CAAC,sBAAsB,EAAE;QAAE7B;MAAG,CAAC,CAAC,CAAC,CACvD8B,KAAK,CAAEC,GAAG,IACTH,OAAO,CAACI,KAAK,CAAC,sBAAsB,EAAE;QACpChC,EAAE;QACFoB,OAAO,EAAGW,GAAG,EAAUX,OAAO;QAC9Ba,IAAI,EAAGF,GAAG,EAAUE,IAAI;QACxBC,KAAK,EAAGH,GAAG,EAAUG;MACvB,CAAC,CACH,CAAC;IACL,CAAC,MAAM;MACLN,OAAO,CAACC,GAAG,CAAC,uDAAuD,EAAE;QAAE7B,EAAE;QAAEsB,IAAI,EAAE,OAAOG;MAAW,CAAC,CAAC;IACvG;EACF,CAAC,CAAC,OAAOO,KAAK,EAAE;IACdJ,OAAO,CAACI,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAAC7C,OAAA,CAAAC,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -35,7 +35,6 @@ const sendTextMessageWithTranslateTag = (client, stanzaMessage, source, customId
|
|
|
35
35
|
senderJID: client.jid?.toString(),
|
|
36
36
|
senderWalletAddress: stanzaMessage.walletAddress,
|
|
37
37
|
roomJid: stanzaMessage.roomJID,
|
|
38
|
-
isSystemMessage: false,
|
|
39
38
|
tokenAmount: 0,
|
|
40
39
|
quickReplies: '',
|
|
41
40
|
notDisplayedValue: '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_client","require","_sendTextMessage","_send","sendTextMessageWithTranslateTag","client","stanzaMessage","source","customId","id","Date","now","dataXmlns","toServiceXmlns","devServer","data","xml","xmlns","senderFirstName","firstName","senderLastName","lastName","fullName","photoURL","photo","senderJID","jid","toString","senderWalletAddress","walletAddress","roomJid","roomJID","
|
|
1
|
+
{"version":3,"names":["_client","require","_sendTextMessage","_send","sendTextMessageWithTranslateTag","client","stanzaMessage","source","customId","id","Date","now","dataXmlns","toServiceXmlns","devServer","data","xml","xmlns","senderFirstName","firstName","senderLastName","lastName","fullName","photoURL","photo","senderJID","jid","toString","senderWalletAddress","walletAddress","roomJid","roomJID","tokenAmount","quickReplies","notDisplayedValue","showInChannel","isReply","mainMessage","push","body","userMessage","envelope","to","type","shouldEncrypt","sendEncrypted","message","send","error","console","exports"],"sourceRoot":"../../../../src","sources":["networking/xmpp/sendTextMessageWithTranslateTag.xmpp.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,+BAA+B,GAAGA,CAC7CC,MAAc,EACdC,aAYC,EACDC,MAAqB,EACrBC,QAAiB,KACL;EACZ,MAAMC,EAAE,GAAGD,QAAQ,IAAI,qBAAqBE,IAAI,CAACC,GAAG,CAAC,CAAC,EAAE;EAExD,IAAI;IACF,MAAMC,SAAS,GAAG,IAAAC,+BAAc,EAACP,aAAa,CAACQ,SAAS,EAAET,MAAM,CAAC;IACjE,MAAMU,IAAI,GAAG,IAAAC,WAAG,EAAC,MAAM,EAAE;MACrBC,KAAK,EAAEL,SAAS;MAChBM,eAAe,EAAEZ,aAAa,CAACa,SAAS;MACxCC,cAAc,EAAEd,aAAa,CAACe,QAAQ;MACtCC,QAAQ,EAAE,GAAGhB,aAAa,CAACa,SAAS,IAAIb,aAAa,CAACe,QAAQ,EAAE;MAChEE,QAAQ,EAAEjB,aAAa,CAACkB,KAAK;MAC7B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