@ethora/chat-component-rn 26.9.0 → 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 +34 -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 +53 -4
- 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 +54 -79
- 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 +318 -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 +54 -5
- 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 +54 -79
- 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 +318 -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 +2 -0
- 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 +90 -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 +50 -9
- 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 +56 -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 +312 -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 +95 -5
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useMemo","useRef","useState","Alert","Animated","Text","TouchableOpacity","TouchableWithoutFeedback","StyleSheet","Dimensions","Modal","PanResponder","Platform","View","AddNewIcon","LogoutIcon","ProfileIcon","SettingIcon","useDispatch","useSafeAreaInsets","setActiveModal","MODAL_TYPES","useChatSettingState","useLogout","useTheme","shouldClaimVerticalDrag","shouldDismissOnDrag","useT","jsx","_jsx","jsxs","_jsxs","DEFAULT_LOGOUT_STRINGS","label","message","cancel","confirmLogout","confirm","strings","Promise","resolve","copy","alert","title","text","cancelText","style","onPress","confirmText","cancelable","onDismiss","runLogoutFlow","logoutConfig","performLogout","confirmed","onBeforeLogout","proceed","e","console","warn","onAfterLogout","height","windowHeight","get","HeaderRoomListMenu","isDrawerOpen","drawerAnimation","overlayAnimation","closeDrawer","dispatch","config","t","logout","enabled","undefined","logoutStrings","theme","primaryColor","primary","iconColor","icon","labelColor","insets","sheetHeight","setSheetHeight","dragY","Value","current","sheetHeightRef","closeDrawerRef","pendingActionRef","runPendingAction","action","OS","id","setTimeout","clearTimeout","handleOptionPress","setValue","timing","toValue","duration","useNativeDriver","start","openTranslateY","interpolate","inputRange","outputRange","dismissByDrag","makeDragResponder","claimOnStart","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponderCapture","_evt","g","dy","dx","onMoveShouldSetPanResponder","onPanResponderTerminationRequest","onPanResponderMove","Math","max","onPanResponderRelease","vy","spring","tension","friction","onPanResponderTerminate","bodyPanRef","handlePanRef","pan","handlePan","menuOptions","options","color","onClick","NEW_CHAT","styles","PROFILE","SETTINGS","push","catch","transparent","visible","animationType","statusBarTranslucent","onRequestClose","children","overlay","opacity","testID","onLayout","measured","nativeEvent","layout","sheet","backgroundColor","surface","shadowColor","shadow","paddingBottom","bottom","transform","translateY","panHandlers","grabArea","grabber","dark","textMuted","card","map","option","index","menuItemWrapper","menuItem","activeOpacity","iconSlot","length","divider","display","flexDirection","alignItems","paddingVertical","paddingHorizontal","width","fontSize","fontWeight","marginLeft","hairlineWidth","position","left","right","paddingTop","borderRadius","shadowOpacity","shadowOffset","shadowRadius","elevation","zIndex","overflow","top","flex"],"sourceRoot":"../../../../src","sources":["components/Menu/HeaderRoomListMenu.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAQC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACpF,SACEC,KAAK,EACLC,QAAQ,EACRC,IAAI,EACJC,gBAAgB,EAChBC,wBAAwB,EACxBC,UAAU,EACVC,UAAU,EACVC,KAAK,EACLC,YAAY,EACZC,QAAQ,EACRC,IAAI,QACC,cAAc;AACrB,SACEC,UAAU,EACVC,UAAU,EACVC,WAAW,EACXC,WAAW,QACN,oBAAoB;AAC3B,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,cAAc,QAAQ,mCAAmC;AAClE,SAASC,WAAW,QAAQ,qCAAqC;AACjE,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,QAAQ,QAAQ,sBAAsB;AAC/C,SACEC,uBAAuB,EACvBC,mBAAmB,QACd,6BAA6B;AAEpC,SAASC,IAAI,QAAQ,iBAAiB;;AAItC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAOA,MAAMC,sBAAqC,GAAG;EAC5CC,KAAK,EAAE,UAAU;EACjBC,OA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B,UAAU,EAAE,CAAC;IACbC,YAAY,EAAE,EAAE;IAChBC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;MAAEX,KAAK,EAAE,CAAC;MAAE5H,MAAM,EAAE,CAAC;IAAE,CAAC;IACtCwI,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE,EAAE;IACbC,MAAM,EAAE;EACV,CAAC;EACDjC,QAAQ,EAAE;IACRgB,UAAU,EAAE,QAAQ;IACpBW,UAAU,EAAE,CAAC;IACbhC,aAAa,EAAE;EACjB,CAAC;EACDM,OAAO,EAAE;IACPkB,KAAK,EAAE,EAAE;IACT5H,MAAM,EAAE,CAAC;IACTqI,YAAY,EAAE,CAAC;IACf;IACArC,eAAe,EAAE;EACnB,CAAC;EACDa,IAAI,EAAE;IACJ8B,QAAQ,EAAE;EACZ,CAAC;EACDnD,OAAO,EAAE;IACPyC,QAAQ,EAAE,UAAU;IACpBW,GAAG,EAAE,CAAC;IACNV,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACR9B,MAAM,EAAE,CAAC;IACTwC,IAAI,EAAE,CAAC;IACPjB,KAAK,EAAE,MAAM;IACb5H,MAAM,EAAE,MAAM;IACdgG,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useMemo","useRef","useState","Alert","Animated","Text","TouchableOpacity","TouchableWithoutFeedback","StyleSheet","Dimensions","Modal","PanResponder","Platform","View","AddNewIcon","DiscoverIcon","LogoutIcon","ProfileIcon","SettingIcon","useDispatch","useSafeAreaInsets","setActiveModal","MODAL_TYPES","useChatSettingState","useLogout","useTheme","useT","shouldClaimVerticalDrag","shouldDismissOnDrag","jsx","_jsx","jsxs","_jsxs","DEFAULT_LOGOUT_STRINGS","label","message","cancel","confirmLogout","confirm","strings","Promise","resolve","copy","alert","title","text","cancelText","style","onPress","confirmText","cancelable","onDismiss","runLogoutFlow","logoutConfig","performLogout","confirmed","onBeforeLogout","proceed","e","console","warn","onAfterLogout","height","windowHeight","get","HeaderRoomListMenu","isDrawerOpen","drawerAnimation","overlayAnimation","closeDrawer","dispatch","config","t","logout","enabled","undefined","logoutStrings","theme","primaryColor","primary","iconColor","icon","labelColor","insets","sheetHeight","setSheetHeight","dragY","Value","current","sheetHeightRef","closeDrawerRef","pendingActionRef","runPendingAction","action","OS","id","setTimeout","clearTimeout","handleOptionPress","setValue","timing","toValue","duration","useNativeDriver","start","openTranslateY","interpolate","inputRange","outputRange","dismissByDrag","makeDragResponder","claimOnStart","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponderCapture","_evt","g","dy","dx","onMoveShouldSetPanResponder","onPanResponderTerminationRequest","onPanResponderMove","Math","max","onPanResponderRelease","vy","spring","tension","friction","onPanResponderTerminate","bodyPanRef","handlePanRef","pan","handlePan","menuOptions","options","color","onClick","NEW_CHAT","styles","PROFILE","SETTINGS","disablePublicChatsDirectory","PUBLIC_CHATS","push","catch","transparent","visible","animationType","statusBarTranslucent","onRequestClose","children","overlay","opacity","testID","onLayout","measured","nativeEvent","layout","sheet","backgroundColor","surface","shadowColor","shadow","paddingBottom","bottom","transform","translateY","panHandlers","grabArea","grabber","dark","textMuted","card","map","option","index","menuItemWrapper","menuItem","activeOpacity","iconSlot","length","divider","display","flexDirection","alignItems","paddingVertical","paddingHorizontal","width","fontSize","fontWeight","marginLeft","hairlineWidth","position","left","right","paddingTop","borderRadius","shadowOpacity","shadowOffset","shadowRadius","elevation","zIndex","overflow","top","flex"],"sourceRoot":"../../../../src","sources":["components/Menu/HeaderRoomListMenu.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAQC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACpF,SACEC,KAAK,EACLC,QAAQ,EACRC,IAAI,EACJC,gBAAgB,EAChBC,wBAAwB,EACxBC,UAAU,EACVC,UAAU,EACVC,KAAK,EACLC,YAAY,EACZC,QAAQ,E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;EACjB,CAAC;EACDM,OAAO,EAAE;IACPkB,KAAK,EAAE,EAAE;IACT9H,MAAM,EAAE,CAAC;IACTuI,YAAY,EAAE,CAAC;IACf;IACArC,eAAe,EAAE;EACnB,CAAC;EACDa,IAAI,EAAE;IACJ8B,QAAQ,EAAE;EACZ,CAAC;EACDnD,OAAO,EAAE;IACPyC,QAAQ,EAAE,UAAU;IACpBW,GAAG,EAAE,CAAC;IACNV,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACR9B,MAAM,EAAE,CAAC;IACTwC,IAAI,EAAE,CAAC;IACPjB,KAAK,EAAE,MAAM;IACb9H,MAAM,EAAE,MAAM;IACdkG,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { AccessibilityInfo, Animated, StyleSheet } from 'react-native';
|
|
5
|
+
import { useBubbleHighlightUntil } from '../../helpers/bubbleHighlight';
|
|
6
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
const FADE_IN_MS = 150;
|
|
9
|
+
const Ring = ({
|
|
10
|
+
remainingMs
|
|
11
|
+
}) => {
|
|
12
|
+
const theme = useTheme();
|
|
13
|
+
const opacity = useRef(new Animated.Value(0)).current;
|
|
14
|
+
// Fixed at mount: a re-render must not restart the pulse.
|
|
15
|
+
const startRemainingRef = useRef(remainingMs);
|
|
16
|
+
const [reduceMotion, setReduceMotion] = useState(null);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
let alive = true;
|
|
19
|
+
Promise.resolve(AccessibilityInfo?.isReduceMotionEnabled?.()).then(value => {
|
|
20
|
+
if (alive) {
|
|
21
|
+
setReduceMotion(Boolean(value));
|
|
22
|
+
}
|
|
23
|
+
}).catch(() => {
|
|
24
|
+
if (alive) {
|
|
25
|
+
setReduceMotion(false);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return () => {
|
|
29
|
+
alive = false;
|
|
30
|
+
};
|
|
31
|
+
}, []);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (reduceMotion === null) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (reduceMotion) {
|
|
37
|
+
// A static ring for the rest of the second: no movement, still visible.
|
|
38
|
+
opacity.setValue(1);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const total = startRemainingRef.current;
|
|
42
|
+
const fadeIn = Math.min(FADE_IN_MS, total);
|
|
43
|
+
const animation = Animated.sequence([Animated.timing(opacity, {
|
|
44
|
+
toValue: 1,
|
|
45
|
+
duration: fadeIn,
|
|
46
|
+
useNativeDriver: true
|
|
47
|
+
}), Animated.timing(opacity, {
|
|
48
|
+
toValue: 0,
|
|
49
|
+
duration: Math.max(0, total - fadeIn),
|
|
50
|
+
useNativeDriver: true
|
|
51
|
+
})]);
|
|
52
|
+
animation.start();
|
|
53
|
+
return () => animation.stop();
|
|
54
|
+
}, [reduceMotion, opacity]);
|
|
55
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
56
|
+
testID: "bubble-highlight",
|
|
57
|
+
pointerEvents: "none",
|
|
58
|
+
style: [styles.ring, {
|
|
59
|
+
opacity,
|
|
60
|
+
borderColor: theme.primary,
|
|
61
|
+
backgroundColor: theme.primary + '22'
|
|
62
|
+
}]
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The brief ring and tint a jump puts on the bubble of the message it landed
|
|
68
|
+
* on (not on the whole row: the row also holds the date label and the
|
|
69
|
+
* avatar). Renders inside the bubble, which clips it to the bubble's corners.
|
|
70
|
+
* Nothing is mounted for a message without a running highlight.
|
|
71
|
+
*/
|
|
72
|
+
export const BubbleHighlight = ({
|
|
73
|
+
messageId
|
|
74
|
+
}) => {
|
|
75
|
+
const until = useBubbleHighlightUntil(String(messageId));
|
|
76
|
+
const [, setTick] = useState(0);
|
|
77
|
+
const remaining = until - Date.now();
|
|
78
|
+
|
|
79
|
+
// Drop the ring when its time is up even if nothing else re-renders.
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (remaining <= 0) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const timer = setTimeout(() => setTick(value => value + 1), remaining);
|
|
85
|
+
return () => clearTimeout(timer);
|
|
86
|
+
}, [until, remaining]);
|
|
87
|
+
if (remaining <= 0) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return /*#__PURE__*/_jsx(Ring, {
|
|
91
|
+
remainingMs: remaining
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
const styles = StyleSheet.create({
|
|
95
|
+
ring: {
|
|
96
|
+
position: 'absolute',
|
|
97
|
+
top: 0,
|
|
98
|
+
left: 0,
|
|
99
|
+
right: 0,
|
|
100
|
+
bottom: 0,
|
|
101
|
+
borderWidth: 2,
|
|
102
|
+
borderRadius: 10
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export default BubbleHighlight;
|
|
106
|
+
//# sourceMappingURL=BubbleHighlight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","useState","AccessibilityInfo","Animated","StyleSheet","useBubbleHighlightUntil","useTheme","jsx","_jsx","FADE_IN_MS","Ring","remainingMs","theme","opacity","Value","current","startRemainingRef","reduceMotion","setReduceMotion","alive","Promise","resolve","isReduceMotionEnabled","then","value","Boolean","catch","setValue","total","fadeIn","Math","min","animation","sequence","timing","toValue","duration","useNativeDriver","max","start","stop","View","testID","pointerEvents","style","styles","ring","borderColor","primary","backgroundColor","BubbleHighlight","messageId","until","String","setTick","remaining","Date","now","timer","setTimeout","clearTimeout","create","position","top","left","right","bottom","borderWidth","borderRadius"],"sourceRoot":"../../../../src","sources":["components/MessageBubble/BubbleHighlight.tsx"],"mappings":";;A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IAAI,CAACC,GAAG,CAAC,CAAC;;EAEpC;EACA1D,SAAS,CAAC,MAAM;IACd,IAAIwD,SAAS,IAAI,CAAC,EAAE;MAAC;IAAO;IAC5B,MAAMG,KAAK,GAAGC,UAAU,CAAC,MAAML,OAAO,CAAE9B,KAAK,IAAKA,KAAK,GAAG,CAAC,CAAC,EAAE+B,SAAS,CAAC;IACxE,OAAO,MAAMK,YAAY,CAACF,KAAK,CAAC;EAClC,CAAC,EAAE,CAACN,KAAK,EAAEG,SAAS,CAAC,CAAC;EAEtB,IAAIA,SAAS,IAAI,CAAC,EAAE;IAAC,OAAO,IAAI;EAAC;EACjC,oBAAO/C,IAAA,CAACE,IAAI;IAACC,WAAW,EAAE4C;EAAU,CAAE,CAAC;AACzC,CAAC;AAED,MAAMV,MAAM,GAAGzC,UAAU,CAACyD,MAAM,CAAC;EAC/Bf,IAAI,EAAE;IACJgB,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,eAAelB,eAAe","ignoreList":[]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import { Alert,
|
|
3
|
+
import React, { useEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
4
|
+
import { Alert, View, Pressable, StyleSheet, findNodeHandle, UIManager, Text, Keyboard } from 'react-native';
|
|
5
5
|
import { useDispatch, useSelector } from 'react-redux';
|
|
6
6
|
import { Avatar } from './Avatar';
|
|
7
|
+
import { BubbleHighlight } from './BubbleHighlight';
|
|
7
8
|
import MessageInteractions from './MessageInteractions';
|
|
8
9
|
import { BottomReplyContainer } from './BottomReplyContainer';
|
|
9
10
|
import { MessageReply } from './MessageReply';
|
|
@@ -25,7 +26,6 @@ import { chatTextStyle } from '../../helpers/typography';
|
|
|
25
26
|
import { useMessageHeapState } from '../../hooks/useMessageHeapState';
|
|
26
27
|
import { DoubleTick, LockIcon, LockOffIcon } from '../../assets/icons';
|
|
27
28
|
import { useT } from '../../i18n/useT';
|
|
28
|
-
import { composeName } from '../../helpers/displayName';
|
|
29
29
|
import { useFileToken } from '../../hooks/useFileToken';
|
|
30
30
|
import { appendFileToken, isSecureFileUrl, requestFileTokenRecovery } from '../../helpers/secureFileUrl';
|
|
31
31
|
import { placeholderKey } from '../../e2ee/stanza';
|
|
@@ -37,7 +37,12 @@ import { reactionsEnabled } from '../../helpers/reactionsConfig';
|
|
|
37
37
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
38
38
|
import { hapticTap } from '../../helpers/haptics';
|
|
39
39
|
import { useTheme } from '../../hooks/useTheme';
|
|
40
|
+
import { isOpaqueXmppUserId } from '../../helpers/xmppIdShape';
|
|
41
|
+
import { getUserLookupStatus, requestUsers, subscribeUserResolver } from '../../helpers/userResolver';
|
|
42
|
+
|
|
43
|
+
// Stable-width stand-in for the sender name while its lookup is pending.
|
|
40
44
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
45
|
+
const SENDER_NAME_PLACEHOLDER = '\u2026';
|
|
41
46
|
const CustomMessageContainer = styled.View`
|
|
42
47
|
flex-direction: row;
|
|
43
48
|
padding: 10px;
|
|
@@ -215,19 +220,44 @@ const Message = ({
|
|
|
215
220
|
// avatars: a cache-restored message carries no profileImage at all (see
|
|
216
221
|
// PERSISTED_MESSAGE_USER_FIELDS), so reading only the message-level copy
|
|
217
222
|
// leaves a blank initials circle for senders whose name resolved fine.
|
|
218
|
-
const usersSet = useSelector(state => state.rooms.usersSet);
|
|
219
223
|
const senderRawId = String(message.user?.id || '');
|
|
220
224
|
const senderLocal = senderRawId.split('@')[0];
|
|
221
|
-
|
|
222
|
-
// usersSet
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
//
|
|
228
|
-
|
|
229
|
-
//
|
|
230
|
-
|
|
225
|
+
// Granular: re-render only when THIS sender's entry changes, not on every
|
|
226
|
+
// usersSet update.
|
|
227
|
+
const senderEntry = useSelector(state => {
|
|
228
|
+
const set = state.rooms.usersSet;
|
|
229
|
+
return set?.[senderLocal] || set?.[senderRawId];
|
|
230
|
+
});
|
|
231
|
+
// A usersSet hit with blank names is worth no more than a miss.
|
|
232
|
+
const usersSetDisplayName = senderEntry ? `${senderEntry.firstName ?? ''} ${senderEntry.lastName ?? ''}`.trim() || String(senderEntry.name || '').trim() : '';
|
|
233
|
+
// 'Deleted User' baked into message.user.name only means "not resolved at
|
|
234
|
+
// insert time" (the real answer is the lookup's 404 below), and a raw
|
|
235
|
+
// xmpp id is never a name.
|
|
236
|
+
const safeMessageName = message.user?.name && message.user.name !== 'Deleted User' && !isOpaqueXmppUserId(message.user.name) ? message.user.name : '';
|
|
237
|
+
const safeSenderLocal = isOpaqueXmppUserId(senderLocal) ? '' : senderLocal;
|
|
238
|
+
// Ask the backend for a sender nobody has told us about (a big room ships
|
|
239
|
+
// only 30 members). The resolver debounces and de-duplicates.
|
|
240
|
+
useEffect(() => {
|
|
241
|
+
if (!senderEntry && senderLocal) requestUsers([senderLocal]);
|
|
242
|
+
}, [senderEntry, senderLocal]);
|
|
243
|
+
const lookupStatus = useSyncExternalStore(subscribeUserResolver, () => getUserLookupStatus(senderLocal), () => 'pending');
|
|
244
|
+
// The sender's name stamped on the stanza's <data> by clients of this SDK.
|
|
245
|
+
// LAST resort only (older clients and backends): used once the lookup has
|
|
246
|
+
// finished without a name, and never written into usersSet. Insert-time
|
|
247
|
+
// enrichment may have baked it into message.user.name, so a message name
|
|
248
|
+
// equal to it counts as <data>, not as a member name.
|
|
249
|
+
const dataFull = String(message?.fullName || '').trim();
|
|
250
|
+
const dataComposed = dataFull || `${String(message?.senderFirstName || '').trim()} ${String(message?.senderLastName || '').trim()}`.trim();
|
|
251
|
+
const trustedMessageName = safeMessageName && safeMessageName !== dataComposed ? safeMessageName : '';
|
|
252
|
+
// Chain: usersSet (member or lookup result) > a name from a member/seed >
|
|
253
|
+
// muted placeholder while the lookup is pending > <data> name > readable
|
|
254
|
+
// id > Unknown user ('Deleted User' only when the backend said 404).
|
|
255
|
+
const senderNamePending = !usersSetDisplayName && !trustedMessageName && lookupStatus === 'pending';
|
|
256
|
+
const unresolvedPlaceholder = lookupStatus === 'notfound' && !dataComposed ? 'Deleted User' : t('user.unknown');
|
|
257
|
+
const senderDisplayName = senderNamePending ? SENDER_NAME_PLACEHOLDER : usersSetDisplayName || trustedMessageName || dataComposed || safeSenderLocal || unresolvedPlaceholder;
|
|
258
|
+
// The placeholder is a loading state, not a name: it must not seed the
|
|
259
|
+
// generic avatar's initials or a stale caption.
|
|
260
|
+
//
|
|
231
261
|
// A broadcast posted by the app itself arrives with the ROOM's own id as
|
|
232
262
|
// its occupant resource, so no roster ever resolves it and the name chain
|
|
233
263
|
// ends at 50 characters of hex. Captioning a bubble with that tells the
|
|
@@ -362,17 +392,6 @@ const Message = ({
|
|
|
362
392
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
363
393
|
[config?.disableInteractions]);
|
|
364
394
|
|
|
365
|
-
// The bubble lifts a touch while its menu is open, and settles back.
|
|
366
|
-
const lift = useRef(new Animated.Value(1)).current;
|
|
367
|
-
useEffect(() => {
|
|
368
|
-
Animated.spring(lift, {
|
|
369
|
-
toValue: isPressed ? 1.03 : 1,
|
|
370
|
-
useNativeDriver: true,
|
|
371
|
-
speed: 30,
|
|
372
|
-
bounciness: 6
|
|
373
|
-
}).start();
|
|
374
|
-
}, [isPressed, lift]);
|
|
375
|
-
|
|
376
395
|
// Body text size/weight is set on the parser's leaf <Text>s — the markdown
|
|
377
396
|
// wraps content in <View>s which break Text-style inheritance, so the bubble
|
|
378
397
|
// wrapper's fontSize alone never reached the actual text.
|
|
@@ -398,6 +417,117 @@ const Message = ({
|
|
|
398
417
|
retryMessage(message.id);
|
|
399
418
|
}
|
|
400
419
|
};
|
|
420
|
+
|
|
421
|
+
// The bubble, as a function: the list draws it in place, and the context
|
|
422
|
+
// menu draws a second copy over the dimmed chat (WhatsApp style) while
|
|
423
|
+
// the original steps aside.
|
|
424
|
+
const renderBubble = preview => /*#__PURE__*/_jsxs(CustomMessageBubble, {
|
|
425
|
+
...(preview ?
|
|
426
|
+
// The copy in the context menu: same look, full measured
|
|
427
|
+
// width (its box is the original's), never the measuring
|
|
428
|
+
// target.
|
|
429
|
+
{
|
|
430
|
+
style: styles.previewBubble
|
|
431
|
+
} : {
|
|
432
|
+
ref: bubbleRef,
|
|
433
|
+
collapsable: false,
|
|
434
|
+
// Hidden while the menu shows its copy over the dim, so
|
|
435
|
+
// the message is not on screen twice.
|
|
436
|
+
style: isPressed && contextMenuPosition ? styles.hiddenBubble : undefined
|
|
437
|
+
}),
|
|
438
|
+
isUser: isUser,
|
|
439
|
+
deleted: message.isDeleted,
|
|
440
|
+
isMedia: message?.isMediafile === 'true' && !message?.isDeleted,
|
|
441
|
+
children: [!isUser && hasRealSenderName && /*#__PURE__*/_jsx(CustomUserName
|
|
442
|
+
// Historically `config.colors.primary` with a plain-text
|
|
443
|
+
// fallback; theme.primary carries the same value in light
|
|
444
|
+
// mode and the dark accent in dark mode.
|
|
445
|
+
, {
|
|
446
|
+
color: config?.colors?.primary ? theme.primary : undefined,
|
|
447
|
+
media: message?.isMediafile === 'true',
|
|
448
|
+
fontSize: config?.typography?.senderName?.fontSize,
|
|
449
|
+
fontWeight: config?.typography?.senderName?.fontWeight,
|
|
450
|
+
style: senderNamePending ? styles.pendingName : undefined,
|
|
451
|
+
children: senderDisplayName
|
|
452
|
+
}), !isReply && !!replyRef?.text && /*#__PURE__*/_jsx(MessageReply, {
|
|
453
|
+
handleReplyMessage: handleReplyMessage,
|
|
454
|
+
isUser: isUser,
|
|
455
|
+
text: replyRef.text,
|
|
456
|
+
userName: replyRef.userName,
|
|
457
|
+
color: theme.primary
|
|
458
|
+
}), message?.isMediafile === 'true' && !message?.isDeleted ? /*#__PURE__*/_jsx(MediaMessage, {
|
|
459
|
+
mimeType: message.mimetype,
|
|
460
|
+
messageText: message.locationPreview,
|
|
461
|
+
location: message?.location,
|
|
462
|
+
message: message,
|
|
463
|
+
isUser: isUser
|
|
464
|
+
}) : /*#__PURE__*/_jsx(_Fragment, {
|
|
465
|
+
children: message.isDeleted && message.id !== 'delimiter-new' ? /*#__PURE__*/_jsx(DeletedMessage, {}) : isUndecryptable ? /*#__PURE__*/_jsxs(View, {
|
|
466
|
+
style: styles.undecryptable,
|
|
467
|
+
children: [/*#__PURE__*/_jsx(LockIcon, {
|
|
468
|
+
width: 15,
|
|
469
|
+
height: 15,
|
|
470
|
+
color: theme.textSecondary
|
|
471
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
472
|
+
style: [styles.undecryptableText, themedStyles.muted, {
|
|
473
|
+
fontSize: config?.typography?.messageText?.fontSize ?? 15
|
|
474
|
+
}],
|
|
475
|
+
children: t(placeholderKey(message.e2eeError))
|
|
476
|
+
})]
|
|
477
|
+
}) : /*#__PURE__*/_jsx(CustomMessageText, {
|
|
478
|
+
isUser: isUser,
|
|
479
|
+
fontSize: config?.typography?.messageText?.fontSize,
|
|
480
|
+
fontWeight: config?.typography?.messageText?.fontWeight,
|
|
481
|
+
children: showInlineTranslation ? /*#__PURE__*/_jsx(TranslatedMessageBody, {
|
|
482
|
+
isUser: isUser,
|
|
483
|
+
originalText: translationDisplay.originalText,
|
|
484
|
+
accentColor: theme.primary,
|
|
485
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
486
|
+
children: messageText
|
|
487
|
+
})
|
|
488
|
+
}) : /*#__PURE__*/_jsx(Text, {
|
|
489
|
+
children: messageText
|
|
490
|
+
})
|
|
491
|
+
})
|
|
492
|
+
}), !isUser && !isUndecryptable && isTranslatesEnabled && effectiveTranslateMode === 'manual' && /*#__PURE__*/_jsx(MessageTranslate, {
|
|
493
|
+
message: message,
|
|
494
|
+
config: config,
|
|
495
|
+
isUser: isUser,
|
|
496
|
+
readerLocale: readerLocale
|
|
497
|
+
}), /*#__PURE__*/_jsxs(CustomTimestampRow, {
|
|
498
|
+
media: message?.isMediafile === 'true',
|
|
499
|
+
children: [!config?.disableSentLogic && isUser && isPending && /*#__PURE__*/_jsx(Text, {
|
|
500
|
+
style: [styles.timestampText, themedStyles.muted],
|
|
501
|
+
children: t('message.sending')
|
|
502
|
+
}), !config?.disableSentLogic && isUser && isFailed && /*#__PURE__*/_jsx(Text, {
|
|
503
|
+
onPress: onRetryPress,
|
|
504
|
+
style: [styles.failedText, themedStyles.failed],
|
|
505
|
+
accessibilityRole: "button",
|
|
506
|
+
accessibilityLabel: "Retry sending message",
|
|
507
|
+
children: t('message.failedRetry')
|
|
508
|
+
}), message?.isEdited && !message?.isDeleted && /*#__PURE__*/_jsx(Text, {
|
|
509
|
+
style: [styles.editedText, themedStyles.muted],
|
|
510
|
+
children: t('message.edited')
|
|
511
|
+
}), message?.unencrypted && !message?.isDeleted && /*#__PURE__*/_jsx(Pressable, {
|
|
512
|
+
hitSlop: 10,
|
|
513
|
+
accessibilityRole: "button",
|
|
514
|
+
accessibilityLabel: t('e2ee.notEncrypted'),
|
|
515
|
+
accessibilityHint: t('e2ee.notEncryptedHint'),
|
|
516
|
+
testID: "message-not-encrypted",
|
|
517
|
+
onPress: () => Alert.alert(t('e2ee.notEncrypted'), t('e2ee.notEncryptedHint')),
|
|
518
|
+
children: /*#__PURE__*/_jsx(LockOffIcon, {
|
|
519
|
+
width: 13,
|
|
520
|
+
height: 13,
|
|
521
|
+
color: theme.danger
|
|
522
|
+
})
|
|
523
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
524
|
+
style: [styles.timestampText, themedStyles.muted],
|
|
525
|
+
children: timeLabel
|
|
526
|
+
}), !config?.disableSentLogic && isUser && !isPending && !isFailed && /*#__PURE__*/_jsx(DoubleTick, {})]
|
|
527
|
+
}), !preview && /*#__PURE__*/_jsx(BubbleHighlight, {
|
|
528
|
+
messageId: String(message.id)
|
|
529
|
+
})]
|
|
530
|
+
});
|
|
401
531
|
return /*#__PURE__*/_jsxs(View, {
|
|
402
532
|
children: [isPressed && /*#__PURE__*/_jsx(View, {
|
|
403
533
|
style: styles.overlay
|
|
@@ -426,7 +556,8 @@ const Message = ({
|
|
|
426
556
|
profileImage: senderEntry.profileImage,
|
|
427
557
|
description: senderEntry.description
|
|
428
558
|
} : {}),
|
|
429
|
-
|
|
559
|
+
// The pending placeholder is not a name.
|
|
560
|
+
name: hasRealSenderName && !senderNamePending ? senderDisplayName : ''
|
|
430
561
|
}),
|
|
431
562
|
disabled: !!config?.disableProfilesInteractions,
|
|
432
563
|
accessible: !config?.disableProfilesInteractions,
|
|
@@ -442,7 +573,7 @@ const Message = ({
|
|
|
442
573
|
setAvatarFailed(rawProfileImage);
|
|
443
574
|
}
|
|
444
575
|
}) : /*#__PURE__*/_jsx(Avatar, {
|
|
445
|
-
username: senderDisplayName
|
|
576
|
+
username: senderNamePending ? '' : senderDisplayName
|
|
446
577
|
})
|
|
447
578
|
}), /*#__PURE__*/_jsx(GestureDetector, {
|
|
448
579
|
gesture: longPress,
|
|
@@ -469,105 +600,8 @@ const Message = ({
|
|
|
469
600
|
// long-press never triggers this dismiss.
|
|
470
601
|
,
|
|
471
602
|
onPress: () => Keyboard.dismiss(),
|
|
472
|
-
children: /*#__PURE__*/_jsxs(
|
|
473
|
-
|
|
474
|
-
transform: [{
|
|
475
|
-
scale: lift
|
|
476
|
-
}]
|
|
477
|
-
},
|
|
478
|
-
children: [/*#__PURE__*/_jsxs(CustomMessageBubble, {
|
|
479
|
-
ref: bubbleRef,
|
|
480
|
-
collapsable: false,
|
|
481
|
-
isUser: isUser,
|
|
482
|
-
deleted: message.isDeleted,
|
|
483
|
-
isMedia: message?.isMediafile === 'true' && !message?.isDeleted,
|
|
484
|
-
children: [!isUser && hasRealSenderName && /*#__PURE__*/_jsx(CustomUserName
|
|
485
|
-
// Historically `config.colors.primary` with a plain-text
|
|
486
|
-
// fallback; theme.primary carries the same value in light
|
|
487
|
-
// mode and the dark accent in dark mode.
|
|
488
|
-
, {
|
|
489
|
-
color: config?.colors?.primary ? theme.primary : undefined,
|
|
490
|
-
media: message?.isMediafile === 'true',
|
|
491
|
-
fontSize: config?.typography?.senderName?.fontSize,
|
|
492
|
-
fontWeight: config?.typography?.senderName?.fontWeight,
|
|
493
|
-
children: senderDisplayName
|
|
494
|
-
}), !isReply && !!replyRef?.text && /*#__PURE__*/_jsx(MessageReply, {
|
|
495
|
-
handleReplyMessage: handleReplyMessage,
|
|
496
|
-
isUser: isUser,
|
|
497
|
-
text: replyRef.text,
|
|
498
|
-
userName: replyRef.userName,
|
|
499
|
-
color: theme.primary
|
|
500
|
-
}), message?.isMediafile === 'true' && !message?.isDeleted ? /*#__PURE__*/_jsx(MediaMessage, {
|
|
501
|
-
mimeType: message.mimetype,
|
|
502
|
-
messageText: message.locationPreview,
|
|
503
|
-
location: message?.location,
|
|
504
|
-
message: message,
|
|
505
|
-
isUser: isUser
|
|
506
|
-
}) : /*#__PURE__*/_jsx(_Fragment, {
|
|
507
|
-
children: message.isDeleted && message.id !== 'delimiter-new' ? /*#__PURE__*/_jsx(DeletedMessage, {}) : isUndecryptable ? /*#__PURE__*/_jsxs(View, {
|
|
508
|
-
style: styles.undecryptable,
|
|
509
|
-
children: [/*#__PURE__*/_jsx(LockIcon, {
|
|
510
|
-
width: 15,
|
|
511
|
-
height: 15,
|
|
512
|
-
color: theme.textSecondary
|
|
513
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
514
|
-
style: [styles.undecryptableText, themedStyles.muted, {
|
|
515
|
-
fontSize: config?.typography?.messageText?.fontSize ?? 15
|
|
516
|
-
}],
|
|
517
|
-
children: t(placeholderKey(message.e2eeError))
|
|
518
|
-
})]
|
|
519
|
-
}) : /*#__PURE__*/_jsx(CustomMessageText, {
|
|
520
|
-
isUser: isUser,
|
|
521
|
-
fontSize: config?.typography?.messageText?.fontSize,
|
|
522
|
-
fontWeight: config?.typography?.messageText?.fontWeight,
|
|
523
|
-
children: showInlineTranslation ? /*#__PURE__*/_jsx(TranslatedMessageBody, {
|
|
524
|
-
isUser: isUser,
|
|
525
|
-
originalText: translationDisplay.originalText,
|
|
526
|
-
accentColor: theme.primary,
|
|
527
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
528
|
-
children: messageText
|
|
529
|
-
})
|
|
530
|
-
}) : /*#__PURE__*/_jsx(Text, {
|
|
531
|
-
children: messageText
|
|
532
|
-
})
|
|
533
|
-
})
|
|
534
|
-
}), !isUser && !isUndecryptable && isTranslatesEnabled && effectiveTranslateMode === 'manual' && /*#__PURE__*/_jsx(MessageTranslate, {
|
|
535
|
-
message: message,
|
|
536
|
-
config: config,
|
|
537
|
-
isUser: isUser,
|
|
538
|
-
readerLocale: readerLocale
|
|
539
|
-
}), /*#__PURE__*/_jsxs(CustomTimestampRow, {
|
|
540
|
-
media: message?.isMediafile === 'true',
|
|
541
|
-
children: [!config?.disableSentLogic && isUser && isPending && /*#__PURE__*/_jsx(Text, {
|
|
542
|
-
style: [styles.timestampText, themedStyles.muted],
|
|
543
|
-
children: t('message.sending')
|
|
544
|
-
}), !config?.disableSentLogic && isUser && isFailed && /*#__PURE__*/_jsx(Text, {
|
|
545
|
-
onPress: onRetryPress,
|
|
546
|
-
style: [styles.failedText, themedStyles.failed],
|
|
547
|
-
accessibilityRole: "button",
|
|
548
|
-
accessibilityLabel: "Retry sending message",
|
|
549
|
-
children: t('message.failedRetry')
|
|
550
|
-
}), message?.isEdited && !message?.isDeleted && /*#__PURE__*/_jsx(Text, {
|
|
551
|
-
style: [styles.editedText, themedStyles.muted],
|
|
552
|
-
children: t('message.edited')
|
|
553
|
-
}), message?.unencrypted && !message?.isDeleted && /*#__PURE__*/_jsx(Pressable, {
|
|
554
|
-
hitSlop: 10,
|
|
555
|
-
accessibilityRole: "button",
|
|
556
|
-
accessibilityLabel: t('e2ee.notEncrypted'),
|
|
557
|
-
accessibilityHint: t('e2ee.notEncryptedHint'),
|
|
558
|
-
testID: "message-not-encrypted",
|
|
559
|
-
onPress: () => Alert.alert(t('e2ee.notEncrypted'), t('e2ee.notEncryptedHint')),
|
|
560
|
-
children: /*#__PURE__*/_jsx(LockOffIcon, {
|
|
561
|
-
width: 13,
|
|
562
|
-
height: 13,
|
|
563
|
-
color: theme.danger
|
|
564
|
-
})
|
|
565
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
566
|
-
style: [styles.timestampText, themedStyles.muted],
|
|
567
|
-
children: timeLabel
|
|
568
|
-
}), !config?.disableSentLogic && isUser && !isPending && !isFailed && /*#__PURE__*/_jsx(DoubleTick, {})]
|
|
569
|
-
})]
|
|
570
|
-
}), (!isReply && (message?.reply?.length || 0) > 0 || !!message.reaction && reactionsEnabled(config)) && /*#__PURE__*/_jsxs(View, {
|
|
603
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
604
|
+
children: [renderBubble(false), (!isReply && (message?.reply?.length || 0) > 0 || !!message.reaction && reactionsEnabled(config)) && /*#__PURE__*/_jsxs(View, {
|
|
571
605
|
style: [styles.reactionRow, isUser ? styles.reactionRowUser : styles.reactionRowOther],
|
|
572
606
|
children: [!isReply && (message?.reply?.length || 0) > 0 && /*#__PURE__*/_jsx(BottomReplyContainer, {
|
|
573
607
|
isUser: isUser,
|
|
@@ -594,7 +628,8 @@ const Message = ({
|
|
|
594
628
|
handleDeleteMessage: handleDeleteMessage,
|
|
595
629
|
handleEditMessage: handleEditMessage,
|
|
596
630
|
handleReactionMessage: handleReactionMessage,
|
|
597
|
-
onOpenEmojiPicker: () => setEmojiPickerOpen(true)
|
|
631
|
+
onOpenEmojiPicker: () => setEmojiPickerOpen(true),
|
|
632
|
+
preview: renderBubble(true)
|
|
598
633
|
}), emojiPickerOpen && /*#__PURE__*/_jsx(EmojiPickerSheet, {
|
|
599
634
|
visible: true,
|
|
600
635
|
onClose: () => setEmojiPickerOpen(false),
|
|
@@ -605,6 +640,16 @@ const Message = ({
|
|
|
605
640
|
const MemoMessage = /*#__PURE__*/React.memo(Message);
|
|
606
641
|
export { MemoMessage as Message };
|
|
607
642
|
const styles = StyleSheet.create({
|
|
643
|
+
previewBubble: {
|
|
644
|
+
maxWidth: '100%'
|
|
645
|
+
},
|
|
646
|
+
hiddenBubble: {
|
|
647
|
+
opacity: 0
|
|
648
|
+
},
|
|
649
|
+
pendingName: {
|
|
650
|
+
opacity: 0.5,
|
|
651
|
+
minWidth: 14
|
|
652
|
+
},
|
|
608
653
|
customMessageContainer: {
|
|
609
654
|
flexDirection: 'row',
|
|
610
655
|
padding: 10,
|