@ethora/chat-component-rn 26.7.5 → 26.7.7
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 +62 -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/ChatWrapper.js +2 -0
- package/lib/commonjs/components/MainComponents/ChatWrapper.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 +32 -39
- 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/pushPayload.js +71 -0
- package/lib/commonjs/helpers/pushPayload.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/usePendingNotification.js +8 -11
- package/lib/commonjs/hooks/usePendingNotification.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 +19 -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/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
- package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js +62 -108
- 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/commonjs/services/pushSubscriptionService.js +15 -13
- package/lib/commonjs/services/pushSubscriptionService.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/ChatWrapper.js +2 -0
- package/lib/module/components/MainComponents/ChatWrapper.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 +32 -39
- 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/pushPayload.js +63 -0
- package/lib/module/helpers/pushPayload.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/usePendingNotification.js +8 -11
- package/lib/module/hooks/usePendingNotification.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 +2 -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/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
- package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
- package/lib/module/networking/xmppClient.js +62 -108
- 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/module/services/pushSubscriptionService.js +15 -13
- package/lib/module/services/pushSubscriptionService.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/ChatWrapper.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/pushPayload.d.ts +7 -0
- package/lib/typescript/helpers/pushPayload.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/usePendingNotification.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 +3 -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/xmpp/subscribeToRoomMessages.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts +8 -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/services/pushSubscriptionService.d.ts +1 -1
- package/lib/typescript/services/pushSubscriptionService.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 +31 -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/ChatWrapper.tsx +3 -0
- 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 +36 -47
- package/src/helpers/getChatBackground.ts +18 -0
- package/src/helpers/mediaLibraryRuntime.ts +25 -0
- package/src/helpers/pickImageAsset.ts +68 -0
- package/src/helpers/pushPayload.ts +62 -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/usePendingNotification.ts +5 -11
- package/src/hooks/useSendMessage.tsx +24 -60
- package/src/i18n/strings.ts +121 -1
- package/src/main.ts +4 -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/xmpp/subscribeToRoomMessages.xmpp.ts +12 -1
- package/src/networking/xmppClient.ts +65 -119
- package/src/roomStore/chatSettingsSlice.ts +3 -1
- package/src/roomStore/roomsSlice.ts +2 -20
- package/src/services/pushSubscriptionService.ts +18 -13
- package/src/types/models/room.model.ts +0 -15
- package/src/types/types.ts +33 -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) {
|
|
@@ -349,6 +342,7 @@ export class XmppClient {
|
|
|
349
342
|
}
|
|
350
343
|
|
|
351
344
|
initializeClient() {
|
|
345
|
+
this.clientAlreadyStopped = false;
|
|
352
346
|
try {
|
|
353
347
|
const devServer = this.devServer || DEFAULT_DEV_SERVER;
|
|
354
348
|
const url = `wss://${devServer}/ws`;
|
|
@@ -501,10 +495,6 @@ export class XmppClient {
|
|
|
501
495
|
this.status = 'online';
|
|
502
496
|
this.presencesReady = true;
|
|
503
497
|
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
498
|
try {
|
|
509
499
|
devPushLog(
|
|
510
500
|
'xmpp',
|
|
@@ -666,54 +656,8 @@ export class XmppClient {
|
|
|
666
656
|
}
|
|
667
657
|
|
|
668
658
|
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
659
|
|
|
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> {
|
|
660
|
+
verifyStreamAlive(timeoutMs: number = 4000): Promise<boolean> {
|
|
717
661
|
if (this.status !== 'online' || !this.client) {
|
|
718
662
|
return Promise.resolve(false);
|
|
719
663
|
}
|
|
@@ -745,70 +689,16 @@ export class XmppClient {
|
|
|
745
689
|
return this.streamAliveProbe;
|
|
746
690
|
}
|
|
747
691
|
|
|
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> {
|
|
692
|
+
async ensureStreamAlive(timeoutMs: number = 4000): Promise<void> {
|
|
761
693
|
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.
|
|
694
|
+
const alive = await this.verifyStreamAlive(timeoutMs);
|
|
695
|
+
// Re-check state: a reconnect may have started meanwhile.
|
|
696
|
+
if (!alive && this.status === 'online' && !this.suppressReconnect) {
|
|
790
697
|
try {
|
|
791
|
-
devPushLog(
|
|
792
|
-
'xmpp',
|
|
793
|
-
`stream probe missed (${this.failedProbeStreak}/${this.streamProbeFailuresForReconnect}) — confirming before reconnect`
|
|
794
|
-
);
|
|
698
|
+
devPushLog('xmpp', 'stream is zombie (ping unanswered) → forceReconnect');
|
|
795
699
|
} catch {}
|
|
796
|
-
|
|
797
|
-
this.ensureStreamAlive({ force: true, reason: 'probe-confirm' }).catch(
|
|
798
|
-
() => {}
|
|
799
|
-
);
|
|
800
|
-
}, this.streamProbeConfirmDelayMs);
|
|
801
|
-
return;
|
|
700
|
+
this.forceReconnect();
|
|
802
701
|
}
|
|
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
702
|
}
|
|
813
703
|
|
|
814
704
|
async reconnect() {
|
|
@@ -863,7 +753,10 @@ export class XmppClient {
|
|
|
863
753
|
// `this.client` still points at the old client — i.e. before
|
|
864
754
|
// initializeClient() reassigns it.
|
|
865
755
|
const old = this.client;
|
|
866
|
-
if (old) {
|
|
756
|
+
if (old && this.clientAlreadyStopped) {
|
|
757
|
+
this.detachEventListeners();
|
|
758
|
+
this.clientAlreadyStopped = false;
|
|
759
|
+
} else if (old) {
|
|
867
760
|
this.detachEventListeners();
|
|
868
761
|
// NEVER await a bare stop(): on a half-dead socket (the exact case
|
|
869
762
|
// we're reconnecting for) @xmpp/client's stop() can hang forever
|
|
@@ -878,6 +771,9 @@ export class XmppClient {
|
|
|
878
771
|
await withTimeout(old.stop(), STOP_TIMEOUT_MS);
|
|
879
772
|
}
|
|
880
773
|
this.initializeClient();
|
|
774
|
+
if (this.suspendedForBackground) {
|
|
775
|
+
await this.stopClientQuietly();
|
|
776
|
+
}
|
|
881
777
|
} finally {
|
|
882
778
|
this.reconnecting = false;
|
|
883
779
|
}
|
|
@@ -915,6 +811,56 @@ export class XmppClient {
|
|
|
915
811
|
return this.credentialsRefreshInFlight;
|
|
916
812
|
}
|
|
917
813
|
|
|
814
|
+
private suspendedForBackground = false;
|
|
815
|
+
private clientAlreadyStopped = false;
|
|
816
|
+
|
|
817
|
+
private async stopClientQuietly(): Promise<void> {
|
|
818
|
+
const c: any = this.client;
|
|
819
|
+
if (c) {
|
|
820
|
+
const sock = c.socket;
|
|
821
|
+
if (sock && typeof sock.end === 'function') {
|
|
822
|
+
try {
|
|
823
|
+
sock.end();
|
|
824
|
+
} catch {}
|
|
825
|
+
try {
|
|
826
|
+
if (c.status !== 'offline') c._status?.('offline');
|
|
827
|
+
} catch {}
|
|
828
|
+
} else {
|
|
829
|
+
await withTimeout(
|
|
830
|
+
Promise.resolve(c.stop()).catch(() => undefined),
|
|
831
|
+
STOP_TIMEOUT_MS
|
|
832
|
+
);
|
|
833
|
+
}
|
|
834
|
+
this.clientAlreadyStopped = true;
|
|
835
|
+
}
|
|
836
|
+
this.status = 'offline';
|
|
837
|
+
this.presencesReady = false;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
async suspend(): Promise<void> {
|
|
841
|
+
if (this.suspendedForBackground) {return;}
|
|
842
|
+
this.suspendedForBackground = true;
|
|
843
|
+
this.suppressReconnect = true;
|
|
844
|
+
if (this.reconnectTimer) {
|
|
845
|
+
clearTimeout(this.reconnectTimer);
|
|
846
|
+
this.reconnectTimer = null;
|
|
847
|
+
}
|
|
848
|
+
await this.stopClientQuietly();
|
|
849
|
+
console.log('XMPP suspended (background).');
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/** Back in the foreground: allow reconnects again and reconnect at once. */
|
|
853
|
+
resume(): void {
|
|
854
|
+
if (!this.suspendedForBackground) {return;}
|
|
855
|
+
this.suspendedForBackground = false;
|
|
856
|
+
this.suppressReconnect = false;
|
|
857
|
+
this.forceReconnect();
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
get isSuspended(): boolean {
|
|
861
|
+
return this.suspendedForBackground;
|
|
862
|
+
}
|
|
863
|
+
|
|
918
864
|
async disconnect(options?: { suppressReconnect?: boolean }): Promise<void> {
|
|
919
865
|
if (options?.suppressReconnect) {this.suppressReconnect = true;}
|
|
920
866
|
return this.close();
|
|
@@ -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,
|
|
@@ -81,7 +81,9 @@ export class PushSubscriptionService {
|
|
|
81
81
|
this.subscribedRooms.add(roomJID);
|
|
82
82
|
await this.saveSubscribedRoomsToStorage();
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
if (!result) {
|
|
85
|
+
console.warn('[PushService] MucSub subscribe refused for', roomJID);
|
|
86
|
+
}
|
|
85
87
|
return result;
|
|
86
88
|
} catch (error) {
|
|
87
89
|
console.error(`[PushService] Failed to subscribe to room ${roomJID}:`, error);
|
|
@@ -92,30 +94,33 @@ export class PushSubscriptionService {
|
|
|
92
94
|
async subscribeToRooms(
|
|
93
95
|
client: Client,
|
|
94
96
|
roomJIDs: string[],
|
|
95
|
-
userNick?: string
|
|
97
|
+
userNick?: string,
|
|
98
|
+
concurrency = 8
|
|
96
99
|
): Promise<void> {
|
|
97
100
|
let successful = 0;
|
|
98
101
|
let failed = 0;
|
|
99
102
|
|
|
100
|
-
|
|
103
|
+
await this.loadSubscribedRoomsFromStorage();
|
|
104
|
+
const pending = roomJIDs.filter((jid) => !this.subscribedRooms.has(jid));
|
|
105
|
+
if (!pending.length) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
101
108
|
|
|
102
|
-
for (
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
for (let i = 0; i < pending.length; i += concurrency) {
|
|
110
|
+
const batch = pending.slice(i, i + concurrency);
|
|
111
|
+
const results = await Promise.allSettled(
|
|
112
|
+
batch.map((roomJID) => this.subscribeToRoom(client, roomJID, userNick))
|
|
113
|
+
);
|
|
114
|
+
for (const r of results) {
|
|
115
|
+
if (r.status === 'fulfilled' && r.value) {
|
|
107
116
|
successful++;
|
|
108
117
|
} else {
|
|
109
118
|
failed++;
|
|
110
119
|
}
|
|
111
|
-
await new Promise(resolve => setTimeout(resolve, 100));
|
|
112
|
-
} catch (error) {
|
|
113
|
-
failed++;
|
|
114
|
-
console.error(`Failed to subscribe to room ${roomJID}:`, error);
|
|
115
120
|
}
|
|
116
121
|
}
|
|
117
122
|
|
|
118
|
-
console.log(`
|
|
123
|
+
console.log(`[PushService] MucSub: ${successful} rooms subscribed, ${failed} failed`);
|
|
119
124
|
}
|
|
120
125
|
|
|
121
126
|
async reset(): Promise<void> {
|
|
@@ -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;
|
|
@@ -166,6 +151,7 @@ export interface xmppSettingsInterface {
|
|
|
166
151
|
disableLastRead?: boolean;
|
|
167
152
|
xmppPingOnSendEnabled?: boolean;
|
|
168
153
|
historyQoS?: HistoryQoSConfig;
|
|
154
|
+
keepAliveInBackground?: boolean;
|
|
169
155
|
}
|
|
170
156
|
|
|
171
157
|
export interface InAppNotificationConfig {
|
|
@@ -325,13 +311,16 @@ export interface TypographyConfig {
|
|
|
325
311
|
};
|
|
326
312
|
/** Attach (photo/document picker) bottom sheet. */
|
|
327
313
|
attachSheet?: {
|
|
328
|
-
/** "
|
|
314
|
+
/** "Photos & Videos" section header. Default 17 / "700". */
|
|
329
315
|
title?: ChatTextStyle;
|
|
330
|
-
/**
|
|
316
|
+
/** "View Library" link next to the section header. Default 15 / "500". */
|
|
317
|
+
viewLibrary?: ChatTextStyle;
|
|
318
|
+
/** Row labels ("Upload a File"). Default 16 / "500". */
|
|
331
319
|
rowLabel?: ChatTextStyle;
|
|
332
|
-
/**
|
|
320
|
+
/** @deprecated Rows no longer render a hint line. */
|
|
333
321
|
rowHint?: ChatTextStyle;
|
|
334
|
-
/** Cancel button
|
|
322
|
+
/** @deprecated The sheet has no Cancel button — it closes by tapping
|
|
323
|
+
* the backdrop, dragging it down, or the hardware back gesture. */
|
|
335
324
|
cancelButton?: ChatTextStyle;
|
|
336
325
|
};
|
|
337
326
|
|
|
@@ -409,6 +398,16 @@ export interface IConfig {
|
|
|
409
398
|
* value takes effect.
|
|
410
399
|
*/
|
|
411
400
|
height?: number;
|
|
401
|
+
/**
|
|
402
|
+
* Extend the header cards (room list + chat) under the status bar:
|
|
403
|
+
* each pads its top by the safe-area inset and paints it white, so
|
|
404
|
+
* the card and the status-bar band are one surface. Use this instead
|
|
405
|
+
* of wrapping `<Chat>` in a top-edge SafeAreaView: a host-side white
|
|
406
|
+
* band above the card shows a hairline seam where the card's
|
|
407
|
+
* shadow/elevation starts. Off by default (hosts that already pad the
|
|
408
|
+
* top keep their layout).
|
|
409
|
+
*/
|
|
410
|
+
safeAreaTop?: boolean;
|
|
412
411
|
};
|
|
413
412
|
disableHeader?: boolean;
|
|
414
413
|
disableMedia?: boolean;
|
|
@@ -437,7 +436,7 @@ export interface IConfig {
|
|
|
437
436
|
hideMemberSendMessageAction?: boolean; // hides only "Message"
|
|
438
437
|
hideMemberCopyIdAction?: boolean; // hides only "Copy User Id"
|
|
439
438
|
chatHeaderAdditional?: { enabled: boolean; element: any };
|
|
440
|
-
headerMenu?: () => void;
|
|
439
|
+
headerMenu?: (() => void) | boolean;
|
|
441
440
|
headerChatMenu?: () => void;
|
|
442
441
|
chatHeaderSettings?: {
|
|
443
442
|
hide?: boolean;
|
|
@@ -469,6 +468,20 @@ export interface IConfig {
|
|
|
469
468
|
loginFunction: () => Promise<User | null>;
|
|
470
469
|
};
|
|
471
470
|
defaultLogin?: boolean;
|
|
471
|
+
logout?: {
|
|
472
|
+
enabled: boolean;
|
|
473
|
+
label?: string;
|
|
474
|
+
confirm?:
|
|
475
|
+
| boolean
|
|
476
|
+
| {
|
|
477
|
+
title?: string;
|
|
478
|
+
message?: string;
|
|
479
|
+
confirmText?: string;
|
|
480
|
+
cancelText?: string;
|
|
481
|
+
};
|
|
482
|
+
onBeforeLogout?: () => Promise<boolean | void> | boolean | void;
|
|
483
|
+
onAfterLogout?: () => Promise<void> | void;
|
|
484
|
+
};
|
|
472
485
|
refreshTokens?: {
|
|
473
486
|
enabled: boolean;
|
|
474
487
|
/**
|