@ethora/chat-component-rn 26.7.5 → 26.7.6
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 +59 -0
- package/README.md +31 -8
- package/lib/commonjs/assets/icons.js +7 -2
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/Header/HeaderRoomList.js +26 -7
- package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js +5 -2
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatRoom.js +36 -14
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageList.js +7 -23
- 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/RoomList.js +208 -35
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +317 -98
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +320 -110
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +552 -213
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +226 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +6 -2
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.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/NewChatModal/ModalContent.js +2 -1
- package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js +202 -104
- 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 +556 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +210 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js +7 -21
- package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +507 -244
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +74 -46
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/commonjs/components/Modals/styledModalComponents.js +9 -2
- package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +17 -7
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/commonjs/components/styled/SendInput.js +80 -11
- package/lib/commonjs/components/styled/SendInput.js.map +1 -1
- package/lib/commonjs/components/styled/StyledComponents.js +9 -3
- package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/commonjs/context/xmppProvider.js +23 -38
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/helpers/getChatBackground.js +23 -0
- package/lib/commonjs/helpers/getChatBackground.js.map +1 -0
- package/lib/commonjs/helpers/mediaLibraryRuntime.js +31 -0
- package/lib/commonjs/helpers/mediaLibraryRuntime.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/sheetGestures.js +32 -0
- package/lib/commonjs/helpers/sheetGestures.js.map +1 -0
- package/lib/commonjs/helpers/updateMessagesTillLast.js +12 -40
- package/lib/commonjs/helpers/updateMessagesTillLast.js.map +1 -1
- package/lib/commonjs/hooks/useChatRoomFocus.js +3 -9
- package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/commonjs/hooks/useLogout.js +0 -5
- package/lib/commonjs/hooks/useLogout.js.map +1 -1
- package/lib/commonjs/hooks/useSendMessage.js +23 -50
- package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
- package/lib/commonjs/i18n/strings.js +121 -1
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/main.js +6 -0
- package/lib/commonjs/main.js.map +1 -1
- package/lib/commonjs/networking/api-requests/user.api.js +59 -0
- package/lib/commonjs/networking/api-requests/user.api.js.map +1 -1
- package/lib/commonjs/networking/authRefresh.js +12 -2
- package/lib/commonjs/networking/authRefresh.js.map +1 -1
- package/lib/commonjs/networking/outboundQueue.js +0 -18
- package/lib/commonjs/networking/outboundQueue.js.map +1 -1
- package/lib/commonjs/networking/stanzaHandlers.js +1 -10
- package/lib/commonjs/networking/stanzaHandlers.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/xmppClient.js +7 -107
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/roomStore/chatSettingsSlice.js +3 -1
- package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/commonjs/roomStore/roomsSlice.js +3 -22
- package/lib/commonjs/roomStore/roomsSlice.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/Header/HeaderRoomList.js +26 -7
- package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/module/components/MainComponents/ChatHeader.js +5 -2
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/ChatRoom.js +36 -14
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/MessageList.js +8 -24
- 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/RoomList.js +207 -35
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/Menu/HeaderRoomListMenu.js +319 -101
- package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js +311 -113
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +555 -217
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +223 -0
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +6 -2
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.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/NewChatModal/ModalContent.js +2 -1
- package/lib/module/components/Modals/NewChatModal/ModalContent.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/NewChatModal.js +205 -106
- 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 +548 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +205 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/EditUserModal.js +9 -23
- package/lib/module/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +509 -248
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +76 -48
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/module/components/Modals/styledModalComponents.js +9 -2
- package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js +17 -7
- package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/module/components/styled/SendInput.js +81 -12
- package/lib/module/components/styled/SendInput.js.map +1 -1
- package/lib/module/components/styled/StyledComponents.js +9 -3
- package/lib/module/components/styled/StyledComponents.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/module/context/xmppProvider.js +23 -38
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/helpers/getChatBackground.js +18 -0
- package/lib/module/helpers/getChatBackground.js.map +1 -0
- package/lib/module/helpers/mediaLibraryRuntime.js +25 -0
- package/lib/module/helpers/mediaLibraryRuntime.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/sheetGestures.js +26 -0
- package/lib/module/helpers/sheetGestures.js.map +1 -0
- package/lib/module/helpers/updateMessagesTillLast.js +13 -41
- package/lib/module/helpers/updateMessagesTillLast.js.map +1 -1
- package/lib/module/hooks/useChatRoomFocus.js +3 -9
- package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/module/hooks/useLogout.js +0 -5
- package/lib/module/hooks/useLogout.js.map +1 -1
- package/lib/module/hooks/useSendMessage.js +24 -51
- package/lib/module/hooks/useSendMessage.js.map +1 -1
- package/lib/module/i18n/strings.js +121 -1
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/main.js +1 -1
- package/lib/module/main.js.map +1 -1
- package/lib/module/networking/api-requests/user.api.js +56 -0
- package/lib/module/networking/api-requests/user.api.js.map +1 -1
- package/lib/module/networking/authRefresh.js +12 -2
- package/lib/module/networking/authRefresh.js.map +1 -1
- package/lib/module/networking/outboundQueue.js +0 -17
- package/lib/module/networking/outboundQueue.js.map +1 -1
- package/lib/module/networking/stanzaHandlers.js +1 -10
- package/lib/module/networking/stanzaHandlers.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/xmppClient.js +7 -107
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/roomStore/chatSettingsSlice.js +3 -1
- package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/module/roomStore/roomsSlice.js +2 -20
- package/lib/module/roomStore/roomsSlice.js.map +1 -1
- package/lib/typescript/assets/icons.d.ts +16 -0
- package/lib/typescript/assets/icons.d.ts.map +1 -1
- package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -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/RoomList.d.ts +7 -0
- package/lib/typescript/components/MainComponents/RoomList.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/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/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/Modal/Modal.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/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.map +1 -1
- package/lib/typescript/components/RoomComponents/ChatRoomItem.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/StyledInputComponents/StyledInputComponents.d.ts.map +1 -1
- package/lib/typescript/context/xmppProvider.d.ts.map +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/mediaLibraryRuntime.d.ts +3 -0
- package/lib/typescript/helpers/mediaLibraryRuntime.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/sheetGestures.d.ts +20 -0
- package/lib/typescript/helpers/sheetGestures.d.ts.map +1 -0
- package/lib/typescript/helpers/updateMessagesTillLast.d.ts.map +1 -1
- package/lib/typescript/hooks/useChatRoomFocus.d.ts.map +1 -1
- package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
- package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/main.d.ts +1 -1
- package/lib/typescript/main.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/authRefresh.d.ts +4 -1
- package/lib/typescript/networking/authRefresh.d.ts.map +1 -1
- package/lib/typescript/networking/outboundQueue.d.ts +0 -16
- package/lib/typescript/networking/outboundQueue.d.ts.map +1 -1
- package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts +1 -33
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts +1 -18
- package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
- package/lib/typescript/types/models/room.model.d.ts +0 -15
- package/lib/typescript/types/models/room.model.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +30 -20
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/package.json +6 -1
- package/src/assets/icons.tsx +48 -9
- package/src/components/Header/HeaderRoomList.tsx +24 -6
- package/src/components/MainComponents/ChatHeader.tsx +5 -2
- package/src/components/MainComponents/ChatRoom.tsx +38 -20
- package/src/components/MainComponents/MessageList.tsx +8 -24
- package/src/components/MainComponents/ProfileImagePlaceholder.tsx +21 -14
- package/src/components/MainComponents/RoomList.tsx +236 -39
- package/src/components/Menu/HeaderRoomListMenu.tsx +328 -75
- package/src/components/Modals/AttachSheet/AttachSheet.tsx +331 -97
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +598 -279
- package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +244 -0
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +4 -2
- package/src/components/Modals/Modal/Modal.tsx +7 -0
- package/src/components/Modals/NewChatModal/ModalContent.tsx +6 -3
- package/src/components/Modals/NewChatModal/NewChatModal.tsx +219 -117
- package/src/components/Modals/NewChatModal/UpdNewChatModal.tsx +12 -1
- package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +615 -0
- package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +217 -0
- package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +14 -4
- package/src/components/Modals/UserProfileModal/EditUserModal.tsx +9 -25
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +617 -307
- package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +75 -58
- package/src/components/Modals/styledModalComponents.tsx +9 -2
- package/src/components/RoomComponents/ChatRoomItem.tsx +14 -7
- package/src/components/styled/SendInput.tsx +83 -12
- package/src/components/styled/StyledComponents.ts +9 -3
- package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +11 -4
- package/src/context/xmppProvider.tsx +27 -46
- package/src/helpers/getChatBackground.ts +18 -0
- package/src/helpers/mediaLibraryRuntime.ts +25 -0
- package/src/helpers/pickImageAsset.ts +68 -0
- package/src/helpers/sheetGestures.ts +25 -0
- package/src/helpers/updateMessagesTillLast.tsx +17 -42
- package/src/hooks/useChatRoomFocus.ts +3 -11
- package/src/hooks/useLogout.tsx +0 -7
- package/src/hooks/useSendMessage.tsx +24 -60
- package/src/i18n/strings.ts +121 -1
- package/src/main.ts +1 -1
- package/src/networking/api-requests/user.api.ts +71 -0
- package/src/networking/authRefresh.ts +25 -4
- package/src/networking/outboundQueue.ts +0 -29
- package/src/networking/stanzaHandlers.ts +1 -9
- package/src/networking/xmpp/presenceInRoom.xmpp.ts +6 -1
- package/src/networking/xmppClient.ts +7 -118
- package/src/roomStore/chatSettingsSlice.ts +3 -1
- package/src/roomStore/roomsSlice.ts +2 -20
- package/src/types/models/room.model.ts +0 -15
- package/src/types/types.ts +32 -20
|
@@ -211,13 +211,6 @@ export class XmppClient {
|
|
|
211
211
|
this.devServer = xmppSettings?.devServer;
|
|
212
212
|
}
|
|
213
213
|
this.disableLastRead = this.xmppSettings?.disableLastRead === true;
|
|
214
|
-
// `xmppPingOnSendEnabled` was declared in the public settings type but
|
|
215
|
-
// never read. It now controls the SEND-path liveness probe only; the
|
|
216
|
-
// periodic watchdog and the NetInfo check always run, so turning this
|
|
217
|
-
// off cannot leave a zombie socket undetected — it only removes the
|
|
218
|
-
// extra probe a send would otherwise trigger. Defaults to on
|
|
219
|
-
// (previous behaviour), just throttled and confirmation-gated now.
|
|
220
|
-
this.pingOnSendEnabled = this.xmppSettings?.xmppPingOnSendEnabled !== false;
|
|
221
214
|
|
|
222
215
|
const qos = this.xmppSettings?.historyQoS;
|
|
223
216
|
if (qos) {
|
|
@@ -501,10 +494,6 @@ export class XmppClient {
|
|
|
501
494
|
this.status = 'online';
|
|
502
495
|
this.presencesReady = true;
|
|
503
496
|
this.reconnectAttempts = 0;
|
|
504
|
-
// Fresh stream: forget any probe failures from the dead one, and
|
|
505
|
-
// don't let the throttle suppress the first probe on it.
|
|
506
|
-
this.failedProbeStreak = 0;
|
|
507
|
-
this.lastStreamProbeAt = 0;
|
|
508
497
|
try {
|
|
509
498
|
devPushLog(
|
|
510
499
|
'xmpp',
|
|
@@ -666,54 +655,8 @@ export class XmppClient {
|
|
|
666
655
|
}
|
|
667
656
|
|
|
668
657
|
private streamAliveProbe: Promise<boolean> | null = null;
|
|
669
|
-
/** Wall-clock of the last probe, for throttling. */
|
|
670
|
-
private lastStreamProbeAt = 0;
|
|
671
|
-
/** Consecutive failed probes; a reconnect needs confirmation, not one miss. */
|
|
672
|
-
private failedProbeStreak = 0;
|
|
673
|
-
|
|
674
|
-
// --- liveness-probe tuning -------------------------------------------
|
|
675
|
-
// The probe exists to catch a ZOMBIE socket: the WebSocket still reads
|
|
676
|
-
// `online` but nothing traverses it (iOS suspending a backgrounded
|
|
677
|
-
// socket, the JS debugger pausing the runtime). Without it the client
|
|
678
|
-
// sits "online" forever and every send silently vanishes.
|
|
679
|
-
//
|
|
680
|
-
// The original settings were far too trigger-happy: a 4s budget for a
|
|
681
|
-
// ping round-trip, fired after EVERY send, with a single timeout
|
|
682
|
-
// immediately calling `forceReconnect()` — a full teardown, rebuild,
|
|
683
|
-
// MUC re-join and private-store refetch. On a slow or congested mobile
|
|
684
|
-
// link a perfectly healthy but quiet stream would miss that 4s window
|
|
685
|
-
// and get torn down mid-conversation, repeatedly. (That reconnect is
|
|
686
|
-
// also what used to replay the outbound queue and duplicate a message
|
|
687
|
-
// that had already been delivered — customer-reported #31.)
|
|
688
|
-
//
|
|
689
|
-
// Tuned to: a realistic timeout, a throttle so bursts of sends can't
|
|
690
|
-
// each start a probe, and a required second failure before we tear a
|
|
691
|
-
// connection down. Zombie sockets fail every probe, so they are still
|
|
692
|
-
// caught — just after confirmation rather than on one unlucky RTT.
|
|
693
|
-
/** Per-probe budget. 4s was under a slow-network ping RTT. */
|
|
694
|
-
private streamProbeTimeoutMs = 10_000;
|
|
695
|
-
/** Minimum gap between probes, so a burst of sends probes at most once. */
|
|
696
|
-
private minStreamProbeIntervalMs = 15_000;
|
|
697
|
-
/** Delay before the confirmation probe that a teardown requires. */
|
|
698
|
-
private streamProbeConfirmDelayMs = 2_000;
|
|
699
|
-
/** Failures needed before `forceReconnect()`. */
|
|
700
|
-
private streamProbeFailuresForReconnect = 2;
|
|
701
|
-
/** Host opt-out for the send-path probe (`xmppPingOnSendEnabled`). */
|
|
702
|
-
private pingOnSendEnabled = true;
|
|
703
658
|
|
|
704
|
-
|
|
705
|
-
* Send-path liveness check. Throttled and skippable by config — unlike
|
|
706
|
-
* the watchdog, this fires from user activity and must not turn a chatty
|
|
707
|
-
* room into a probe storm.
|
|
708
|
-
*/
|
|
709
|
-
ensureStreamAliveAfterSend(): void {
|
|
710
|
-
if (!this.pingOnSendEnabled) {return;}
|
|
711
|
-
this.ensureStreamAlive({ reason: 'send' }).catch(() => {});
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
verifyStreamAlive(
|
|
715
|
-
timeoutMs: number = this.streamProbeTimeoutMs
|
|
716
|
-
): Promise<boolean> {
|
|
659
|
+
verifyStreamAlive(timeoutMs: number = 4000): Promise<boolean> {
|
|
717
660
|
if (this.status !== 'online' || !this.client) {
|
|
718
661
|
return Promise.resolve(false);
|
|
719
662
|
}
|
|
@@ -745,70 +688,16 @@ export class XmppClient {
|
|
|
745
688
|
return this.streamAliveProbe;
|
|
746
689
|
}
|
|
747
690
|
|
|
748
|
-
|
|
749
|
-
* Check that the stream is really carrying traffic, and tear it down only
|
|
750
|
-
* if that is confirmed false.
|
|
751
|
-
*
|
|
752
|
-
* `force` skips the throttle — used by the periodic watchdog and the
|
|
753
|
-
* NetInfo "we're reachable again" signal, which are already rare and
|
|
754
|
-
* genuinely want to know right now. Send-path callers leave it off so a
|
|
755
|
-
* burst of messages triggers at most one probe.
|
|
756
|
-
*/
|
|
757
|
-
async ensureStreamAlive(opts?: {
|
|
758
|
-
force?: boolean;
|
|
759
|
-
reason?: string;
|
|
760
|
-
}): Promise<void> {
|
|
691
|
+
async ensureStreamAlive(timeoutMs: number = 4000): Promise<void> {
|
|
761
692
|
if (this.suppressReconnect || this.status !== 'online') {return;}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
if (
|
|
765
|
-
!opts?.force &&
|
|
766
|
-
now - this.lastStreamProbeAt < this.minStreamProbeIntervalMs
|
|
767
|
-
) {
|
|
768
|
-
// Probed recently — a healthy answer is still fresh, and a dead
|
|
769
|
-
// socket will be caught by the next watchdog tick anyway.
|
|
770
|
-
return;
|
|
771
|
-
}
|
|
772
|
-
this.lastStreamProbeAt = now;
|
|
773
|
-
|
|
774
|
-
const alive = await this.verifyStreamAlive();
|
|
775
|
-
|
|
776
|
-
// Re-check state: a reconnect may have started while we waited.
|
|
777
|
-
if (this.status !== 'online' || this.suppressReconnect) {return;}
|
|
778
|
-
|
|
779
|
-
if (alive) {
|
|
780
|
-
this.failedProbeStreak = 0;
|
|
781
|
-
return;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
this.failedProbeStreak += 1;
|
|
785
|
-
if (this.failedProbeStreak < this.streamProbeFailuresForReconnect) {
|
|
786
|
-
// One missed probe is not proof of a dead socket — a congested link
|
|
787
|
-
// or a busy server can blow the budget on a stream that is fine.
|
|
788
|
-
// Confirm with a second probe shortly, instead of tearing down a
|
|
789
|
-
// working connection on a single unlucky round trip.
|
|
693
|
+
const alive = await this.verifyStreamAlive(timeoutMs);
|
|
694
|
+
// Re-check state: a reconnect may have started meanwhile.
|
|
695
|
+
if (!alive && this.status === 'online' && !this.suppressReconnect) {
|
|
790
696
|
try {
|
|
791
|
-
devPushLog(
|
|
792
|
-
'xmpp',
|
|
793
|
-
`stream probe missed (${this.failedProbeStreak}/${this.streamProbeFailuresForReconnect}) — confirming before reconnect`
|
|
794
|
-
);
|
|
697
|
+
devPushLog('xmpp', 'stream is zombie (ping unanswered) → forceReconnect');
|
|
795
698
|
} catch {}
|
|
796
|
-
|
|
797
|
-
this.ensureStreamAlive({ force: true, reason: 'probe-confirm' }).catch(
|
|
798
|
-
() => {}
|
|
799
|
-
);
|
|
800
|
-
}, this.streamProbeConfirmDelayMs);
|
|
801
|
-
return;
|
|
699
|
+
this.forceReconnect();
|
|
802
700
|
}
|
|
803
|
-
|
|
804
|
-
this.failedProbeStreak = 0;
|
|
805
|
-
try {
|
|
806
|
-
devPushLog(
|
|
807
|
-
'xmpp',
|
|
808
|
-
'stream is zombie (probe unanswered twice) → forceReconnect'
|
|
809
|
-
);
|
|
810
|
-
} catch {}
|
|
811
|
-
this.forceReconnect();
|
|
812
701
|
}
|
|
813
702
|
|
|
814
703
|
async reconnect() {
|
|
@@ -33,7 +33,9 @@ export interface ChatState {
|
|
|
33
33
|
|
|
34
34
|
export const unpackAndTransform = (input?: User): User => {
|
|
35
35
|
return {
|
|
36
|
-
|
|
36
|
+
// Was hardcoded to '' — every setUser dropped the user's own bio, so
|
|
37
|
+
// the profile's About section could never show one.
|
|
38
|
+
description: input?.description || '',
|
|
37
39
|
token: input?.token || '',
|
|
38
40
|
profileImage: input?.profileImage || '',
|
|
39
41
|
_id: input?._id || '',
|
|
@@ -317,6 +317,8 @@ const reducers = {
|
|
|
317
317
|
: [];
|
|
318
318
|
state.rooms[roomData.jid] = {
|
|
319
319
|
...roomData,
|
|
320
|
+
icon: roomData.icon !== undefined ? roomData.icon : existing?.icon,
|
|
321
|
+
roomBg: roomData.roomBg !== undefined ? roomData.roomBg : existing?.roomBg,
|
|
320
322
|
messages:
|
|
321
323
|
existingMessages.length > 0 ? existingMessages : incomingMessages,
|
|
322
324
|
lastViewedTimestamp: lastViewed,
|
|
@@ -543,25 +545,6 @@ const reducers = {
|
|
|
543
545
|
) => {
|
|
544
546
|
state.isUnreadSyncing = action.payload;
|
|
545
547
|
},
|
|
546
|
-
/**
|
|
547
|
-
* Records how far the user has actually read in a room: the timestamp
|
|
548
|
-
* of the newest message they had reached when they scrolled away from
|
|
549
|
-
* the bottom, or `null` while they are at the bottom.
|
|
550
|
-
*
|
|
551
|
-
* Written only by MessageList as the user scrolls. Deliberately does
|
|
552
|
-
* NOT touch `unreadMessages` or `lastViewedTimestamp` — it only tells
|
|
553
|
-
* the various "mark this room read" paths what value to stamp instead
|
|
554
|
-
* of `Date.now()`. Customer-reported #33.
|
|
555
|
-
*/
|
|
556
|
-
setReadBoundary: (
|
|
557
|
-
state: WritableDraft<RoomMessagesState>,
|
|
558
|
-
action: PayloadAction<{ chatJID: string; boundaryTs: number | null }>
|
|
559
|
-
) => {
|
|
560
|
-
const { chatJID, boundaryTs } = action.payload;
|
|
561
|
-
if (state.rooms[chatJID]) {
|
|
562
|
-
state.rooms[chatJID].readBoundaryTs = boundaryTs;
|
|
563
|
-
}
|
|
564
|
-
},
|
|
565
548
|
setLastViewedTimestamp: (
|
|
566
549
|
state: WritableDraft<RoomMessagesState>,
|
|
567
550
|
action: PayloadAction<{ chatJID: string; timestamp: number }>
|
|
@@ -918,7 +901,6 @@ export const {
|
|
|
918
901
|
setIsLoading,
|
|
919
902
|
setUnreadSyncing,
|
|
920
903
|
setLastViewedTimestamp,
|
|
921
|
-
setReadBoundary,
|
|
922
904
|
applyPrivateStoreMarkers,
|
|
923
905
|
setRoomNoMessages,
|
|
924
906
|
setCurrentRoom,
|
|
@@ -50,21 +50,6 @@ export interface IRoom {
|
|
|
50
50
|
composingList?: string[];
|
|
51
51
|
lastViewedTimestamp?: number;
|
|
52
52
|
unreadMessages?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Timestamp of the newest message the user had actually reached when
|
|
55
|
-
* they scrolled away from the bottom of this room, or null/undefined
|
|
56
|
-
* while they are at the bottom (everything on screen is read).
|
|
57
|
-
*
|
|
58
|
-
* Lives in the store rather than in ChatRoom's local state because
|
|
59
|
-
* several code paths outside the component mark a room read — the
|
|
60
|
-
* AppState background handler, the `isVisible` consumer signal, the
|
|
61
|
-
* visible-room auto-advance, `useChatRoomFocus` — and all of them must
|
|
62
|
-
* stamp what the user actually saw instead of `Date.now()`. Stamping
|
|
63
|
-
* "now" while they are scrolled up silently destroys unread messages,
|
|
64
|
-
* and because those paths also flush to the server-side private store
|
|
65
|
-
* the loss survives an app restart. Customer-reported #33.
|
|
66
|
-
*/
|
|
67
|
-
readBoundaryTs?: number | null;
|
|
68
53
|
noMessages?: boolean;
|
|
69
54
|
role?: string;
|
|
70
55
|
|
package/src/types/types.ts
CHANGED
|
@@ -33,21 +33,6 @@ export interface IRoom {
|
|
|
33
33
|
composingList?: string[];
|
|
34
34
|
lastViewedTimestamp?: number;
|
|
35
35
|
unreadMessages?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Timestamp of the newest message the user had actually reached when
|
|
38
|
-
* they scrolled away from the bottom of this room; null/undefined while
|
|
39
|
-
* they are at the bottom (everything on screen is read).
|
|
40
|
-
*
|
|
41
|
-
* Written only by MessageList as the user scrolls. Every path that marks
|
|
42
|
-
* a room read must prefer this over `Date.now()` — the AppState
|
|
43
|
-
* background handler, the `isVisible` consumer signal, the visible-room
|
|
44
|
-
* auto-advance, `useChatRoomFocus` and logout all flush to the
|
|
45
|
-
* server-side private store, so stamping "now" while the user is
|
|
46
|
-
* scrolled up destroys unread messages permanently (survives an app
|
|
47
|
-
* restart, because the bad marker comes back from the server).
|
|
48
|
-
* Customer-reported #33.
|
|
49
|
-
*/
|
|
50
|
-
readBoundaryTs?: number | null;
|
|
51
36
|
noMessages?: boolean;
|
|
52
37
|
role?: string;
|
|
53
38
|
createdAt?: string | number | Date;
|
|
@@ -325,13 +310,16 @@ export interface TypographyConfig {
|
|
|
325
310
|
};
|
|
326
311
|
/** Attach (photo/document picker) bottom sheet. */
|
|
327
312
|
attachSheet?: {
|
|
328
|
-
/** "
|
|
313
|
+
/** "Photos & Videos" section header. Default 17 / "700". */
|
|
329
314
|
title?: ChatTextStyle;
|
|
330
|
-
/**
|
|
315
|
+
/** "View Library" link next to the section header. Default 15 / "500". */
|
|
316
|
+
viewLibrary?: ChatTextStyle;
|
|
317
|
+
/** Row labels ("Upload a File"). Default 16 / "500". */
|
|
331
318
|
rowLabel?: ChatTextStyle;
|
|
332
|
-
/**
|
|
319
|
+
/** @deprecated Rows no longer render a hint line. */
|
|
333
320
|
rowHint?: ChatTextStyle;
|
|
334
|
-
/** Cancel button
|
|
321
|
+
/** @deprecated The sheet has no Cancel button — it closes by tapping
|
|
322
|
+
* the backdrop, dragging it down, or the hardware back gesture. */
|
|
335
323
|
cancelButton?: ChatTextStyle;
|
|
336
324
|
};
|
|
337
325
|
|
|
@@ -409,6 +397,16 @@ export interface IConfig {
|
|
|
409
397
|
* value takes effect.
|
|
410
398
|
*/
|
|
411
399
|
height?: number;
|
|
400
|
+
/**
|
|
401
|
+
* Extend the header cards (room list + chat) under the status bar:
|
|
402
|
+
* each pads its top by the safe-area inset and paints it white, so
|
|
403
|
+
* the card and the status-bar band are one surface. Use this instead
|
|
404
|
+
* of wrapping `<Chat>` in a top-edge SafeAreaView: a host-side white
|
|
405
|
+
* band above the card shows a hairline seam where the card's
|
|
406
|
+
* shadow/elevation starts. Off by default (hosts that already pad the
|
|
407
|
+
* top keep their layout).
|
|
408
|
+
*/
|
|
409
|
+
safeAreaTop?: boolean;
|
|
412
410
|
};
|
|
413
411
|
disableHeader?: boolean;
|
|
414
412
|
disableMedia?: boolean;
|
|
@@ -437,7 +435,7 @@ export interface IConfig {
|
|
|
437
435
|
hideMemberSendMessageAction?: boolean; // hides only "Message"
|
|
438
436
|
hideMemberCopyIdAction?: boolean; // hides only "Copy User Id"
|
|
439
437
|
chatHeaderAdditional?: { enabled: boolean; element: any };
|
|
440
|
-
headerMenu?: () => void;
|
|
438
|
+
headerMenu?: (() => void) | boolean;
|
|
441
439
|
headerChatMenu?: () => void;
|
|
442
440
|
chatHeaderSettings?: {
|
|
443
441
|
hide?: boolean;
|
|
@@ -469,6 +467,20 @@ export interface IConfig {
|
|
|
469
467
|
loginFunction: () => Promise<User | null>;
|
|
470
468
|
};
|
|
471
469
|
defaultLogin?: boolean;
|
|
470
|
+
logout?: {
|
|
471
|
+
enabled: boolean;
|
|
472
|
+
label?: string;
|
|
473
|
+
confirm?:
|
|
474
|
+
| boolean
|
|
475
|
+
| {
|
|
476
|
+
title?: string;
|
|
477
|
+
message?: string;
|
|
478
|
+
confirmText?: string;
|
|
479
|
+
cancelText?: string;
|
|
480
|
+
};
|
|
481
|
+
onBeforeLogout?: () => Promise<boolean | void> | boolean | void;
|
|
482
|
+
onAfterLogout?: () => Promise<void> | void;
|
|
483
|
+
};
|
|
472
484
|
refreshTokens?: {
|
|
473
485
|
enabled: boolean;
|
|
474
486
|
/**
|