@ethora/chat-component-rn 26.8.1 → 26.8.3
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 +110 -0
- package/README.md +70 -11
- package/lib/commonjs/assets/EmptyChatIllustration.js +7 -6
- package/lib/commonjs/assets/EmptyChatIllustration.js.map +1 -1
- package/lib/commonjs/assets/icons.js +7 -2
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/AuthForms/Login.js +27 -12
- package/lib/commonjs/components/AuthForms/Login.js.map +1 -1
- package/lib/commonjs/components/ContextMenu/ContextMenuComponents.js +12 -4
- package/lib/commonjs/components/ContextMenu/ContextMenuComponents.js.map +1 -1
- package/lib/commonjs/components/DropdownMenu/DropdownMenu.js +16 -9
- package/lib/commonjs/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/lib/commonjs/components/ExampleComponents/CustomMessage.js +25 -7
- package/lib/commonjs/components/ExampleComponents/CustomMessage.js.map +1 -1
- package/lib/commonjs/components/ExampleComponents/CustomTypingIndicatorExamples.js +18 -6
- package/lib/commonjs/components/ExampleComponents/CustomTypingIndicatorExamples.js.map +1 -1
- package/lib/commonjs/components/Header/HeaderRoomList.js +34 -10
- package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/commonjs/components/InputComponents/Search.js +13 -4
- package/lib/commonjs/components/InputComponents/Search.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js +18 -6
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatRoom.js +154 -15
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatWrapper.js +42 -19
- package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js +37 -10
- package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js.map +1 -1
- package/lib/commonjs/components/MainComponents/LoginWrapper.js +2 -1
- package/lib/commonjs/components/MainComponents/LoginWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MediaMessage.js +72 -28
- package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js +5 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageList.js +22 -8
- package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js +14 -13
- package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RNStyled.js +12 -4
- package/lib/commonjs/components/MainComponents/RNStyled.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js +25 -8
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomList.js +214 -38
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/Select.js +29 -8
- package/lib/commonjs/components/MainComponents/Select.js.map +1 -1
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +329 -99
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/BottomReplyContainer.js +24 -8
- package/lib/commonjs/components/MessageBubble/BottomReplyContainer.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/Message.js +46 -24
- package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js +15 -4
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageReaction.js +10 -5
- package/lib/commonjs/components/MessageBubble/MessageReaction.js.map +1 -1
- package/lib/commonjs/components/Modals/AddMembersModal/AddMembersModal.js +1 -5
- package/lib/commonjs/components/Modals/AddMembersModal/AddMembersModal.js.map +1 -1
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +345 -118
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +599 -203
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/DeleteChatModal.js +5 -7
- package/lib/commonjs/components/Modals/ChatProfileModal/DeleteChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +230 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +89 -36
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js +2 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
- package/lib/commonjs/components/Modals/Modal/Modal.js +8 -0
- package/lib/commonjs/components/Modals/Modal/Modal.js.map +1 -1
- package/lib/commonjs/components/Modals/ModalHeaderComponent.js +8 -2
- package/lib/commonjs/components/Modals/ModalHeaderComponent.js.map +1 -1
- package/lib/commonjs/components/Modals/ModalWrapper/ModalWrapper.js +8 -8
- package/lib/commonjs/components/Modals/ModalWrapper/ModalWrapper.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js +3 -6
- package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js +205 -106
- package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
- package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js +563 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +215 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +7 -9
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js +8 -6
- package/lib/commonjs/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/Referrals/Referrals.js +7 -2
- package/lib/commonjs/components/Modals/SettingsModals/Referrals/Referrals.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/SharedStyledComponents.js +7 -3
- package/lib/commonjs/components/Modals/SettingsModals/SharedStyledComponents.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/RadioInput.js +10 -6
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/RadioInput.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/VisibilityModal.js +7 -6
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/VisibilityModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js +10 -22
- package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +510 -244
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +77 -46
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/commonjs/components/Modals/styledModalComponents.js +68 -17
- package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +30 -10
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js +6 -2
- package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js +22 -3
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js +17 -3
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js +17 -3
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/StyledRoomComponents.js +6 -0
- package/lib/commonjs/components/RoomComponents/styled/StyledRoomComponents.js.map +1 -1
- package/lib/commonjs/components/Thread/ThreadWrapper.js +9 -2
- package/lib/commonjs/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/commonjs/components/Toast/Toast.js +3 -1
- package/lib/commonjs/components/Toast/Toast.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js +6 -3
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/commonjs/components/styled/AudioMessage.js +18 -12
- package/lib/commonjs/components/styled/AudioMessage.js.map +1 -1
- package/lib/commonjs/components/styled/Button.js +18 -9
- package/lib/commonjs/components/styled/Button.js.map +1 -1
- package/lib/commonjs/components/styled/DateLabel.js +8 -5
- package/lib/commonjs/components/styled/DateLabel.js.map +1 -1
- package/lib/commonjs/components/styled/MediaModal.js +27 -21
- package/lib/commonjs/components/styled/MediaModal.js.map +1 -1
- package/lib/commonjs/components/styled/MessageImage.js +37 -9
- package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
- package/lib/commonjs/components/styled/RoomListComponents/index.js +60 -38
- package/lib/commonjs/components/styled/RoomListComponents/index.js.map +1 -1
- package/lib/commonjs/components/styled/SendInput.js +93 -19
- package/lib/commonjs/components/styled/SendInput.js.map +1 -1
- package/lib/commonjs/components/styled/StyledComponents.js +75 -25
- package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInput.js +32 -18
- package/lib/commonjs/components/styled/StyledInput.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/CustomTypingIndicator.js +13 -8
- package/lib/commonjs/components/styled/StyledInputComponents/CustomTypingIndicator.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/MediaComponents.js +20 -9
- package/lib/commonjs/components/styled/StyledInputComponents/MediaComponents.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +50 -22
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/commonjs/components/styled/TreadLabel.js +6 -3
- package/lib/commonjs/components/styled/TreadLabel.js.map +1 -1
- package/lib/commonjs/components/styled/UnsupportedType.js +14 -4
- package/lib/commonjs/components/styled/UnsupportedType.js.map +1 -1
- package/lib/commonjs/components/styled/VideoMessage.js +119 -61
- package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
- package/lib/commonjs/context/MessageNotificationContext.js +14 -3
- package/lib/commonjs/context/MessageNotificationContext.js.map +1 -1
- package/lib/commonjs/context/xmppProvider.js +184 -59
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/helpers/createMessageFromXml.js +19 -1
- package/lib/commonjs/helpers/createMessageFromXml.js.map +1 -1
- package/lib/commonjs/helpers/ensureScopedChatCache.js +2 -2
- package/lib/commonjs/helpers/ensureScopedChatCache.js.map +1 -1
- package/lib/commonjs/helpers/getChatBackground.js +26 -0
- package/lib/commonjs/helpers/getChatBackground.js.map +1 -0
- package/lib/commonjs/helpers/getDateLabelColor.js +3 -1
- package/lib/commonjs/helpers/getDateLabelColor.js.map +1 -1
- package/lib/commonjs/helpers/getDisplayFileName.js +79 -0
- package/lib/commonjs/helpers/getDisplayFileName.js.map +1 -0
- package/lib/commonjs/helpers/getIconColor.js +4 -1
- package/lib/commonjs/helpers/getIconColor.js.map +1 -1
- package/lib/commonjs/helpers/getSenderNameColor.js +3 -1
- package/lib/commonjs/helpers/getSenderNameColor.js.map +1 -1
- package/lib/commonjs/helpers/getServerReadTimestamp.js +188 -0
- package/lib/commonjs/helpers/getServerReadTimestamp.js.map +1 -0
- package/lib/commonjs/helpers/historyPreloadScheduler.js +65 -2
- package/lib/commonjs/helpers/historyPreloadScheduler.js.map +1 -1
- package/lib/commonjs/helpers/initXmppRooms.js +14 -8
- package/lib/commonjs/helpers/initXmppRooms.js.map +1 -1
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js +51 -9
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/commonjs/helpers/isOwnMessage.js +75 -0
- package/lib/commonjs/helpers/isOwnMessage.js.map +1 -0
- package/lib/commonjs/helpers/keyboardLayout.js +12 -2
- package/lib/commonjs/helpers/keyboardLayout.js.map +1 -1
- package/lib/commonjs/helpers/markdownParser.js +27 -5
- package/lib/commonjs/helpers/markdownParser.js.map +1 -1
- package/lib/commonjs/helpers/mediaLibraryRuntime.js +31 -0
- package/lib/commonjs/helpers/mediaLibraryRuntime.js.map +1 -0
- package/lib/commonjs/helpers/mimeToExtension.js +6 -14
- package/lib/commonjs/helpers/mimeToExtension.js.map +1 -1
- package/lib/commonjs/helpers/msgSortableMs.js +37 -0
- package/lib/commonjs/helpers/msgSortableMs.js.map +1 -0
- package/lib/commonjs/helpers/parseMessageBody.js +82 -24
- package/lib/commonjs/helpers/parseMessageBody.js.map +1 -1
- package/lib/commonjs/helpers/persistCrypto.js +122 -0
- package/lib/commonjs/helpers/persistCrypto.js.map +1 -0
- package/lib/commonjs/helpers/pickImageAsset.js +68 -0
- package/lib/commonjs/helpers/pickImageAsset.js.map +1 -0
- package/lib/commonjs/helpers/pushPayload.js +71 -0
- package/lib/commonjs/helpers/pushPayload.js.map +1 -0
- package/lib/commonjs/helpers/resolveInitBeforeLoadUser.js +130 -17
- package/lib/commonjs/helpers/resolveInitBeforeLoadUser.js.map +1 -1
- package/lib/commonjs/helpers/secureFileUrl.js +101 -0
- package/lib/commonjs/helpers/secureFileUrl.js.map +1 -0
- package/lib/commonjs/helpers/secureKeyValue.js +83 -0
- package/lib/commonjs/helpers/secureKeyValue.js.map +1 -0
- package/lib/commonjs/helpers/secureStoreRuntime.js +59 -0
- package/lib/commonjs/helpers/secureStoreRuntime.js.map +1 -0
- package/lib/commonjs/helpers/secureUserStorage.js +75 -0
- package/lib/commonjs/helpers/secureUserStorage.js.map +1 -0
- package/lib/commonjs/helpers/shallowEqual.js +36 -0
- package/lib/commonjs/helpers/shallowEqual.js.map +1 -0
- package/lib/commonjs/helpers/sheetGestures.js +32 -0
- package/lib/commonjs/helpers/sheetGestures.js.map +1 -0
- package/lib/commonjs/hooks/useChatRoomFocus.js +45 -12
- package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/commonjs/hooks/useChatWrapperInit.js +30 -10
- package/lib/commonjs/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/commonjs/hooks/useComposing.js +27 -0
- package/lib/commonjs/hooks/useComposing.js.map +1 -1
- package/lib/commonjs/hooks/useCustomTypingIndicator.js +7 -3
- package/lib/commonjs/hooks/useCustomTypingIndicator.js.map +1 -1
- package/lib/commonjs/hooks/useFileToken.js +10 -0
- package/lib/commonjs/hooks/useFileToken.js.map +1 -0
- package/lib/commonjs/hooks/useLogout.js +33 -10
- package/lib/commonjs/hooks/useLogout.js.map +1 -1
- package/lib/commonjs/hooks/usePendingNotification.js +8 -11
- package/lib/commonjs/hooks/usePendingNotification.js.map +1 -1
- package/lib/commonjs/hooks/useSendMessage.js +50 -14
- package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
- package/lib/commonjs/hooks/useTheme.js +35 -0
- package/lib/commonjs/hooks/useTheme.js.map +1 -0
- package/lib/commonjs/hooks/useUnreadMessagesCounter.js +6 -1
- package/lib/commonjs/hooks/useUnreadMessagesCounter.js.map +1 -1
- package/lib/commonjs/i18n/strings.js +163 -37
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/main.js +119 -0
- package/lib/commonjs/main.js.map +1 -1
- package/lib/commonjs/networking/api-requests/auth.api.js +134 -60
- package/lib/commonjs/networking/api-requests/auth.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/push.api.js +130 -45
- package/lib/commonjs/networking/api-requests/push.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/roomMembers.api.js +1 -1
- package/lib/commonjs/networking/api-requests/roomMembers.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +22 -9
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/user.api.js +68 -9
- package/lib/commonjs/networking/api-requests/user.api.js.map +1 -1
- package/lib/commonjs/networking/apiClient.js +62 -112
- package/lib/commonjs/networking/apiClient.js.map +1 -1
- package/lib/commonjs/networking/authRefresh.js +332 -0
- package/lib/commonjs/networking/authRefresh.js.map +1 -0
- package/lib/commonjs/networking/stanzaHandlers.js +41 -28
- package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js +46 -8
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js +8 -1
- package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
- package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js +124 -8
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/roomStore/chatSettingsSlice.js +26 -7
- package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/commonjs/roomStore/index.js +35 -2
- package/lib/commonjs/roomStore/index.js.map +1 -1
- package/lib/commonjs/roomStore/persistence.js +226 -23
- package/lib/commonjs/roomStore/persistence.js.map +1 -1
- package/lib/commonjs/roomStore/roomsSlice.js +151 -38
- package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
- package/lib/commonjs/services/pushRegistration.js +250 -0
- package/lib/commonjs/services/pushRegistration.js.map +1 -0
- package/lib/commonjs/services/pushSubscriptionService.js +15 -37
- package/lib/commonjs/services/pushSubscriptionService.js.map +1 -1
- package/lib/commonjs/theme/index.js +38 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/theme/styled.d.js +4 -0
- package/lib/commonjs/theme/styled.d.js.map +1 -0
- package/lib/commonjs/theme/theme.js +137 -0
- package/lib/commonjs/theme/theme.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/assets/EmptyChatIllustration.js +7 -6
- package/lib/module/assets/EmptyChatIllustration.js.map +1 -1
- package/lib/module/assets/icons.js +6 -1
- package/lib/module/assets/icons.js.map +1 -1
- package/lib/module/components/AuthForms/Login.js +27 -12
- package/lib/module/components/AuthForms/Login.js.map +1 -1
- package/lib/module/components/ContextMenu/ContextMenuComponents.js +12 -4
- package/lib/module/components/ContextMenu/ContextMenuComponents.js.map +1 -1
- package/lib/module/components/DropdownMenu/DropdownMenu.js +16 -9
- package/lib/module/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/lib/module/components/ExampleComponents/CustomMessage.js +25 -7
- package/lib/module/components/ExampleComponents/CustomMessage.js.map +1 -1
- package/lib/module/components/ExampleComponents/CustomTypingIndicatorExamples.js +18 -6
- package/lib/module/components/ExampleComponents/CustomTypingIndicatorExamples.js.map +1 -1
- package/lib/module/components/Header/HeaderRoomList.js +34 -10
- package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/module/components/InputComponents/Search.js +13 -4
- package/lib/module/components/InputComponents/Search.js.map +1 -1
- package/lib/module/components/MainComponents/ChatHeader.js +18 -6
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/ChatRoom.js +156 -17
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/ChatWrapper.js +43 -20
- package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/LanguageSelectorModal.js +37 -10
- package/lib/module/components/MainComponents/LanguageSelectorModal.js.map +1 -1
- package/lib/module/components/MainComponents/LoginWrapper.js +2 -1
- package/lib/module/components/MainComponents/LoginWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/MediaMessage.js +72 -29
- package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/module/components/MainComponents/MessageContainer.js +5 -1
- package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/module/components/MainComponents/MessageList.js +22 -8
- package/lib/module/components/MainComponents/MessageList.js.map +1 -1
- package/lib/module/components/MainComponents/ProfileImagePlaceholder.js +14 -13
- package/lib/module/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
- package/lib/module/components/MainComponents/RNStyled.js +12 -4
- package/lib/module/components/MainComponents/RNStyled.js.map +1 -1
- package/lib/module/components/MainComponents/ReduxWrapper.js +25 -8
- package/lib/module/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/RoomList.js +213 -38
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/MainComponents/Select.js +29 -8
- package/lib/module/components/MainComponents/Select.js.map +1 -1
- package/lib/module/components/Menu/HeaderRoomListMenu.js +331 -102
- package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/module/components/MessageBubble/BottomReplyContainer.js +24 -8
- package/lib/module/components/MessageBubble/BottomReplyContainer.js.map +1 -1
- package/lib/module/components/MessageBubble/Message.js +47 -25
- package/lib/module/components/MessageBubble/Message.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageInteractions.js +15 -4
- package/lib/module/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageReaction.js +10 -5
- package/lib/module/components/MessageBubble/MessageReaction.js.map +1 -1
- package/lib/module/components/Modals/AddMembersModal/AddMembersModal.js +2 -6
- package/lib/module/components/Modals/AddMembersModal/AddMembersModal.js.map +1 -1
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js +336 -121
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +603 -208
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/DeleteChatModal.js +6 -8
- package/lib/module/components/Modals/ChatProfileModal/DeleteChatModal.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +225 -0
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +90 -37
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/PdfView.js +2 -1
- package/lib/module/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
- package/lib/module/components/Modals/Modal/Modal.js +9 -1
- package/lib/module/components/Modals/Modal/Modal.js.map +1 -1
- package/lib/module/components/Modals/ModalHeaderComponent.js +8 -2
- package/lib/module/components/Modals/ModalHeaderComponent.js.map +1 -1
- package/lib/module/components/Modals/ModalWrapper/ModalWrapper.js +10 -10
- package/lib/module/components/Modals/ModalWrapper/ModalWrapper.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/ModalContent.js +4 -7
- package/lib/module/components/Modals/NewChatModal/ModalContent.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/NewChatModal.js +208 -108
- package/lib/module/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
- package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
- package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js +555 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +210 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +8 -10
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js +8 -6
- package/lib/module/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/Referrals/Referrals.js +7 -2
- package/lib/module/components/Modals/SettingsModals/Referrals/Referrals.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/SharedStyledComponents.js +7 -3
- package/lib/module/components/Modals/SettingsModals/SharedStyledComponents.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/Visibility/RadioInput.js +10 -6
- package/lib/module/components/Modals/SettingsModals/Visibility/RadioInput.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/Visibility/VisibilityModal.js +7 -6
- package/lib/module/components/Modals/SettingsModals/Visibility/VisibilityModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/EditUserModal.js +11 -24
- package/lib/module/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +512 -248
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +79 -48
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/module/components/Modals/styledModalComponents.js +67 -16
- package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js +30 -10
- package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastAudioMessage.js +6 -2
- package/lib/module/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js +22 -3
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js +17 -3
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js +17 -3
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/StyledRoomComponents.js +6 -0
- package/lib/module/components/RoomComponents/styled/StyledRoomComponents.js.map +1 -1
- package/lib/module/components/Thread/ThreadWrapper.js +9 -2
- package/lib/module/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/module/components/Toast/Toast.js +3 -1
- package/lib/module/components/Toast/Toast.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallSession.js +6 -3
- package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/module/components/styled/AudioMessage.js +18 -12
- package/lib/module/components/styled/AudioMessage.js.map +1 -1
- package/lib/module/components/styled/Button.js +17 -9
- package/lib/module/components/styled/Button.js.map +1 -1
- package/lib/module/components/styled/DateLabel.js +8 -5
- package/lib/module/components/styled/DateLabel.js.map +1 -1
- package/lib/module/components/styled/MediaModal.js +29 -23
- package/lib/module/components/styled/MediaModal.js.map +1 -1
- package/lib/module/components/styled/MessageImage.js +37 -9
- package/lib/module/components/styled/MessageImage.js.map +1 -1
- package/lib/module/components/styled/RoomListComponents/index.js +62 -39
- package/lib/module/components/styled/RoomListComponents/index.js.map +1 -1
- package/lib/module/components/styled/SendInput.js +94 -20
- package/lib/module/components/styled/SendInput.js.map +1 -1
- package/lib/module/components/styled/StyledComponents.js +75 -25
- package/lib/module/components/styled/StyledComponents.js.map +1 -1
- package/lib/module/components/styled/StyledInput.js +32 -18
- package/lib/module/components/styled/StyledInput.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/CustomTypingIndicator.js +13 -8
- package/lib/module/components/styled/StyledInputComponents/CustomTypingIndicator.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/MediaComponents.js +20 -9
- package/lib/module/components/styled/StyledInputComponents/MediaComponents.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +50 -22
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/module/components/styled/TreadLabel.js +6 -3
- package/lib/module/components/styled/TreadLabel.js.map +1 -1
- package/lib/module/components/styled/UnsupportedType.js +14 -4
- package/lib/module/components/styled/UnsupportedType.js.map +1 -1
- package/lib/module/components/styled/VideoMessage.js +120 -62
- package/lib/module/components/styled/VideoMessage.js.map +1 -1
- package/lib/module/context/MessageNotificationContext.js +14 -3
- package/lib/module/context/MessageNotificationContext.js.map +1 -1
- package/lib/module/context/xmppProvider.js +184 -60
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/helpers/createMessageFromXml.js +19 -1
- package/lib/module/helpers/createMessageFromXml.js.map +1 -1
- package/lib/module/helpers/ensureScopedChatCache.js +2 -2
- package/lib/module/helpers/ensureScopedChatCache.js.map +1 -1
- package/lib/module/helpers/getChatBackground.js +22 -0
- package/lib/module/helpers/getChatBackground.js.map +1 -0
- package/lib/module/helpers/getDateLabelColor.js +4 -1
- package/lib/module/helpers/getDateLabelColor.js.map +1 -1
- package/lib/module/helpers/getDisplayFileName.js +73 -0
- package/lib/module/helpers/getDisplayFileName.js.map +1 -0
- package/lib/module/helpers/getIconColor.js +5 -1
- package/lib/module/helpers/getIconColor.js.map +1 -1
- package/lib/module/helpers/getSenderNameColor.js +4 -1
- package/lib/module/helpers/getSenderNameColor.js.map +1 -1
- package/lib/module/helpers/getServerReadTimestamp.js +181 -0
- package/lib/module/helpers/getServerReadTimestamp.js.map +1 -0
- package/lib/module/helpers/historyPreloadScheduler.js +66 -3
- package/lib/module/helpers/historyPreloadScheduler.js.map +1 -1
- package/lib/module/helpers/initXmppRooms.js +14 -8
- package/lib/module/helpers/initXmppRooms.js.map +1 -1
- package/lib/module/helpers/insertMessageWithDelimiter.js +52 -9
- package/lib/module/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/module/helpers/isOwnMessage.js +70 -0
- package/lib/module/helpers/isOwnMessage.js.map +1 -0
- package/lib/module/helpers/keyboardLayout.js +12 -2
- package/lib/module/helpers/keyboardLayout.js.map +1 -1
- package/lib/module/helpers/markdownParser.js +27 -5
- package/lib/module/helpers/markdownParser.js.map +1 -1
- package/lib/module/helpers/mediaLibraryRuntime.js +25 -0
- package/lib/module/helpers/mediaLibraryRuntime.js.map +1 -0
- package/lib/module/helpers/mimeToExtension.js +6 -13
- package/lib/module/helpers/mimeToExtension.js.map +1 -1
- package/lib/module/helpers/msgSortableMs.js +32 -0
- package/lib/module/helpers/msgSortableMs.js.map +1 -0
- package/lib/module/helpers/parseMessageBody.js +82 -24
- package/lib/module/helpers/parseMessageBody.js.map +1 -1
- package/lib/module/helpers/persistCrypto.js +115 -0
- package/lib/module/helpers/persistCrypto.js.map +1 -0
- package/lib/module/helpers/pickImageAsset.js +63 -0
- package/lib/module/helpers/pickImageAsset.js.map +1 -0
- package/lib/module/helpers/pushPayload.js +63 -0
- package/lib/module/helpers/pushPayload.js.map +1 -0
- package/lib/module/helpers/resolveInitBeforeLoadUser.js +130 -16
- package/lib/module/helpers/resolveInitBeforeLoadUser.js.map +1 -1
- package/lib/module/helpers/secureFileUrl.js +91 -0
- package/lib/module/helpers/secureFileUrl.js.map +1 -0
- package/lib/module/helpers/secureKeyValue.js +75 -0
- package/lib/module/helpers/secureKeyValue.js.map +1 -0
- package/lib/module/helpers/secureStoreRuntime.js +52 -0
- package/lib/module/helpers/secureStoreRuntime.js.map +1 -0
- package/lib/module/helpers/secureUserStorage.js +72 -0
- package/lib/module/helpers/secureUserStorage.js.map +1 -0
- package/lib/module/helpers/shallowEqual.js +31 -0
- package/lib/module/helpers/shallowEqual.js.map +1 -0
- package/lib/module/helpers/sheetGestures.js +26 -0
- package/lib/module/helpers/sheetGestures.js.map +1 -0
- package/lib/module/hooks/useChatRoomFocus.js +46 -13
- package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/module/hooks/useChatWrapperInit.js +30 -10
- package/lib/module/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/module/hooks/useComposing.js +28 -1
- package/lib/module/hooks/useComposing.js.map +1 -1
- package/lib/module/hooks/useCustomTypingIndicator.js +8 -3
- package/lib/module/hooks/useCustomTypingIndicator.js.map +1 -1
- package/lib/module/hooks/useFileToken.js +5 -0
- package/lib/module/hooks/useFileToken.js.map +1 -0
- package/lib/module/hooks/useLogout.js +33 -10
- package/lib/module/hooks/useLogout.js.map +1 -1
- package/lib/module/hooks/usePendingNotification.js +8 -11
- package/lib/module/hooks/usePendingNotification.js.map +1 -1
- package/lib/module/hooks/useSendMessage.js +52 -16
- package/lib/module/hooks/useSendMessage.js.map +1 -1
- package/lib/module/hooks/useTheme.js +30 -0
- package/lib/module/hooks/useTheme.js.map +1 -0
- package/lib/module/hooks/useUnreadMessagesCounter.js +6 -1
- package/lib/module/hooks/useUnreadMessagesCounter.js.map +1 -1
- package/lib/module/i18n/strings.js +163 -37
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/main.js +17 -2
- package/lib/module/main.js.map +1 -1
- package/lib/module/networking/api-requests/auth.api.js +131 -59
- package/lib/module/networking/api-requests/auth.api.js.map +1 -1
- package/lib/module/networking/api-requests/push.api.js +119 -45
- package/lib/module/networking/api-requests/push.api.js.map +1 -1
- package/lib/module/networking/api-requests/roomMembers.api.js +1 -1
- package/lib/module/networking/api-requests/roomMembers.api.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +21 -9
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/api-requests/user.api.js +64 -7
- package/lib/module/networking/api-requests/user.api.js.map +1 -1
- package/lib/module/networking/apiClient.js +61 -113
- package/lib/module/networking/apiClient.js.map +1 -1
- package/lib/module/networking/authRefresh.js +321 -0
- package/lib/module/networking/authRefresh.js.map +1 -0
- package/lib/module/networking/stanzaHandlers.js +41 -28
- package/lib/module/networking/stanzaHandlers.js.map +1 -1
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js +46 -8
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/module/networking/xmpp/presenceInRoom.xmpp.js +8 -1
- package/lib/module/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
- package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
- package/lib/module/networking/xmppClient.js +124 -8
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/roomStore/chatSettingsSlice.js +26 -7
- package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/module/roomStore/index.js +37 -4
- package/lib/module/roomStore/index.js.map +1 -1
- package/lib/module/roomStore/persistence.js +223 -22
- package/lib/module/roomStore/persistence.js.map +1 -1
- package/lib/module/roomStore/roomsSlice.js +139 -34
- package/lib/module/roomStore/roomsSlice.js.map +1 -1
- package/lib/module/services/pushRegistration.js +239 -0
- package/lib/module/services/pushRegistration.js.map +1 -0
- package/lib/module/services/pushSubscriptionService.js +15 -37
- package/lib/module/services/pushSubscriptionService.js.map +1 -1
- package/lib/module/theme/index.js +7 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/styled.d.js +6 -0
- package/lib/module/theme/styled.d.js.map +1 -0
- package/lib/module/theme/theme.js +131 -0
- package/lib/module/theme/theme.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/assets/EmptyChatIllustration.d.ts +1 -0
- package/lib/typescript/assets/EmptyChatIllustration.d.ts.map +1 -1
- package/lib/typescript/assets/icons.d.ts +24 -0
- package/lib/typescript/assets/icons.d.ts.map +1 -1
- package/lib/typescript/components/AuthForms/Login.d.ts.map +1 -1
- package/lib/typescript/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/lib/typescript/components/ExampleComponents/CustomMessage.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/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/LanguageSelectorModal.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/LoginWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageList.d.ts +10 -1
- package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ProfileImagePlaceholder.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ReduxWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomList.d.ts +7 -0
- package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/Select.d.ts.map +1 -1
- package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts +3 -0
- package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/BottomReplyContainer.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/Message.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/MessageInteractions.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/MessageReaction.d.ts.map +1 -1
- package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts +9 -0
- package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts +10 -0
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/DeleteChatModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts +9 -0
- package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +1 -0
- package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/FilePreviewModal/PdfView.d.ts.map +1 -1
- package/lib/typescript/components/Modals/Modal/Modal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ModalHeaderComponent.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ModalWrapper/ModalWrapper.d.ts.map +1 -1
- package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts +4 -2
- package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts +1 -1
- package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/NewChatModal/UpdNewChatModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts +75 -0
- package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts.map +1 -0
- package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts +25 -0
- package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts.map +1 -0
- package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts +6 -1
- package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/Referrals/Referrals.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/SharedStyledComponents.d.ts +2 -2
- package/lib/typescript/components/Modals/SettingsModals/SharedStyledComponents.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/Visibility/RadioInput.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/Visibility/VisibilityModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/EditUserModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts +16 -0
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts +1 -0
- package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/styledModalComponents.d.ts +2 -0
- package/lib/typescript/components/Modals/styledModalComponents.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastAudioMessage.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/StyledRoomComponents.d.ts.map +1 -1
- package/lib/typescript/components/Thread/ThreadWrapper.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
- package/lib/typescript/components/styled/AudioMessage.d.ts.map +1 -1
- package/lib/typescript/components/styled/Button.d.ts.map +1 -1
- package/lib/typescript/components/styled/DateLabel.d.ts.map +1 -1
- package/lib/typescript/components/styled/MediaModal.d.ts +2 -2
- package/lib/typescript/components/styled/MediaModal.d.ts.map +1 -1
- package/lib/typescript/components/styled/MessageImage.d.ts +14 -0
- package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
- package/lib/typescript/components/styled/RoomListComponents/index.d.ts.map +1 -1
- package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledComponents.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledInput.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledInputComponents/MediaComponents.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledInputComponents/StyledInputComponents.d.ts.map +1 -1
- package/lib/typescript/components/styled/TreadLabel.d.ts.map +1 -1
- package/lib/typescript/components/styled/UnsupportedType.d.ts.map +1 -1
- package/lib/typescript/components/styled/VideoMessage.d.ts +8 -0
- package/lib/typescript/components/styled/VideoMessage.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/createMessageFromXml.d.ts.map +1 -1
- package/lib/typescript/helpers/getAvatarColor.d.ts +1 -1
- package/lib/typescript/helpers/getChatBackground.d.ts +15 -0
- package/lib/typescript/helpers/getChatBackground.d.ts.map +1 -0
- package/lib/typescript/helpers/getDateLabelColor.d.ts +3 -7
- package/lib/typescript/helpers/getDateLabelColor.d.ts.map +1 -1
- package/lib/typescript/helpers/getDisplayFileName.d.ts +49 -0
- package/lib/typescript/helpers/getDisplayFileName.d.ts.map +1 -0
- package/lib/typescript/helpers/getIconColor.d.ts +4 -7
- package/lib/typescript/helpers/getIconColor.d.ts.map +1 -1
- package/lib/typescript/helpers/getSenderNameColor.d.ts +3 -7
- package/lib/typescript/helpers/getSenderNameColor.d.ts.map +1 -1
- package/lib/typescript/helpers/getServerReadTimestamp.d.ts +108 -0
- package/lib/typescript/helpers/getServerReadTimestamp.d.ts.map +1 -0
- package/lib/typescript/helpers/historyPreloadScheduler.d.ts.map +1 -1
- package/lib/typescript/helpers/initXmppRooms.d.ts.map +1 -1
- package/lib/typescript/helpers/insertMessageWithDelimiter.d.ts +1 -1
- package/lib/typescript/helpers/insertMessageWithDelimiter.d.ts.map +1 -1
- package/lib/typescript/helpers/isOwnMessage.d.ts +36 -0
- package/lib/typescript/helpers/isOwnMessage.d.ts.map +1 -0
- package/lib/typescript/helpers/keyboardLayout.d.ts +5 -1
- package/lib/typescript/helpers/keyboardLayout.d.ts.map +1 -1
- package/lib/typescript/helpers/markdownParser.d.ts +8 -1
- package/lib/typescript/helpers/markdownParser.d.ts.map +1 -1
- package/lib/typescript/helpers/mediaLibraryRuntime.d.ts +3 -0
- package/lib/typescript/helpers/mediaLibraryRuntime.d.ts.map +1 -0
- package/lib/typescript/helpers/mimeToExtension.d.ts +0 -15
- package/lib/typescript/helpers/mimeToExtension.d.ts.map +1 -1
- package/lib/typescript/helpers/msgSortableMs.d.ts +2 -0
- package/lib/typescript/helpers/msgSortableMs.d.ts.map +1 -0
- package/lib/typescript/helpers/parseMessageBody.d.ts +8 -1
- package/lib/typescript/helpers/parseMessageBody.d.ts.map +1 -1
- package/lib/typescript/helpers/persistCrypto.d.ts +13 -0
- package/lib/typescript/helpers/persistCrypto.d.ts.map +1 -0
- package/lib/typescript/helpers/pickImageAsset.d.ts +27 -0
- package/lib/typescript/helpers/pickImageAsset.d.ts.map +1 -0
- package/lib/typescript/helpers/pushPayload.d.ts +7 -0
- package/lib/typescript/helpers/pushPayload.d.ts.map +1 -0
- package/lib/typescript/helpers/resolveInitBeforeLoadUser.d.ts.map +1 -1
- package/lib/typescript/helpers/secureFileUrl.d.ts +7 -0
- package/lib/typescript/helpers/secureFileUrl.d.ts.map +1 -0
- package/lib/typescript/helpers/secureKeyValue.d.ts +13 -0
- package/lib/typescript/helpers/secureKeyValue.d.ts.map +1 -0
- package/lib/typescript/helpers/secureStoreRuntime.d.ts +29 -0
- package/lib/typescript/helpers/secureStoreRuntime.d.ts.map +1 -0
- package/lib/typescript/helpers/secureUserStorage.d.ts +23 -0
- package/lib/typescript/helpers/secureUserStorage.d.ts.map +1 -0
- package/lib/typescript/helpers/shallowEqual.d.ts +11 -0
- package/lib/typescript/helpers/shallowEqual.d.ts.map +1 -0
- package/lib/typescript/helpers/sheetGestures.d.ts +20 -0
- package/lib/typescript/helpers/sheetGestures.d.ts.map +1 -0
- package/lib/typescript/hooks/useChatRoomFocus.d.ts +4 -1
- package/lib/typescript/hooks/useChatRoomFocus.d.ts.map +1 -1
- package/lib/typescript/hooks/useChatWrapperInit.d.ts.map +1 -1
- package/lib/typescript/hooks/useComposing.d.ts.map +1 -1
- package/lib/typescript/hooks/useCustomTypingIndicator.d.ts +2 -0
- package/lib/typescript/hooks/useCustomTypingIndicator.d.ts.map +1 -1
- package/lib/typescript/hooks/useFileToken.d.ts +2 -0
- package/lib/typescript/hooks/useFileToken.d.ts.map +1 -0
- package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
- package/lib/typescript/hooks/usePendingNotification.d.ts.map +1 -1
- package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
- package/lib/typescript/hooks/useTheme.d.ts +16 -0
- package/lib/typescript/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/hooks/useUnreadMessagesCounter.d.ts +1 -0
- package/lib/typescript/hooks/useUnreadMessagesCounter.d.ts.map +1 -1
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/main.d.ts +16 -2
- package/lib/typescript/main.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/auth.api.d.ts +3 -1
- package/lib/typescript/networking/api-requests/auth.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/push.api.d.ts +46 -3
- package/lib/typescript/networking/api-requests/push.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts +1 -0
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/user.api.d.ts +27 -0
- package/lib/typescript/networking/api-requests/user.api.d.ts.map +1 -1
- package/lib/typescript/networking/apiClient.d.ts +12 -6
- package/lib/typescript/networking/apiClient.d.ts.map +1 -1
- package/lib/typescript/networking/authRefresh.d.ts +95 -0
- package/lib/typescript/networking/authRefresh.d.ts.map +1 -0
- package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts +10 -2
- package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/subscribeToRoomMessages.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts +14 -0
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/roomStore/chatSettingsSlice.d.ts +16 -0
- package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
- package/lib/typescript/roomStore/index.d.ts.map +1 -1
- package/lib/typescript/roomStore/persistence.d.ts +18 -1
- package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts +43 -3
- package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
- package/lib/typescript/services/pushRegistration.d.ts +21 -0
- package/lib/typescript/services/pushRegistration.d.ts.map +1 -0
- package/lib/typescript/services/pushSubscriptionService.d.ts +1 -5
- package/lib/typescript/services/pushSubscriptionService.d.ts.map +1 -1
- package/lib/typescript/theme/index.d.ts +5 -0
- package/lib/typescript/theme/index.d.ts.map +1 -0
- package/lib/typescript/theme/theme.d.ts +113 -0
- package/lib/typescript/theme/theme.d.ts.map +1 -0
- package/lib/typescript/types/models/room.model.d.ts +1 -0
- package/lib/typescript/types/models/room.model.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +70 -5
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +41 -28
- package/src/assets/EmptyChatIllustration.tsx +7 -5
- package/src/assets/icons.tsx +72 -9
- package/src/components/AuthForms/Login.tsx +14 -12
- package/src/components/ContextMenu/ContextMenuComponents.tsx +4 -4
- package/src/components/DropdownMenu/DropdownMenu.tsx +14 -6
- package/src/components/ExampleComponents/CustomMessage.tsx +9 -8
- package/src/components/ExampleComponents/CustomTypingIndicatorExamples.tsx +6 -6
- package/src/components/Header/HeaderRoomList.tsx +35 -8
- package/src/components/InputComponents/Search.tsx +7 -4
- package/src/components/MainComponents/ChatHeader.tsx +18 -6
- package/src/components/MainComponents/ChatRoom.tsx +164 -15
- package/src/components/MainComponents/ChatWrapper.tsx +44 -26
- package/src/components/MainComponents/LanguageSelectorModal.tsx +33 -7
- package/src/components/MainComponents/LoginWrapper.tsx +1 -0
- package/src/components/MainComponents/MediaMessage.tsx +63 -26
- package/src/components/MainComponents/MessageContainer.tsx +5 -1
- package/src/components/MainComponents/MessageList.tsx +36 -7
- package/src/components/MainComponents/ProfileImagePlaceholder.tsx +21 -14
- package/src/components/MainComponents/RNStyled.tsx +4 -4
- package/src/components/MainComponents/ReduxWrapper.tsx +23 -7
- package/src/components/MainComponents/RoomList.tsx +243 -40
- package/src/components/MainComponents/Select.tsx +13 -8
- package/src/components/Menu/HeaderRoomListMenu.tsx +347 -77
- package/src/components/MessageBubble/BottomReplyContainer.tsx +16 -11
- package/src/components/MessageBubble/Message.tsx +48 -25
- package/src/components/MessageBubble/MessageInteractions.tsx +17 -4
- package/src/components/MessageBubble/MessageReaction.tsx +9 -4
- package/src/components/Modals/AddMembersModal/AddMembersModal.tsx +2 -2
- package/src/components/Modals/AttachSheet/AttachSheet.tsx +376 -106
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +639 -283
- package/src/components/Modals/ChatProfileModal/DeleteChatModal.tsx +6 -4
- package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +248 -0
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +93 -47
- package/src/components/Modals/FilePreviewModal/PdfView.tsx +2 -1
- package/src/components/Modals/Modal/Modal.tsx +7 -0
- package/src/components/Modals/ModalHeaderComponent.tsx +9 -2
- package/src/components/Modals/ModalWrapper/ModalWrapper.tsx +14 -6
- package/src/components/Modals/NewChatModal/ModalContent.tsx +8 -5
- package/src/components/Modals/NewChatModal/NewChatModal.tsx +223 -119
- package/src/components/Modals/NewChatModal/UpdNewChatModal.tsx +12 -1
- package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +624 -0
- package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +224 -0
- package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +16 -7
- package/src/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.tsx +8 -6
- package/src/components/Modals/SettingsModals/Referrals/Referrals.tsx +5 -3
- package/src/components/Modals/SettingsModals/SharedStyledComponents.ts +4 -4
- package/src/components/Modals/SettingsModals/Visibility/RadioInput.tsx +9 -5
- package/src/components/Modals/SettingsModals/Visibility/VisibilityModal.tsx +7 -7
- package/src/components/Modals/UserProfileModal/EditUserModal.tsx +12 -26
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +621 -307
- package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +84 -58
- package/src/components/Modals/styledModalComponents.tsx +31 -16
- package/src/components/RoomComponents/ChatRoomItem.tsx +30 -6
- package/src/components/RoomComponents/styled/LastAudioMessage.tsx +4 -2
- package/src/components/RoomComponents/styled/LastMessageFile.tsx +28 -4
- package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +18 -3
- package/src/components/RoomComponents/styled/LastMessageVideo.tsx +18 -3
- package/src/components/RoomComponents/styled/StyledRoomComponents.ts +2 -0
- package/src/components/Thread/ThreadWrapper.tsx +6 -5
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/VideoCalls/VideoCallSession.tsx +8 -3
- package/src/components/styled/AudioMessage.tsx +14 -10
- package/src/components/styled/Button.tsx +15 -8
- package/src/components/styled/DateLabel.tsx +7 -3
- package/src/components/styled/MediaModal.tsx +30 -25
- package/src/components/styled/MessageImage.tsx +53 -7
- package/src/components/styled/RoomListComponents/index.tsx +60 -35
- package/src/components/styled/SendInput.tsx +106 -20
- package/src/components/styled/StyledComponents.ts +38 -25
- package/src/components/styled/StyledInput.tsx +35 -21
- package/src/components/styled/StyledInputComponents/CustomTypingIndicator.tsx +8 -8
- package/src/components/styled/StyledInputComponents/MediaComponents.tsx +20 -7
- package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +26 -23
- package/src/components/styled/TreadLabel.tsx +9 -3
- package/src/components/styled/UnsupportedType.tsx +14 -4
- package/src/components/styled/VideoMessage.tsx +131 -54
- package/src/context/MessageNotificationContext.tsx +18 -4
- package/src/context/xmppProvider.tsx +216 -57
- package/src/helpers/createMessageFromXml.ts +20 -1
- package/src/helpers/ensureScopedChatCache.ts +2 -2
- package/src/helpers/getChatBackground.ts +20 -0
- package/src/helpers/getDateLabelColor.ts +5 -3
- package/src/helpers/getDisplayFileName.ts +87 -0
- package/src/helpers/getIconColor.ts +6 -3
- package/src/helpers/getSenderNameColor.ts +5 -3
- package/src/helpers/getServerReadTimestamp.ts +197 -0
- package/src/helpers/historyPreloadScheduler.ts +80 -3
- package/src/helpers/initXmppRooms.tsx +14 -10
- package/src/helpers/insertMessageWithDelimiter.ts +55 -19
- package/src/helpers/isOwnMessage.ts +90 -0
- package/src/helpers/keyboardLayout.ts +23 -2
- package/src/helpers/markdownParser.tsx +29 -5
- package/src/helpers/mediaLibraryRuntime.ts +25 -0
- package/src/helpers/mimeToExtension.ts +6 -22
- package/src/helpers/msgSortableMs.ts +25 -0
- package/src/helpers/parseMessageBody.tsx +79 -26
- package/src/helpers/persistCrypto.ts +127 -0
- package/src/helpers/pickImageAsset.ts +68 -0
- package/src/helpers/pushPayload.ts +62 -0
- package/src/helpers/resolveInitBeforeLoadUser.ts +125 -18
- package/src/helpers/secureFileUrl.ts +103 -0
- package/src/helpers/secureKeyValue.ts +80 -0
- package/src/helpers/secureStoreRuntime.ts +62 -0
- package/src/helpers/secureUserStorage.ts +80 -0
- package/src/helpers/shallowEqual.ts +33 -0
- package/src/helpers/sheetGestures.ts +25 -0
- package/src/hooks/useChatRoomFocus.ts +49 -9
- package/src/hooks/useChatWrapperInit.ts +30 -10
- package/src/hooks/useComposing.tsx +37 -1
- package/src/hooks/useCustomTypingIndicator.tsx +7 -3
- package/src/hooks/useFileToken.ts +7 -0
- package/src/hooks/useLogout.tsx +39 -12
- package/src/hooks/usePendingNotification.ts +5 -11
- package/src/hooks/useSendMessage.tsx +60 -15
- package/src/hooks/useTheme.ts +41 -0
- package/src/hooks/useUnreadMessagesCounter.ts +11 -0
- package/src/i18n/strings.ts +163 -37
- package/src/main.ts +57 -2
- package/src/networking/api-requests/auth.api.ts +156 -48
- package/src/networking/api-requests/push.api.ts +185 -62
- package/src/networking/api-requests/roomMembers.api.ts +1 -1
- package/src/networking/api-requests/rooms.api.ts +18 -9
- package/src/networking/api-requests/user.api.ts +79 -7
- package/src/networking/apiClient.ts +68 -123
- package/src/networking/authRefresh.ts +451 -0
- package/src/networking/stanzaHandlers.ts +44 -28
- package/src/networking/xmpp/flushLastViewedToPrivateStore.ts +71 -10
- package/src/networking/xmpp/presenceInRoom.xmpp.ts +6 -1
- package/src/networking/xmpp/subscribeToRoomMessages.xmpp.ts +12 -1
- package/src/networking/xmppClient.ts +141 -9
- package/src/roomStore/chatSettingsSlice.ts +34 -10
- package/src/roomStore/index.ts +40 -4
- package/src/roomStore/persistence.ts +234 -24
- package/src/roomStore/roomsSlice.ts +161 -29
- package/src/services/pushRegistration.ts +356 -0
- package/src/services/pushSubscriptionService.ts +18 -47
- package/src/theme/index.ts +10 -0
- package/src/theme/styled.d.ts +9 -0
- package/src/theme/theme.ts +243 -0
- package/src/types/models/room.model.ts +1 -0
- package/src/types/types.ts +96 -5
- package/src/version.ts +1 -1
- package/lib/commonjs/context/PushNotificationProvider.js +0 -79
- package/lib/commonjs/context/PushNotificationProvider.js.map +0 -1
- package/lib/commonjs/hooks/usePushNotifications.js +0 -110
- package/lib/commonjs/hooks/usePushNotifications.js.map +0 -1
- package/lib/commonjs/services/pushNotifications.js +0 -143
- package/lib/commonjs/services/pushNotifications.js.map +0 -1
- package/lib/module/context/PushNotificationProvider.js +0 -79
- package/lib/module/context/PushNotificationProvider.js.map +0 -1
- package/lib/module/hooks/usePushNotifications.js +0 -106
- package/lib/module/hooks/usePushNotifications.js.map +0 -1
- package/lib/module/services/pushNotifications.js +0 -130
- package/lib/module/services/pushNotifications.js.map +0 -1
- package/lib/typescript/context/PushNotificationProvider.d.ts +0 -2
- package/lib/typescript/context/PushNotificationProvider.d.ts.map +0 -1
- package/lib/typescript/hooks/usePushNotifications.d.ts +0 -5
- package/lib/typescript/hooks/usePushNotifications.d.ts.map +0 -1
- package/lib/typescript/services/pushNotifications.d.ts +0 -10
- package/lib/typescript/services/pushNotifications.d.ts.map +0 -1
- package/src/context/PushNotificationProvider.tsx +0 -78
- package/src/hooks/usePushNotifications.ts +0 -131
- package/src/services/pushNotifications.ts +0 -170
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","Pressable","Linking","Platform","ScrollView","jsx","_jsx","jsxs","_jsxs","elementKeyCounter","decodeHTMLEntities","text","entities","replace","m","styles","bold","fontWeight","italic","fontStyle","strike","textDecorationLine","link","color","codeInlineBox","backgroundColor","borderRadius","paddingVertical","paddingHorizontal","codeInlineText","fontFamily","select","ios","android","fontSize","codeBlock","padding","borderWidth","borderColor","marginVertical","codeBlockText","lineHeight","h","marginTop","marginBottom","quote","borderLeftWidth","borderLeftColor","paddingLeft","paragraph","hr","height","listItemRow","flexDirection","alignItems","listMarker","minWidth","paddingTop","checkboxRow","checkboxBox","width","marginRight","justifyContent","checkboxTick","tableContainer","tableInner","overflow","tableRow","th","flex","borderRightWidth","borderRightColor","td","borderTopWidth","borderTopColor","lastCell","cellText","renderTextWithLinks","urlRegex","nodes","lastIndex","match","exec","url","start","index","push","slice","onPress","openURL","children","style","length","parseInline","txt","elements","remaining","pattern","fullMatch","matchIndex","delimiter","content","substring","isTableSeparatorLine","line","trimmed","trim","test","includes","parseTableRow","decodedLine","cleaned","cells","split","map","c","renderMarkdownTableRN","headers","separator","dataRows","aligns","_","idx","seg","left","startsWith","right","endsWith","horizontal","bounces","showsHorizontalScrollIndicator","cIdx","textAlign","row","rIdx","cell","parseMessageBody","baseStyle","lines","listBuffer","inCodeBlock","codeLang","codeLines","flushList","renderListItems","items","depth","result","i","item","subItems","j","nested","contentEl","type","checked","marginLeft","listContent","trimmedLine","selectable","join","headingMatch","level","Math","min","max","separatorIndex","rows","headerCount","sep","current","nextLine","rowCells","listMatch","leadingSpace","checkboxPart","floor","toLowerCase","bulletMatch"],"sourceRoot":"../../../src","sources":["helpers/parseMessageBody.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,OAAO,EACPC,QAAQ,EACRC,UAAU,QAIL,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtB,IAAIC,iBAAiB,GAAG,CAAC;AAEzB,OAAO,MAAMC,kBAAkB,GAAIC,IAAY,IAAK;EAClD,MAAMC,QAAgC,GAAG;IACvC,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,GAAG;IACd,UAAU,EAAE,GAAG;IACf,SAAS,EAAE;EACb,CAAC;EACD,OAAOD,IAAI,CAACE,OAAO,CAAC,kBAAkB,EAAGC,CAAC,IAAKF,QAAQ,CAACE,CAAC,CAAC,IAAIA,CAAC,CAAC;AAClE,CAAC;AAED,MAAMC,MAAM,GAAG;EACbC,IAAI,EAAE;IAAEC,UAAU,EAAE;EAAgB,CAAC;EACrCC,MAAM,EAAE;IAAEC,SAAS,EAAE;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CAAO;MAAC,GADhD,KAAKrJ,iBAAiB,EAAE,EAE7B,CACR,CAAC;IACH,CAAC,MAAM;MACLsI,SAAS,CAAC,CAAC;IACb;EACF;EAEAA,SAAS,CAAC,CAAC;EAEX,oBACEzI,IAAA,CAACN,IAAI;IACH2F,KAAK,EAAE,CACP,CAAE;IAAAD,QAAA,EAEDK;EAAQ,CACL,CAAC;AAEX,CAAC;AAED,eAAeyC,gBAAgB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Text","View","Pressable","Linking","Platform","ScrollView","jsx","_jsx","jsxs","_jsxs","elementKeyCounter","DEFAULT_BODY_COLORS","primary","text","surface","surfaceSecondary","surfaceHighlight","border","decodeHTMLEntities","entities","replace","m","buildStyles","c","themed","bold","fontWeight","italic","fontStyle","strike","textDecorationLine","link","color","codeInlineBox","backgroundColor","borderRadius","paddingVertical","paddingHorizontal","codeInlineText","fontFamily","select","ios","android","fontSize","codeBlock","padding","borderWidth","borderColor","marginVertical","codeBlockText","lineHeight","h","marginTop","marginBottom","quote","borderLeftWidth","borderLeftColor","paddingLeft","paragraph","hr","height","listItemRow","flexDirection","alignItems","listMarker","minWidth","paddingTop","checkboxRow","checkboxBox","width","marginRight","justifyContent","checkboxBoxChecked","checkboxTick","tableContainer","tableInner","overflow","tableRow","th","flex","borderRightWidth","borderRightColor","td","borderTopWidth","borderTopColor","lastCell","cellText","DEFAULT_STYLES","styles","cachedTheme","cachedStyles","resolveStyles","theme","renderTextWithLinks","urlRegex","nodes","lastIndex","match","exec","url","start","index","push","slice","onPress","openURL","children","style","length","parseInline","txt","elements","remaining","pattern","fullMatch","matchIndex","delimiter","content","substring","isTableSeparatorLine","line","trimmed","trim","test","includes","parseTableRow","decodedLine","cleaned","cells","split","map","renderMarkdownTableRN","headers","separator","dataRows","aligns","_","idx","seg","left","startsWith","right","endsWith","horizontal","bounces","showsHorizontalScrollIndicator","cIdx","textAlign","row","rIdx","cell","parseMessageBody","baseStyle","lines","listBuffer","inCodeBlock","codeLang","codeLines","flushList","renderListItems","items","depth","result","i","item","subItems","j","nested","contentEl","type","checked","marginLeft","listContent","trimmedLine","selectable","join","headingMatch","level","Math","min","max","separatorIndex","rows","headerCount","sep","current","nextLine","rowCells","listMatch","leadingSpace","checkboxPart","floor","toLowerCase","bulletMatch"],"sourceRoot":"../../../src","sources":["helpers/parseMessageBody.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,OAAO,EACPC,QAAQ,EACRC,UAAU,QAIL,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGtB,IAAIC,iBAAiB,GAAG,CAAC;;AAEzB;AACA;AACA;AACA;AACA;;AAMA,MAAMC,mBAAqC,GAAG;EAC5CC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE,SAAS;EACfC,OAAO,EAAE,MAAM;EACfC,gBAAgB,EAAE,SAAS;EAC3BC,gBAAgB,EAAE,SAAS;EAC3BC,MAAM,EAAE;AACV,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAIL,IAAY,IAAK;EAClD,MAAMM,QAAgC,GAAG;IACvC,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,GAAG;IACd,UAAU,EAAE,GAAG;IACf,SAAS,EAAE;EACb,CAAC;EACD,OAAON,IAAI,CAACO,OAAO,CAAC,kBAAkB,EAAGC,CAAC,IAAKF,QAAQ,CAACE,CAAC,CAAC,IAAIA,CAAC,CAAC;AAClE,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAGA,CAACC,CAAmB,EAAEC,MAAe,MAAM;EAC7DC,IAAI,EAAE;IAAEC,UAAU,EAAE;EAAg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;MACnF;IACF;IAEA,IAAIY,WAAW,KAAK,EAAE,EAAE;MACtBf,SAAS,CAAC,CAAC;MACX/C,QAAQ,CAACT,IAAI,cACX/F,IAAA,CAACN,IAAI;QAAkC0G,KAAK,EAAEnB,MAAM,CAAC9B,SAAU;QAAAgD,QAAA,eAC7DnG,IAAA,CAACP,IAAI;UAAC2G,KAAK,EAAE6C,SAAU;UAAA9C,QAAA,EAAEG,WAAW,CAACgE,WAAW;QAAC,CAAO;MAAC,GADhD,KAAKnK,iBAAiB,EAAE,EAE7B,CACR,CAAC;IACH,CAAC,MAAM;MACLoJ,SAAS,CAAC,CAAC;IACb;EACF;EAEAA,SAAS,CAAC,CAAC;EAEX,oBACEvJ,IAAA,CAACN,IAAI;IACH0G,KAAK,EAAE,CACP,CAAE;IAAAD,QAAA,EAEDK;EAAQ,CACL,CAAC;AAEX,CAAC;AAED,eAAewC,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import CryptoJS from 'crypto-js';
|
|
4
|
+
import { secureGet, secureSet } from './secureKeyValue';
|
|
5
|
+
|
|
6
|
+
// AES-256-CBC at rest for the bulk persisted state (message history +
|
|
7
|
+
// room list) that `roomStore/persistence.ts` writes to AsyncStorage.
|
|
8
|
+
// This is envelope encryption, not a SecureStore write of the payload
|
|
9
|
+
// itself: expo-secure-store has historically capped a single value's
|
|
10
|
+
// size on Android (chunking exists in newer releases, but the payload
|
|
11
|
+
// here is unbounded — up to MESSAGE_LIMIT messages per room, times
|
|
12
|
+
// every room), so only the small symmetric KEY goes through the
|
|
13
|
+
// platform Keychain/Keystore (`secureKeyValue.ts`); the ciphertext
|
|
14
|
+
// itself stays in plain AsyncStorage, unreadable without that key.
|
|
15
|
+
const CIPHER_KEY_STORE_KEY = 'ethora_history_cipher_key';
|
|
16
|
+
const ENVELOPE_VERSION = 1;
|
|
17
|
+
const KEY_BYTES = 32; // AES-256
|
|
18
|
+
const IV_BYTES = 16; // one AES block
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* `crypto-js`'s own `WordArray.random()` falls back to `Math.random()`
|
|
22
|
+
* when it can't detect a browser `window.crypto` — not safe for key/IV
|
|
23
|
+
* material. `react-native-get-random-values` (a REQUIRED peer
|
|
24
|
+
* dependency, imported at the top of `main.ts`/`index.js` before
|
|
25
|
+
* anything else in the SDK runs) polyfills the real thing onto
|
|
26
|
+
* `global.crypto.getRandomValues` instead; source bytes from that and
|
|
27
|
+
* hand them to crypto-js as a WordArray rather than trust its default.
|
|
28
|
+
*/
|
|
29
|
+
const randomWordArray = byteLength => {
|
|
30
|
+
const bytes = new Uint8Array(byteLength);
|
|
31
|
+
global.crypto.getRandomValues(bytes);
|
|
32
|
+
const words = [];
|
|
33
|
+
for (let i = 0; i < bytes.length; i += 4) {
|
|
34
|
+
words.push((bytes[i] || 0) << 24 | (bytes[i + 1] || 0) << 16 | (bytes[i + 2] || 0) << 8 | (bytes[i + 3] || 0));
|
|
35
|
+
}
|
|
36
|
+
return CryptoJS.lib.WordArray.create(words, byteLength);
|
|
37
|
+
};
|
|
38
|
+
let cachedKeyPromise = null;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* One AES-256 key per install, generated on first use and persisted
|
|
42
|
+
* through the SecureStore/Keychain bridge. Reused across logins on
|
|
43
|
+
* purpose: the ciphertext it protects is deleted wholesale on logout
|
|
44
|
+
* (`clearPersistedState`), so there is no cross-account data for a
|
|
45
|
+
* stable key to expose — only the encrypted blob of whoever is
|
|
46
|
+
* currently logged in ever exists on disk at a given time.
|
|
47
|
+
*/
|
|
48
|
+
const loadOrCreateKey = () => {
|
|
49
|
+
if (cachedKeyPromise) {
|
|
50
|
+
return cachedKeyPromise;
|
|
51
|
+
}
|
|
52
|
+
cachedKeyPromise = (async () => {
|
|
53
|
+
const existing = await secureGet(CIPHER_KEY_STORE_KEY);
|
|
54
|
+
if (existing) {
|
|
55
|
+
return CryptoJS.enc.Base64.parse(existing);
|
|
56
|
+
}
|
|
57
|
+
const key = randomWordArray(KEY_BYTES);
|
|
58
|
+
await secureSet(CIPHER_KEY_STORE_KEY, CryptoJS.enc.Base64.stringify(key));
|
|
59
|
+
return key;
|
|
60
|
+
})();
|
|
61
|
+
return cachedKeyPromise;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** Encrypt a JSON-serialisable payload for storage. Returns the string to persist. */
|
|
65
|
+
export async function encryptForPersist(plaintext) {
|
|
66
|
+
const key = await loadOrCreateKey();
|
|
67
|
+
const iv = randomWordArray(IV_BYTES);
|
|
68
|
+
const encrypted = CryptoJS.AES.encrypt(plaintext, key, {
|
|
69
|
+
iv,
|
|
70
|
+
mode: CryptoJS.mode.CBC,
|
|
71
|
+
padding: CryptoJS.pad.Pkcs7
|
|
72
|
+
});
|
|
73
|
+
const envelope = {
|
|
74
|
+
v: ENVELOPE_VERSION,
|
|
75
|
+
iv: CryptoJS.enc.Base64.stringify(iv),
|
|
76
|
+
ct: encrypted.ciphertext.toString(CryptoJS.enc.Base64)
|
|
77
|
+
};
|
|
78
|
+
return JSON.stringify(envelope);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Decrypt a value previously written by `encryptForPersist`. Returns
|
|
83
|
+
* null (never throws) for anything that isn't a valid envelope for the
|
|
84
|
+
* current key — including a plaintext blob from a pre-encryption
|
|
85
|
+
* install: the app just re-hydrates that room/history from the server,
|
|
86
|
+
* same as any other empty-cache cold start.
|
|
87
|
+
*/
|
|
88
|
+
export async function decryptFromPersist(stored) {
|
|
89
|
+
try {
|
|
90
|
+
const envelope = JSON.parse(stored);
|
|
91
|
+
if (!envelope || envelope.v !== ENVELOPE_VERSION || !envelope.iv || !envelope.ct) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
const key = await loadOrCreateKey();
|
|
95
|
+
const iv = CryptoJS.enc.Base64.parse(envelope.iv);
|
|
96
|
+
const ciphertext = CryptoJS.enc.Base64.parse(envelope.ct);
|
|
97
|
+
const decrypted = CryptoJS.AES.decrypt({
|
|
98
|
+
ciphertext
|
|
99
|
+
}, key, {
|
|
100
|
+
iv,
|
|
101
|
+
mode: CryptoJS.mode.CBC,
|
|
102
|
+
padding: CryptoJS.pad.Pkcs7
|
|
103
|
+
});
|
|
104
|
+
const plaintext = decrypted.toString(CryptoJS.enc.Utf8);
|
|
105
|
+
return plaintext || null;
|
|
106
|
+
} catch {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Test seam only. */
|
|
112
|
+
export const __resetPersistCryptoKeyForTests = () => {
|
|
113
|
+
cachedKeyPromise = null;
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=persistCrypto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CryptoJS","secureGet","secureSet","CIPHER_KEY_STORE_KEY","ENVELOPE_VERSION","KEY_BYTES","IV_BYTES","randomWordArray","byteLength","bytes","Uint8Array","global","crypto","getRandomValues","words","i","length","push","lib","WordArray","create","cachedKeyPromise","loadOrCreateKey","existing","enc","Base64","parse","key","stringify","encryptForPersist","plaintext","iv","encrypted","AES","encrypt","mode","CBC","padding","pad","Pkcs7","envelope","v","ct","ciphertext","toString","JSON","decryptFromPersist","stored","decrypted","decrypt","Utf8","__resetPersistCryptoKeyForTests"],"sourceRoot":"../../../src","sources":["helpers/persistCrypto.ts"],"mappings":";;AAAA,OAAOA,QAAQ,MAAM,WAAW;AAChC,SAASC,SAAS,EAAEC,SAAS,QAAQ,kBAAkB;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAG,2BAA2B;AACxD,MAAMC,gBAAgB,GAAG,CAAC;AAC1B,MAAMC,SAAS,GAAG,EAAE,CAAC,CAAC;AACtB,MAAMC,QAAQ,GAAG,EAAE,CAAC,CAAC;;AAQrB;AACA;AACA;AACA;AACA;AACA;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T,EAAE,CAAC;IACjD,MAAMY,UAAU,GAAG3C,QAAQ,CAACwB,GAAG,CAACC,MAAM,CAACC,KAAK,CAACc,QAAQ,CAACE,EAAE,CAAC;IACzD,MAAMM,SAAS,GAAGhD,QAAQ,CAACiC,GAAG,CAACgB,OAAO,CACpC;MAAEN;IAAW,CAAC,EACdhB,GAAG,EACH;MAAEI,EAAE;MAAEI,IAAI,EAAEnC,QAAQ,CAACmC,IAAI,CAACC,GAAG;MAAEC,OAAO,EAAErC,QAAQ,CAACsC,GAAG,CAACC;IAAM,CAC7D,CAAC;IACD,MAAMT,SAAS,GAAGkB,SAAS,CAACJ,QAAQ,CAAC5C,QAAQ,CAACwB,GAAG,CAAC0B,IAAI,CAAC;IACvD,OAAOpB,SAAS,IAAI,IAAI;EAC1B,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF;;AAEA;AACA,OAAO,MAAMqB,+BAA+B,GAAGA,CAAA,KAAY;EACzD9B,gBAAgB,GAAG,IAAI;AACzB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Alert, Linking } from 'react-native';
|
|
4
|
+
import * as ImagePicker from 'expo-image-picker';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A picked image in the shape React Native's FormData understands.
|
|
8
|
+
*
|
|
9
|
+
* NOT a web `File`: RN streams a multipart part straight from a `file://`
|
|
10
|
+
* uri and has no usable Blob/File/atob path. Screens ported from the web
|
|
11
|
+
* client used to carry base64 -> Blob -> File helpers that could never
|
|
12
|
+
* have run here.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Ask for library permission, open the picker, and normalise the result.
|
|
17
|
+
*
|
|
18
|
+
* Returns `null` for every non-error outcome — permission refused, user
|
|
19
|
+
* cancelled — so call sites can simply keep their current value.
|
|
20
|
+
*
|
|
21
|
+
* Exists because the avatar pickers are wired to `onPress`, which hands
|
|
22
|
+
* the callback a SyntheticEvent. Storing that event as "the image" (what
|
|
23
|
+
* two screens used to do) rendered a pooled event as an <Image source>
|
|
24
|
+
* and then crashed with "Property is not configurable" when React tried
|
|
25
|
+
* to release it — on top of never letting the user pick anything.
|
|
26
|
+
*/
|
|
27
|
+
export const pickImageAsset = async () => {
|
|
28
|
+
try {
|
|
29
|
+
// expo-image-picker owns the permission prompt internally and
|
|
30
|
+
// returns a `granted` flag.
|
|
31
|
+
const perm = await ImagePicker.requestMediaLibraryPermissionsAsync();
|
|
32
|
+
if (!perm.granted) {
|
|
33
|
+
Alert.alert('Permission required', 'Photo library permission is needed to select images.', [{
|
|
34
|
+
text: 'Cancel',
|
|
35
|
+
style: 'cancel'
|
|
36
|
+
}, {
|
|
37
|
+
text: 'Open Settings',
|
|
38
|
+
onPress: () => Linking.openSettings()
|
|
39
|
+
}]);
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
const result = await ImagePicker.launchImageLibraryAsync({
|
|
43
|
+
mediaTypes: ['images'],
|
|
44
|
+
allowsEditing: true,
|
|
45
|
+
aspect: [1, 1],
|
|
46
|
+
quality: 0.8
|
|
47
|
+
});
|
|
48
|
+
if (result.canceled || !result.assets?.[0]) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const asset = result.assets[0];
|
|
52
|
+
const originalName = asset.fileName || asset.uri.split('/').pop();
|
|
53
|
+
return {
|
|
54
|
+
uri: asset.uri,
|
|
55
|
+
type: asset.mimeType || 'image/jpeg',
|
|
56
|
+
name: originalName || `image_${Date.now()}.jpg`
|
|
57
|
+
};
|
|
58
|
+
} catch (error) {
|
|
59
|
+
console.error('Failed to pick an image:', error);
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=pickImageAsset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Alert","Linking","ImagePicker","pickImageAsset","perm","requestMediaLibraryPermissionsAsync","granted","alert","text","style","onPress","openSettings","result","launchImageLibraryAsync","mediaTypes","allowsEditing","aspect","quality","canceled","assets","asset","originalName","fileName","uri","split","pop","type","mimeType","name","Date","now","error","console"],"sourceRoot":"../../../src","sources":["helpers/pickImageAsset.ts"],"mappings":";;AAAA,SAASA,KAAK,EAAEC,OAAO,QAAQ,cAAc;AAC7C,OAAO,KAAKC,WAAW,MAAM,mBAAmB;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,MAAAA,CAAA,KAAyC;EACrE,IAAI;IACF;IACA;IACA,MAAMC,IAAI,GAAG,MAAMF,WAAW,CAACG,mCAAmC,CAAC,CAAC;IACpE,IAAI,CAACD,IAAI,CAACE,OAAO,EAAE;MACjBN,KAAK,CAACO,KAAK,CACT,qBAAqB,EACrB,sDAAsD,EACtD,CACE;QAAEC,IAAI,EAAE,QAAQ;QAAEC,KAAK,EAAE;MAAS,CAAC,EACnC;QAAED,IAAI,EAAE,eAAe;QAAEE,OAAO,EAAEA,CAAA,KAAMT,OAAO,CAACU,YAAY,CAAC;MAAE,CAAC,CAEpE,CAAC;MACD,OAAO,IAAI;IACb;IAEA,MAAMC,MAAM,GAAG,MAAMV,WAAW,CAACW,uBAAuB,CAAC;MACvDC,UAAU,EAAE,CAAC,QAAQ,CAAC;MACtBC,aAAa,EAAE,IAAI;MACnBC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;MACdC,OAAO,EAAE;IACX,CAAC,CAAC;IACF,IAAIL,MAAM,CAACM,QAAQ,IAAI,CAACN,MAAM,CAACO,MAAM,GAAG,CAAC,CAAC,EAAE;MAC1C,OAAO,IAAI;IACb;IAEA,MAAMC,KAAK,GAAGR,MAAM,CAACO,MAAM,CAAC,CAAC,CAAC;IAC9B,MAAME,YAAY,GAAGD,KAAK,CAACE,QAAQ,IAAIF,KAAK,CAACG,GAAG,CAACC,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC;IACjE,OAAO;MACLF,GAAG,EAAEH,KAAK,CAACG,GAAG;MACdG,IAAI,EAAEN,KAAK,CAACO,QAAQ,IAAI,YAAY;MACpCC,IAAI,EAAEP,YAAY,IAAI,SAASQ,IAAI,CAACC,GAAG,CAAC,CAAC;IAC3C,CAAC;EACH,CAAC,CAAC,OAAOC,KAAK,EAAE;IACdC,OAAO,CAACD,KAAK,CAAC,0BAA0B,EAAEA,KAAK,CAAC;IAChD,OAAO,IAAI;EACb;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
4
|
+
import { store } from '../roomStore';
|
|
5
|
+
import { clearPendingNotificationJid, setCurrentRoom, setPendingNotificationJid } from '../roomStore/roomsSlice';
|
|
6
|
+
import { handleCallPush } from './incomingCallFromPush';
|
|
7
|
+
import { normalizeRoomJid } from './normalizeRoomJid';
|
|
8
|
+
export const PENDING_NOTIFICATION_JID_KEY = 'ethora_pending_notification_jid';
|
|
9
|
+
export const PENDING_NOTIFICATION_TTL_MS = 5 * 60 * 1000;
|
|
10
|
+
export const readPendingJid = async () => {
|
|
11
|
+
try {
|
|
12
|
+
const raw = await AsyncStorage.getItem(PENDING_NOTIFICATION_JID_KEY);
|
|
13
|
+
if (!raw) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
if (raw.startsWith('{')) {
|
|
17
|
+
const {
|
|
18
|
+
jid,
|
|
19
|
+
at
|
|
20
|
+
} = JSON.parse(raw);
|
|
21
|
+
if (!jid || !at || Date.now() - at > PENDING_NOTIFICATION_TTL_MS) {
|
|
22
|
+
await AsyncStorage.removeItem(PENDING_NOTIFICATION_JID_KEY);
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return jid;
|
|
26
|
+
}
|
|
27
|
+
return raw;
|
|
28
|
+
} catch {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
export const openRoomFromPush = jid => {
|
|
33
|
+
const state = store.getState();
|
|
34
|
+
const conference = state.chatSettingStore?.config?.xmppSettings?.conference;
|
|
35
|
+
const full = normalizeRoomJid(jid, conference);
|
|
36
|
+
AsyncStorage.setItem(PENDING_NOTIFICATION_JID_KEY, JSON.stringify({
|
|
37
|
+
jid: full,
|
|
38
|
+
at: Date.now()
|
|
39
|
+
})).catch(() => undefined);
|
|
40
|
+
if (state.rooms?.rooms?.[full]) {
|
|
41
|
+
store.dispatch(clearPendingNotificationJid());
|
|
42
|
+
store.dispatch(setCurrentRoom({
|
|
43
|
+
roomJID: full
|
|
44
|
+
}));
|
|
45
|
+
return 'room';
|
|
46
|
+
}
|
|
47
|
+
store.dispatch(setPendingNotificationJid(full));
|
|
48
|
+
return 'pending';
|
|
49
|
+
};
|
|
50
|
+
export const handlePushPayload = data => {
|
|
51
|
+
if (!data) {
|
|
52
|
+
return 'unknown';
|
|
53
|
+
}
|
|
54
|
+
if (handleCallPush(data)) {
|
|
55
|
+
return 'call';
|
|
56
|
+
}
|
|
57
|
+
const jid = data.jid ?? data.chatJid ?? data.roomJid ?? data.roomJID;
|
|
58
|
+
if (typeof jid === 'string' && jid) {
|
|
59
|
+
return openRoomFromPush(jid);
|
|
60
|
+
}
|
|
61
|
+
return 'unknown';
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=pushPayload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AsyncStorage","store","clearPendingNotificationJid","setCurrentRoom","setPendingNotificationJid","handleCallPush","normalizeRoomJid","PENDING_NOTIFICATION_JID_KEY","PENDING_NOTIFICATION_TTL_MS","readPendingJid","raw","getItem","startsWith","jid","at","JSON","parse","Date","now","removeItem","openRoomFromPush","state","getState","conference","chatSettingStore","config","xmppSettings","full","setItem","stringify","catch","undefined","rooms","dispatch","roomJID","handlePushPayload","data","chatJid","roomJid"],"sourceRoot":"../../../src","sources":["helpers/pushPayload.ts"],"mappings":";;AAAA,OAAOA,YAAY,MAAM,2CAA2C;AACpE,SAASC,KAAK,QAAQ,cAAc;AACpC,SACEC,2BAA2B,EAC3BC,cAAc,EACdC,yBAAyB,QACpB,yBAAyB;AAChC,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,gBAAgB,QAAQ,oBAAoB;AAIrD,OAAO,MAAMC,4BAA4B,GAAG,iCAAiC;AAC7E,OAAO,MAAMC,2BAA2B,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI;AAExD,OAAO,MAAMC,cAAc,GAAG,MAAAA,CAAA,KAAoC;EAChE,IAAI;IACF,MAAMC,GAAG,GAAG,MAAMV,YAAY,CAACW,OAAO,CAACJ,4BAA4B,CAAC;IACpE,IAAI,CAACG,GAAG,EAAE;MAAC,OAAO,IAAI;IAAC;IACvB,IAAIA,GAAG,CAACE,UAAU,CAAC,GAAG,CAAC,EAAE;MACvB,MAAM;QAAEC,GAAG;QAAEC;MAAG,CAAC,GAAGC,IAAI,CAACC,KAAK,CAACN,GAAG,CAAkC;MACpE,IAAI,CAACG,GAAG,IAAI,CAACC,EAAE,IAAIG,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGJ,EAAE,GAAGN,2BAA2B,EAAE;QAChE,MAAMR,YAAY,CAACmB,UAAU,CAACZ,4BAA4B,CAAC;QAC3D,OAAO,IAAI;MACb;MACA,OAAOM,GAAG;IACZ;IACA,OAAOH,GAAG;EACZ,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF,CAAC;AAED,OAAO,MAAMU,gBAAgB,GAAIP,GAAW,IAAyB;EACnE,MAAMQ,KAAK,GAAGpB,KAAK,CAACqB,QAAQ,CAAC,CAAC;EAC9B,MAAMC,UAAU,GAAGF,KAAK,CAACG,gBAAgB,EAAEC,MAAM,EAAEC,YAAY,EAAEH,UAAU;EAC3E,MAAMI,IAAI,GAAGrB,gBAAgB,CAACO,GAAG,EAAEU,UAAU,CAAC;EAE9CvB,YAAY,CAAC4B,OAAO,CAClBrB,4BAA4B,EAC5BQ,IAAI,CAACc,SAAS,CAAC;IAAEhB,GAAG,EAAEc,IAAI;IAAEb,EAAE,EAAEG,IAAI,CAACC,GAAG,CAAC;EAAE,CAAC,CAC9C,CAAC,CAACY,KAAK,CAAC,MAAMC,SAAS,CAAC;EACxB,IAAIV,KAAK,CAACW,KAAK,EAAEA,KAAK,GAAGL,IAAI,CAAC,EAAE;IAC9B1B,KAAK,CAACgC,QAAQ,CAAC/B,2BAA2B,CAAC,CAAC,CAAC;IAC7CD,KAAK,CAACgC,QAAQ,CAAC9B,cAAc,CAAC;MAAE+B,OAAO,EAAEP;IAAK,CAAC,CAAC,CAAC;IACjD,OAAO,MAAM;EACf;EACA1B,KAAK,CAACgC,QAAQ,CAAC7B,yBAAyB,CAACuB,IAAI,CAAC,CAAC;EAC/C,OAAO,SAAS;AAClB,CAAC;AAED,OAAO,MAAMQ,iBAAiB,GAC5BC,IAAgD,IACzB;EACvB,IAAI,CAACA,IAAI,EAAE;IAAC,OAAO,SAAS;EAAC;EAC7B,IAAI/B,cAAc,CAAC+B,IAA2B,CAAC,EAAE;IAAC,OAAO,MAAM;EAAC;EAChE,MAAMvB,GAAG,GAAGuB,IAAI,CAACvB,GAAG,IAAIuB,IAAI,CAACC,OAAO,IAAID,IAAI,CAACE,OAAO,IAAIF,IAAI,CAACF,OAAO;EACpE,IAAI,OAAOrB,GAAG,KAAK,QAAQ,IAAIA,GAAG,EAAE;IAClC,OAAOO,gBAAgB,CAACP,GAAG,CAAC;EAC9B;EACA,OAAO,SAAS;AAClB,CAAC","ignoreList":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { setBaseURL } from '../networking/apiClient';
|
|
4
|
+
import { refreshAuthTokens, isRefreshFatalError } from '../networking/authRefresh';
|
|
4
5
|
import { loginViaJwt } from '../networking/api-requests/auth.api';
|
|
5
6
|
import { getMyUser } from '../networking/api-requests/user.api';
|
|
6
7
|
import { store } from '../roomStore';
|
|
7
8
|
import { setUser } from '../roomStore/chatSettingsSlice';
|
|
8
9
|
import { walletToUsername } from './walletUsername';
|
|
9
|
-
import {
|
|
10
|
-
import { localStorageConstants } from './constants/LOCAL_STORAGE';
|
|
10
|
+
import { secureUserStorage } from './secureUserStorage';
|
|
11
11
|
const getStatusCode = error => {
|
|
12
12
|
const status = error?.response?.status;
|
|
13
13
|
return typeof status === 'number' ? status : null;
|
|
@@ -31,15 +31,112 @@ const normalizeUserForXmpp = user => {
|
|
|
31
31
|
xmppUsername: normalizedXmppUsername
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
|
|
35
|
+
// Hermes has no atob/Buffer; hand-decode just enough base64url to read a
|
|
36
|
+
// JWT's `iat`. Claims are ASCII so the byte-per-char string is fine.
|
|
37
|
+
const B64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
38
|
+
const readJwtIat = token => {
|
|
39
|
+
if (!token || typeof token !== 'string') {
|
|
40
|
+
return 0;
|
|
41
|
+
}
|
|
42
|
+
const part = token.split('.')[1];
|
|
43
|
+
if (!part) {
|
|
44
|
+
return 0;
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
const clean = part.replace(/-/g, '+').replace(/_/g, '/');
|
|
48
|
+
let out = '';
|
|
49
|
+
let buffer = 0;
|
|
50
|
+
let bits = 0;
|
|
51
|
+
for (let i = 0; i < clean.length; i++) {
|
|
52
|
+
const idx = B64_ALPHABET.indexOf(clean[i]);
|
|
53
|
+
if (idx === -1) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
buffer = buffer << 6 | idx;
|
|
57
|
+
bits += 6;
|
|
58
|
+
if (bits >= 8) {
|
|
59
|
+
bits -= 8;
|
|
60
|
+
out += String.fromCharCode(buffer >> bits & 0xff);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const iat = JSON.parse(out)?.iat;
|
|
64
|
+
return typeof iat === 'number' ? iat : 0;
|
|
65
|
+
} catch {
|
|
66
|
+
return 0;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* A `userLogin.user` is typically a snapshot the host captured at ITS
|
|
72
|
+
* login time and re-presents verbatim on every mount, while this SDK
|
|
73
|
+
* keeps rotating the session and persisting the newest pair to
|
|
74
|
+
* `ETHORA_USER`. Taking the snapshot as-is therefore discards the live
|
|
75
|
+
* session in favour of an ever-aging copy: media goes blank the moment
|
|
76
|
+
* the snapshot has no `fileToken` (secure-files URLs 401 without it),
|
|
77
|
+
* and once the snapshot's refresh token ages out entirely the account
|
|
78
|
+
* looks dead even though the SDK held a working session all along.
|
|
79
|
+
*
|
|
80
|
+
* So, for the SAME account only, prefer whichever refresh pair was
|
|
81
|
+
* minted later (JWT `iat` decides — a host that genuinely re-logged-in
|
|
82
|
+
* hands us newer tokens and wins), and fill in a missing `fileToken`
|
|
83
|
+
* from the persisted copy either way.
|
|
84
|
+
*/
|
|
85
|
+
const adoptFresherPersistedSession = async candidate => {
|
|
86
|
+
try {
|
|
87
|
+
const stored = await secureUserStorage().get();
|
|
88
|
+
if (!stored) {
|
|
89
|
+
return candidate;
|
|
38
90
|
}
|
|
91
|
+
const sameUser = candidate._id && stored._id && candidate._id === stored._id || candidate.xmppUsername && stored.xmppUsername && candidate.xmppUsername === stored.xmppUsername;
|
|
92
|
+
if (!sameUser) {
|
|
93
|
+
return candidate;
|
|
94
|
+
}
|
|
95
|
+
const merged = {
|
|
96
|
+
...candidate
|
|
97
|
+
};
|
|
98
|
+
if (stored.refreshToken && readJwtIat(stored.refreshToken) > readJwtIat(candidate.refreshToken)) {
|
|
99
|
+
merged.refreshToken = stored.refreshToken;
|
|
100
|
+
if (stored.token) {
|
|
101
|
+
merged.token = stored.token;
|
|
102
|
+
}
|
|
103
|
+
if (stored.fileToken) {
|
|
104
|
+
merged.fileToken = stored.fileToken;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (!merged.fileToken && stored.fileToken) {
|
|
108
|
+
merged.fileToken = stored.fileToken;
|
|
109
|
+
}
|
|
110
|
+
return merged;
|
|
111
|
+
} catch {
|
|
112
|
+
return candidate;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Bootstrap rotation.
|
|
118
|
+
*
|
|
119
|
+
* Was a second, independent `/users/login/refresh` caller that bypassed
|
|
120
|
+
* every lock in the SDK — and, worse, only wrote the rotated token to
|
|
121
|
+
* the store on the happy path, so several of the early-return branches
|
|
122
|
+
* below used to drop it. Under the backend's reuse detection a dropped
|
|
123
|
+
* rotation means the next launch presents a burned token and the
|
|
124
|
+
* session is killed.
|
|
125
|
+
*
|
|
126
|
+
* `refreshAuthTokens` persists the new pair before it resolves, so by
|
|
127
|
+
* the time this returns the rotation is safe no matter which branch the
|
|
128
|
+
* caller takes afterwards. The explicit token is required here: during
|
|
129
|
+
* bootstrap the candidate session isn't in the store yet.
|
|
130
|
+
*/
|
|
131
|
+
const refreshWithToken = async refreshToken => {
|
|
132
|
+
const result = await refreshAuthTokens({
|
|
133
|
+
refreshToken
|
|
39
134
|
});
|
|
40
135
|
return {
|
|
41
|
-
token:
|
|
42
|
-
refreshToken:
|
|
136
|
+
token: result.token,
|
|
137
|
+
refreshToken: result.refreshToken || refreshToken,
|
|
138
|
+
xmppPassword: result.xmppPassword || '',
|
|
139
|
+
fileToken: result.fileToken || ''
|
|
43
140
|
};
|
|
44
141
|
};
|
|
45
142
|
const mergeUsers = (base, patch) => {
|
|
@@ -64,10 +161,14 @@ const tryHydrateViaMy = async (candidate, myEndpoint, signal) => {
|
|
|
64
161
|
}
|
|
65
162
|
let workingToken = candidate?.token || '';
|
|
66
163
|
let workingRefresh = candidate?.refreshToken || '';
|
|
164
|
+
let rotatedXmppPassword = '';
|
|
165
|
+
let workingFileToken = candidate?.fileToken || '';
|
|
67
166
|
const candidateWithCurrentTokens = () => ({
|
|
68
167
|
...candidate,
|
|
69
168
|
token: workingToken || candidate.token,
|
|
70
|
-
refreshToken: workingRefresh || candidate.refreshToken
|
|
169
|
+
refreshToken: workingRefresh || candidate.refreshToken,
|
|
170
|
+
xmppPassword: rotatedXmppPassword || candidate.xmppPassword,
|
|
171
|
+
fileToken: workingFileToken || candidate.fileToken
|
|
71
172
|
});
|
|
72
173
|
const fallbackWithCreds = () => {
|
|
73
174
|
const normalized = normalizeUserForXmpp(candidateWithCurrentTokens());
|
|
@@ -86,6 +187,8 @@ const tryHydrateViaMy = async (candidate, myEndpoint, signal) => {
|
|
|
86
187
|
if (merged) {
|
|
87
188
|
merged.token = workingToken || merged.token;
|
|
88
189
|
merged.refreshToken = workingRefresh || merged.refreshToken;
|
|
190
|
+
merged.xmppPassword = rotatedXmppPassword || merged.xmppPassword;
|
|
191
|
+
merged.fileToken = workingFileToken || merged.fileToken;
|
|
89
192
|
}
|
|
90
193
|
return merged;
|
|
91
194
|
} catch (error) {
|
|
@@ -110,6 +213,8 @@ const tryHydrateViaMy = async (candidate, myEndpoint, signal) => {
|
|
|
110
213
|
const refreshed = await refreshWithToken(workingRefresh);
|
|
111
214
|
workingToken = refreshed.token;
|
|
112
215
|
workingRefresh = refreshed.refreshToken;
|
|
216
|
+
rotatedXmppPassword = refreshed.xmppPassword || rotatedXmppPassword;
|
|
217
|
+
workingFileToken = refreshed.fileToken || workingFileToken;
|
|
113
218
|
try {
|
|
114
219
|
const myUser = await getMyUser({
|
|
115
220
|
token: workingToken,
|
|
@@ -119,6 +224,8 @@ const tryHydrateViaMy = async (candidate, myEndpoint, signal) => {
|
|
|
119
224
|
if (merged) {
|
|
120
225
|
merged.token = workingToken || merged.token;
|
|
121
226
|
merged.refreshToken = workingRefresh || merged.refreshToken;
|
|
227
|
+
merged.xmppPassword = rotatedXmppPassword || merged.xmppPassword;
|
|
228
|
+
merged.fileToken = workingFileToken || merged.fileToken;
|
|
122
229
|
}
|
|
123
230
|
return merged;
|
|
124
231
|
} catch (myError) {
|
|
@@ -138,6 +245,13 @@ const tryHydrateViaMy = async (candidate, myEndpoint, signal) => {
|
|
|
138
245
|
if (signal?.aborted || isAbortError(error)) {
|
|
139
246
|
return null;
|
|
140
247
|
}
|
|
248
|
+
// A fatal refresh verdict (reuse detected / token not found / stale
|
|
249
|
+
// with nothing newer around) carries no HTTP response, so it would
|
|
250
|
+
// otherwise fall through to `throw` — the session is simply dead,
|
|
251
|
+
// which for bootstrap means "nothing to restore".
|
|
252
|
+
if (isRefreshFatalError(error)) {
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
141
255
|
if (isAuthError(error)) {
|
|
142
256
|
return null;
|
|
143
257
|
}
|
|
@@ -155,14 +269,14 @@ export const resolveInitBeforeLoadUser = async options => {
|
|
|
155
269
|
if (config?.baseUrl) {
|
|
156
270
|
setBaseURL(config.baseUrl, config.customAppToken);
|
|
157
271
|
}
|
|
158
|
-
const myEndpoint = config?.initBeforeLoadAuth?.myEndpoint || '/users/my';
|
|
272
|
+
const myEndpoint = config?.initBeforeLoadAuth?.myEndpoint || '/v1/users/my';
|
|
159
273
|
|
|
160
274
|
// Priority 1: explicit userLogin
|
|
161
275
|
const explicitUser = config?.userLogin?.enabled ? config?.userLogin?.user : null;
|
|
162
276
|
if (explicitUser) {
|
|
163
277
|
const candidate = normalizeUserForXmpp(explicitUser);
|
|
164
278
|
if (candidate && hasXmppCredentials(candidate)) {
|
|
165
|
-
return candidate;
|
|
279
|
+
return await adoptFresherPersistedSession(candidate);
|
|
166
280
|
}
|
|
167
281
|
const hydrated = await tryHydrateViaMy(explicitUser, myEndpoint, signal).catch(() => null);
|
|
168
282
|
if (hydrated && hasXmppCredentials(hydrated)) {
|
|
@@ -219,13 +333,13 @@ export const resolveInitBeforeLoadUser = async options => {
|
|
|
219
333
|
|
|
220
334
|
// Priority 5: persisted user in AsyncStorage
|
|
221
335
|
try {
|
|
222
|
-
const storedUser = await
|
|
336
|
+
const storedUser = await secureUserStorage().get();
|
|
223
337
|
if (storedUser && (storedUser.token || storedUser.refreshToken || storedUser.xmppPassword)) {
|
|
224
338
|
const hydrated = await tryHydrateViaMy(storedUser, myEndpoint, signal).catch(() => null);
|
|
225
339
|
if (hydrated && hasXmppCredentials(hydrated)) {
|
|
226
340
|
return hydrated;
|
|
227
341
|
}
|
|
228
|
-
await
|
|
342
|
+
await secureUserStorage().remove();
|
|
229
343
|
}
|
|
230
344
|
} catch {
|
|
231
345
|
// ignore storage errors
|
|
@@ -279,7 +393,7 @@ export const refreshUserCredentialsForXmpp = async (config, signal) => {
|
|
|
279
393
|
// fall through to /users/my path
|
|
280
394
|
}
|
|
281
395
|
}
|
|
282
|
-
const myEndpoint = config?.initBeforeLoadAuth?.myEndpoint || '/users/my';
|
|
396
|
+
const myEndpoint = config?.initBeforeLoadAuth?.myEndpoint || '/v1/users/my';
|
|
283
397
|
|
|
284
398
|
// Priority 2: redux store user (covers userLogin + customLogin +
|
|
285
399
|
// anything previously persisted into chatSettingStore.user). The
|
|
@@ -297,7 +411,7 @@ export const refreshUserCredentialsForXmpp = async (config, signal) => {
|
|
|
297
411
|
// should already mirror this, but if the redux state got cleared
|
|
298
412
|
// mid-session (logout race) this gives us one last shot.
|
|
299
413
|
try {
|
|
300
|
-
const storedUser = await
|
|
414
|
+
const storedUser = await secureUserStorage().get();
|
|
301
415
|
if (storedUser && (storedUser.token || storedUser.refreshToken || storedUser.xmppPassword)) {
|
|
302
416
|
const hydrated = await tryHydrateViaMy(storedUser, myEndpoint, signal).catch(() => null);
|
|
303
417
|
if (hydrated && hasXmppCredentials(hydrated)) {
|