@ethora/chat-component-rn 26.10.5 → 26.10.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 +10 -0
- package/README.md +18 -0
- package/app.plugin.js +2 -0
- package/lib/commonjs/assets/icons.js +2 -2
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/MainComponents/AlbumGrid.js +152 -0
- package/lib/commonjs/components/MainComponents/AlbumGrid.js.map +1 -0
- package/lib/commonjs/components/MainComponents/ChatRoom.js +2 -2
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MediaMessage.js +199 -123
- package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MediaUploadOverlay.js +109 -0
- package/lib/commonjs/components/MainComponents/MediaUploadOverlay.js.map +1 -0
- package/lib/commonjs/components/MessageBubble/MediaCaption.js +51 -0
- package/lib/commonjs/components/MessageBubble/MediaCaption.js.map +1 -0
- package/lib/commonjs/components/MessageBubble/Message.js +40 -1
- package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js +2 -1
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +75 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/LastMessageItem.js +20 -4
- package/lib/commonjs/components/RoomComponents/LastMessageItem.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js +3 -2
- package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js +3 -2
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js +3 -2
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js +3 -2
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/commonjs/components/Thread/ThreadWrapper.js +3 -2
- package/lib/commonjs/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/commonjs/components/styled/MediaFilePreview.js +60 -47
- package/lib/commonjs/components/styled/MediaFilePreview.js.map +1 -1
- package/lib/commonjs/components/styled/MessageImage.js +16 -6
- package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
- package/lib/commonjs/components/styled/SendInput.js +99 -68
- package/lib/commonjs/components/styled/SendInput.js.map +1 -1
- package/lib/commonjs/components/styled/VideoMessage.js +24 -10
- package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
- package/lib/commonjs/context/xmppProvider.js +46 -0
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/e2ee/fileEnvelope.js +6 -0
- package/lib/commonjs/e2ee/fileEnvelope.js.map +1 -1
- package/lib/commonjs/e2ee/sealedBody.js +32 -2
- package/lib/commonjs/e2ee/sealedBody.js.map +1 -1
- package/lib/commonjs/helpers/albumLayout.js +150 -0
- package/lib/commonjs/helpers/albumLayout.js.map +1 -0
- package/lib/commonjs/helpers/attachments.js +255 -0
- package/lib/commonjs/helpers/attachments.js.map +1 -0
- package/lib/commonjs/helpers/caption.js +214 -0
- package/lib/commonjs/helpers/caption.js.map +1 -0
- package/lib/commonjs/helpers/createMainMessageForThread.js +5 -1
- package/lib/commonjs/helpers/createMainMessageForThread.js.map +1 -1
- package/lib/commonjs/helpers/createMessageFromXml.js +19 -5
- package/lib/commonjs/helpers/createMessageFromXml.js.map +1 -1
- package/lib/commonjs/helpers/fileKind.js +40 -0
- package/lib/commonjs/helpers/fileKind.js.map +1 -0
- package/lib/commonjs/helpers/getDataFromXml.js +6 -1
- package/lib/commonjs/helpers/getDataFromXml.js.map +1 -1
- package/lib/commonjs/helpers/mapWithConcurrency.js +41 -0
- package/lib/commonjs/helpers/mapWithConcurrency.js.map +1 -0
- package/lib/commonjs/helpers/mediaLimits.js +33 -0
- package/lib/commonjs/helpers/mediaLimits.js.map +1 -0
- package/lib/commonjs/helpers/mediaSendRetry.js +64 -0
- package/lib/commonjs/helpers/mediaSendRetry.js.map +1 -0
- package/lib/commonjs/helpers/mediaWireData.js +62 -0
- package/lib/commonjs/helpers/mediaWireData.js.map +1 -0
- package/lib/commonjs/helpers/mentionSpans.js +19 -0
- package/lib/commonjs/helpers/mentionSpans.js.map +1 -0
- package/lib/commonjs/helpers/mimeToExtension.js +45 -0
- package/lib/commonjs/helpers/mimeToExtension.js.map +1 -1
- package/lib/commonjs/helpers/readReceipts.js +173 -0
- package/lib/commonjs/helpers/readReceipts.js.map +1 -0
- package/lib/commonjs/helpers/repairFilenameEncoding.js +79 -0
- package/lib/commonjs/helpers/repairFilenameEncoding.js.map +1 -0
- package/lib/commonjs/helpers/safeJson.js +18 -0
- package/lib/commonjs/helpers/safeJson.js.map +1 -0
- package/lib/commonjs/helpers/secureStoreRuntime.js +10 -1
- package/lib/commonjs/helpers/secureStoreRuntime.js.map +1 -1
- package/lib/commonjs/hooks/useSendMessage.js +384 -193
- package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
- package/lib/commonjs/i18n/strings.js +96 -0
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/main.js +81 -0
- package/lib/commonjs/main.js.map +1 -1
- package/lib/commonjs/networking/api-requests/auth.api.js +62 -3
- package/lib/commonjs/networking/api-requests/auth.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/push.api.js +22 -7
- package/lib/commonjs/networking/api-requests/push.api.js.map +1 -1
- package/lib/commonjs/networking/stanzaHandlers.js +100 -3
- package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
- package/lib/commonjs/networking/xmpp/handleStanzas.xmpp.js +4 -2
- package/lib/commonjs/networking/xmpp/handleStanzas.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/sendDisplayedMarker.xmpp.js +28 -0
- package/lib/commonjs/networking/xmpp/sendDisplayedMarker.xmpp.js.map +1 -0
- package/lib/commonjs/networking/xmpp/sendMediaMessage.xmpp.js +53 -2
- package/lib/commonjs/networking/xmpp/sendMediaMessage.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/sendReceivedReceipt.xmpp.js +28 -0
- package/lib/commonjs/networking/xmpp/sendReceivedReceipt.xmpp.js.map +1 -0
- package/lib/commonjs/networking/xmppClient.js +64 -0
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/push/pushKeyStore.js +169 -0
- package/lib/commonjs/push/pushKeyStore.js.map +1 -0
- package/lib/commonjs/push/sealedBox.js +106 -0
- package/lib/commonjs/push/sealedBox.js.map +1 -0
- package/lib/commonjs/push/sealedPush.js +124 -0
- package/lib/commonjs/push/sealedPush.js.map +1 -0
- package/lib/commonjs/push/sealedPushTask.js +195 -0
- package/lib/commonjs/push/sealedPushTask.js.map +1 -0
- package/lib/commonjs/roomStore/persistence.js +78 -5
- package/lib/commonjs/roomStore/persistence.js.map +1 -1
- package/lib/commonjs/roomStore/roomHeapSlice.js +4 -0
- package/lib/commonjs/roomStore/roomHeapSlice.js.map +1 -1
- package/lib/commonjs/roomStore/roomsSlice.js +114 -1
- package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
- package/lib/commonjs/services/pushRegistration.js +12 -7
- package/lib/commonjs/services/pushRegistration.js.map +1 -1
- package/lib/commonjs/types/models/attachment.model.js +2 -0
- package/lib/commonjs/types/models/attachment.model.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/assets/icons.js +1 -1
- package/lib/module/assets/icons.js.map +1 -1
- package/lib/module/components/MainComponents/AlbumGrid.js +146 -0
- package/lib/module/components/MainComponents/AlbumGrid.js.map +1 -0
- package/lib/module/components/MainComponents/ChatRoom.js +2 -2
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/MediaMessage.js +200 -124
- package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/module/components/MainComponents/MediaUploadOverlay.js +104 -0
- package/lib/module/components/MainComponents/MediaUploadOverlay.js.map +1 -0
- package/lib/module/components/MessageBubble/MediaCaption.js +46 -0
- package/lib/module/components/MessageBubble/MediaCaption.js.map +1 -0
- package/lib/module/components/MessageBubble/Message.js +44 -5
- package/lib/module/components/MessageBubble/Message.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageInteractions.js +2 -1
- package/lib/module/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +75 -0
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/module/components/RoomComponents/LastMessageItem.js +20 -4
- package/lib/module/components/RoomComponents/LastMessageItem.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastAudioMessage.js +3 -2
- package/lib/module/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js +3 -2
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js +3 -2
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js +3 -2
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/module/components/Thread/ThreadWrapper.js +3 -2
- package/lib/module/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/module/components/styled/MediaFilePreview.js +61 -48
- package/lib/module/components/styled/MediaFilePreview.js.map +1 -1
- package/lib/module/components/styled/MessageImage.js +16 -6
- package/lib/module/components/styled/MessageImage.js.map +1 -1
- package/lib/module/components/styled/SendInput.js +99 -68
- package/lib/module/components/styled/SendInput.js.map +1 -1
- package/lib/module/components/styled/VideoMessage.js +24 -10
- package/lib/module/components/styled/VideoMessage.js.map +1 -1
- package/lib/module/context/xmppProvider.js +46 -0
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/e2ee/fileEnvelope.js +1 -1
- package/lib/module/e2ee/fileEnvelope.js.map +1 -1
- package/lib/module/e2ee/sealedBody.js +32 -2
- package/lib/module/e2ee/sealedBody.js.map +1 -1
- package/lib/module/helpers/albumLayout.js +143 -0
- package/lib/module/helpers/albumLayout.js.map +1 -0
- package/lib/module/helpers/attachments.js +245 -0
- package/lib/module/helpers/attachments.js.map +1 -0
- package/lib/module/helpers/caption.js +207 -0
- package/lib/module/helpers/caption.js.map +1 -0
- package/lib/module/helpers/createMainMessageForThread.js +5 -1
- package/lib/module/helpers/createMainMessageForThread.js.map +1 -1
- package/lib/module/helpers/createMessageFromXml.js +20 -6
- package/lib/module/helpers/createMessageFromXml.js.map +1 -1
- package/lib/module/helpers/fileKind.js +34 -0
- package/lib/module/helpers/fileKind.js.map +1 -0
- package/lib/module/helpers/getDataFromXml.js +6 -1
- package/lib/module/helpers/getDataFromXml.js.map +1 -1
- package/lib/module/helpers/mapWithConcurrency.js +37 -0
- package/lib/module/helpers/mapWithConcurrency.js.map +1 -0
- package/lib/module/helpers/mediaLimits.js +27 -0
- package/lib/module/helpers/mediaLimits.js.map +1 -0
- package/lib/module/helpers/mediaSendRetry.js +55 -0
- package/lib/module/helpers/mediaSendRetry.js.map +1 -0
- package/lib/module/helpers/mediaWireData.js +58 -0
- package/lib/module/helpers/mediaWireData.js.map +1 -0
- package/lib/module/helpers/mentionSpans.js +14 -0
- package/lib/module/helpers/mentionSpans.js.map +1 -0
- package/lib/module/helpers/mimeToExtension.js +43 -0
- package/lib/module/helpers/mimeToExtension.js.map +1 -1
- package/lib/module/helpers/readReceipts.js +160 -0
- package/lib/module/helpers/readReceipts.js.map +1 -0
- package/lib/module/helpers/repairFilenameEncoding.js +74 -0
- package/lib/module/helpers/repairFilenameEncoding.js.map +1 -0
- package/lib/module/helpers/safeJson.js +13 -0
- package/lib/module/helpers/safeJson.js.map +1 -0
- package/lib/module/helpers/secureStoreRuntime.js +10 -1
- package/lib/module/helpers/secureStoreRuntime.js.map +1 -1
- package/lib/module/hooks/useSendMessage.js +387 -195
- package/lib/module/hooks/useSendMessage.js.map +1 -1
- package/lib/module/i18n/strings.js +96 -0
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/main.js +6 -0
- package/lib/module/main.js.map +1 -1
- package/lib/module/networking/api-requests/auth.api.js +62 -3
- package/lib/module/networking/api-requests/auth.api.js.map +1 -1
- package/lib/module/networking/api-requests/push.api.js +21 -6
- package/lib/module/networking/api-requests/push.api.js.map +1 -1
- package/lib/module/networking/stanzaHandlers.js +97 -4
- package/lib/module/networking/stanzaHandlers.js.map +1 -1
- package/lib/module/networking/xmpp/handleStanzas.xmpp.js +5 -3
- package/lib/module/networking/xmpp/handleStanzas.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/sendDisplayedMarker.xmpp.js +25 -0
- package/lib/module/networking/xmpp/sendDisplayedMarker.xmpp.js.map +1 -0
- package/lib/module/networking/xmpp/sendMediaMessage.xmpp.js +53 -2
- package/lib/module/networking/xmpp/sendMediaMessage.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/sendReceivedReceipt.xmpp.js +25 -0
- package/lib/module/networking/xmpp/sendReceivedReceipt.xmpp.js.map +1 -0
- package/lib/module/networking/xmppClient.js +64 -0
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/push/pushKeyStore.js +159 -0
- package/lib/module/push/pushKeyStore.js.map +1 -0
- package/lib/module/push/sealedBox.js +97 -0
- package/lib/module/push/sealedBox.js.map +1 -0
- package/lib/module/push/sealedPush.js +117 -0
- package/lib/module/push/sealedPush.js.map +1 -0
- package/lib/module/push/sealedPushTask.js +187 -0
- package/lib/module/push/sealedPushTask.js.map +1 -0
- package/lib/module/roomStore/persistence.js +78 -5
- package/lib/module/roomStore/persistence.js.map +1 -1
- package/lib/module/roomStore/roomHeapSlice.js +4 -0
- package/lib/module/roomStore/roomHeapSlice.js.map +1 -1
- package/lib/module/roomStore/roomsSlice.js +109 -0
- package/lib/module/roomStore/roomsSlice.js.map +1 -1
- package/lib/module/services/pushRegistration.js +12 -7
- package/lib/module/services/pushRegistration.js.map +1 -1
- package/lib/module/types/models/attachment.model.js +2 -0
- package/lib/module/types/models/attachment.model.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/assets/icons.d.ts +6 -1
- package/lib/typescript/assets/icons.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/AlbumGrid.d.ts +21 -0
- package/lib/typescript/components/MainComponents/AlbumGrid.d.ts.map +1 -0
- package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MediaUploadOverlay.d.ts +17 -0
- package/lib/typescript/components/MainComponents/MediaUploadOverlay.d.ts.map +1 -0
- package/lib/typescript/components/MessageBubble/MediaCaption.d.ts +12 -0
- package/lib/typescript/components/MessageBubble/MediaCaption.d.ts.map +1 -0
- 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/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/LastMessageItem.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastAudioMessage.d.ts +2 -0
- package/lib/typescript/components/RoomComponents/styled/LastAudioMessage.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts +2 -0
- package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts +2 -0
- package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts +2 -0
- package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts.map +1 -1
- package/lib/typescript/components/Thread/ThreadWrapper.d.ts.map +1 -1
- package/lib/typescript/components/styled/MediaFilePreview.d.ts.map +1 -1
- package/lib/typescript/components/styled/MessageImage.d.ts +10 -0
- package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
- package/lib/typescript/components/styled/SendInput.d.ts +7 -1
- package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
- package/lib/typescript/components/styled/VideoMessage.d.ts +7 -0
- package/lib/typescript/components/styled/VideoMessage.d.ts.map +1 -1
- package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
- package/lib/typescript/e2ee/fileEnvelope.d.ts +1 -1
- package/lib/typescript/e2ee/fileEnvelope.d.ts.map +1 -1
- package/lib/typescript/e2ee/sealedBody.d.ts +16 -0
- package/lib/typescript/e2ee/sealedBody.d.ts.map +1 -1
- package/lib/typescript/helpers/albumLayout.d.ts +66 -0
- package/lib/typescript/helpers/albumLayout.d.ts.map +1 -0
- package/lib/typescript/helpers/attachments.d.ts +55 -0
- package/lib/typescript/helpers/attachments.d.ts.map +1 -0
- package/lib/typescript/helpers/caption.d.ts +64 -0
- package/lib/typescript/helpers/caption.d.ts.map +1 -0
- package/lib/typescript/helpers/createMainMessageForThread.d.ts.map +1 -1
- package/lib/typescript/helpers/createMessageFromXml.d.ts.map +1 -1
- package/lib/typescript/helpers/fileKind.d.ts +20 -0
- package/lib/typescript/helpers/fileKind.d.ts.map +1 -0
- package/lib/typescript/helpers/getDataFromXml.d.ts.map +1 -1
- package/lib/typescript/helpers/mapWithConcurrency.d.ts +9 -0
- package/lib/typescript/helpers/mapWithConcurrency.d.ts.map +1 -0
- package/lib/typescript/helpers/mediaLimits.d.ts +13 -0
- package/lib/typescript/helpers/mediaLimits.d.ts.map +1 -0
- package/lib/typescript/helpers/mediaSendRetry.d.ts +26 -0
- package/lib/typescript/helpers/mediaSendRetry.d.ts.map +1 -0
- package/lib/typescript/helpers/mediaWireData.d.ts +16 -0
- package/lib/typescript/helpers/mediaWireData.d.ts.map +1 -0
- package/lib/typescript/helpers/mentionSpans.d.ts +8 -0
- package/lib/typescript/helpers/mentionSpans.d.ts.map +1 -0
- package/lib/typescript/helpers/mimeToExtension.d.ts +7 -0
- package/lib/typescript/helpers/mimeToExtension.d.ts.map +1 -1
- package/lib/typescript/helpers/readReceipts.d.ts +82 -0
- package/lib/typescript/helpers/readReceipts.d.ts.map +1 -0
- package/lib/typescript/helpers/repairFilenameEncoding.d.ts +12 -0
- package/lib/typescript/helpers/repairFilenameEncoding.d.ts.map +1 -0
- package/lib/typescript/helpers/safeJson.d.ts +2 -0
- package/lib/typescript/helpers/safeJson.d.ts.map +1 -0
- package/lib/typescript/helpers/secureStoreRuntime.d.ts +17 -3
- package/lib/typescript/helpers/secureStoreRuntime.d.ts.map +1 -1
- package/lib/typescript/hooks/useSendMessage.d.ts +2 -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 +6 -0
- package/lib/typescript/main.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/auth.api.d.ts +2 -0
- package/lib/typescript/networking/api-requests/auth.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/push.api.d.ts +14 -2
- package/lib/typescript/networking/api-requests/push.api.d.ts.map +1 -1
- package/lib/typescript/networking/stanzaHandlers.d.ts +7 -3
- package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/handleStanzas.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/sendDisplayedMarker.xmpp.d.ts +3 -0
- package/lib/typescript/networking/xmpp/sendDisplayedMarker.xmpp.d.ts.map +1 -0
- package/lib/typescript/networking/xmpp/sendMediaMessage.xmpp.d.ts +12 -0
- package/lib/typescript/networking/xmpp/sendMediaMessage.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/sendReceivedReceipt.xmpp.d.ts +3 -0
- package/lib/typescript/networking/xmpp/sendReceivedReceipt.xmpp.d.ts.map +1 -0
- package/lib/typescript/networking/xmppClient.d.ts +15 -0
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/push/pushKeyStore.d.ts +35 -0
- package/lib/typescript/push/pushKeyStore.d.ts.map +1 -0
- package/lib/typescript/push/sealedBox.d.ts +24 -0
- package/lib/typescript/push/sealedBox.d.ts.map +1 -0
- package/lib/typescript/push/sealedPush.d.ts +61 -0
- package/lib/typescript/push/sealedPush.d.ts.map +1 -0
- package/lib/typescript/push/sealedPushTask.d.ts +33 -0
- package/lib/typescript/push/sealedPushTask.d.ts.map +1 -0
- package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
- package/lib/typescript/roomStore/roomHeapSlice.d.ts +22 -1
- package/lib/typescript/roomStore/roomHeapSlice.d.ts.map +1 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts +67 -3
- package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
- package/lib/typescript/services/pushRegistration.d.ts +8 -0
- package/lib/typescript/services/pushRegistration.d.ts.map +1 -1
- package/lib/typescript/types/models/attachment.model.d.ts +52 -0
- package/lib/typescript/types/models/attachment.model.d.ts.map +1 -0
- package/lib/typescript/types/models/message.model.d.ts +26 -0
- package/lib/typescript/types/models/message.model.d.ts.map +1 -1
- package/lib/typescript/types/models/modal.model.d.ts +7 -0
- package/lib/typescript/types/models/modal.model.d.ts.map +1 -1
- package/lib/typescript/types/models/room.model.d.ts +2 -0
- package/lib/typescript/types/models/room.model.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +35 -1
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +14 -1
- package/plugins/notification-service/Info.plist +31 -0
- package/plugins/notification-service/NotificationService.swift +195 -0
- package/plugins/notification-service/SealedBox.swift +355 -0
- package/plugins/notification-service/check/gen-vectors.mjs +24 -0
- package/plugins/notification-service/check/main.swift +37 -0
- package/plugins/notification-service/check/run.sh +12 -0
- package/plugins/notification-service/check/vectors.json +1 -0
- package/plugins/withNotificationServiceExtension.js +189 -0
- package/src/assets/icons.tsx +20 -2
- package/src/components/MainComponents/AlbumGrid.tsx +183 -0
- package/src/components/MainComponents/ChatRoom.tsx +4 -2
- package/src/components/MainComponents/MediaMessage.tsx +246 -130
- package/src/components/MainComponents/MediaUploadOverlay.tsx +102 -0
- package/src/components/MessageBubble/MediaCaption.tsx +45 -0
- package/src/components/MessageBubble/Message.tsx +71 -3
- package/src/components/MessageBubble/MessageInteractions.tsx +2 -1
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +64 -0
- package/src/components/RoomComponents/LastMessageItem.tsx +15 -4
- package/src/components/RoomComponents/styled/LastAudioMessage.tsx +6 -3
- package/src/components/RoomComponents/styled/LastMessageFile.tsx +6 -2
- package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +6 -2
- package/src/components/RoomComponents/styled/LastMessageVideo.tsx +6 -2
- package/src/components/Thread/ThreadWrapper.tsx +5 -9
- package/src/components/styled/MediaFilePreview.tsx +49 -34
- package/src/components/styled/MessageImage.tsx +21 -5
- package/src/components/styled/SendInput.tsx +101 -87
- package/src/components/styled/VideoMessage.tsx +34 -9
- package/src/context/xmppProvider.tsx +32 -0
- package/src/e2ee/fileEnvelope.ts +1 -1
- package/src/e2ee/sealedBody.ts +44 -5
- package/src/helpers/albumLayout.ts +207 -0
- package/src/helpers/attachments.ts +316 -0
- package/src/helpers/caption.ts +283 -0
- package/src/helpers/createMainMessageForThread.ts +6 -1
- package/src/helpers/createMessageFromXml.ts +21 -5
- package/src/helpers/fileKind.ts +38 -0
- package/src/helpers/getDataFromXml.ts +5 -1
- package/src/helpers/mapWithConcurrency.ts +32 -0
- package/src/helpers/mediaLimits.ts +27 -0
- package/src/helpers/mediaSendRetry.ts +59 -0
- package/src/helpers/mediaWireData.ts +57 -0
- package/src/helpers/mentionSpans.ts +17 -0
- package/src/helpers/mimeToExtension.ts +51 -0
- package/src/helpers/readReceipts.ts +219 -0
- package/src/helpers/repairFilenameEncoding.ts +82 -0
- package/src/helpers/safeJson.ts +11 -0
- package/src/helpers/secureStoreRuntime.ts +21 -3
- package/src/hooks/useSendMessage.tsx +448 -249
- package/src/i18n/strings.ts +96 -0
- package/src/main.ts +30 -0
- package/src/networking/api-requests/auth.api.ts +60 -3
- package/src/networking/api-requests/push.api.ts +29 -4
- package/src/networking/stanzaHandlers.ts +91 -2
- package/src/networking/xmpp/handleStanzas.xmpp.ts +6 -2
- package/src/networking/xmpp/sendDisplayedMarker.xmpp.ts +31 -0
- package/src/networking/xmpp/sendMediaMessage.xmpp.ts +60 -3
- package/src/networking/xmpp/sendReceivedReceipt.xmpp.ts +31 -0
- package/src/networking/xmppClient.ts +48 -0
- package/src/push/pushKeyStore.ts +163 -0
- package/src/push/sealedBox.ts +104 -0
- package/src/push/sealedPush.ts +127 -0
- package/src/push/sealedPushTask.ts +175 -0
- package/src/roomStore/persistence.ts +94 -3
- package/src/roomStore/roomHeapSlice.ts +23 -1
- package/src/roomStore/roomsSlice.ts +112 -1
- package/src/services/pushRegistration.ts +25 -5
- package/src/types/models/attachment.model.ts +51 -0
- package/src/types/models/message.model.ts +29 -0
- package/src/types/models/modal.model.ts +7 -0
- package/src/types/models/room.model.ts +2 -0
- package/src/types/types.ts +41 -1
- package/src/version.ts +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { IMentionSpan } from '../types/types';
|
|
2
|
+
/**
|
|
3
|
+
* The text typed with a set of attachments, sent as part of the media
|
|
4
|
+
* message itself (never as a separate text stanza).
|
|
5
|
+
*
|
|
6
|
+
* `mentions` index into `text`, the same way a text message's mention spans
|
|
7
|
+
* index into its body.
|
|
8
|
+
*/
|
|
9
|
+
export interface CaptionInput {
|
|
10
|
+
text: string;
|
|
11
|
+
mentions?: IMentionSpan[];
|
|
12
|
+
}
|
|
13
|
+
export interface NormalizedCaption {
|
|
14
|
+
caption: string;
|
|
15
|
+
mentions?: IMentionSpan[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Mention spans for a caption, checked against the caption text: a span that
|
|
19
|
+
* no longer reads "@Name" at its offset is dropped. Undefined when nothing is
|
|
20
|
+
* left, so a caption without mentions carries no empty attribute.
|
|
21
|
+
*/
|
|
22
|
+
export declare const normalizeCaptionMentions: (value: unknown, caption: string) => IMentionSpan[] | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Turns what the composer typed into the caption that travels with the
|
|
25
|
+
* media. Undefined for blank text, which means "no caption".
|
|
26
|
+
*/
|
|
27
|
+
export declare const normalizeCaptionInput: (input?: CaptionInput | null) => NormalizedCaption | undefined;
|
|
28
|
+
/** What a media message's text is, and the @-mention spans that index into it. */
|
|
29
|
+
export interface ResolvedCaption {
|
|
30
|
+
text: string;
|
|
31
|
+
mentions?: IMentionSpan[];
|
|
32
|
+
}
|
|
33
|
+
export interface CaptionOptions {
|
|
34
|
+
/**
|
|
35
|
+
* The caller already knows this is a media message (a thin `lastMessage`
|
|
36
|
+
* that only says so by its id). Otherwise it is read off the message.
|
|
37
|
+
*/
|
|
38
|
+
isMedia?: boolean;
|
|
39
|
+
/** The message is sealed: only a caption that came out of the envelope counts. */
|
|
40
|
+
sealed?: boolean;
|
|
41
|
+
/** Extra names of the sender, which a body may merely echo. */
|
|
42
|
+
senderNames?: string[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The text of a media message, from whichever format carried it. The one
|
|
46
|
+
* place that knows the formats, so every surface (bubble, room list preview,
|
|
47
|
+
* notification, reply quote, copy) agrees:
|
|
48
|
+
*
|
|
49
|
+
* 1. `caption` (+ `captionMentions`): what this SDK sends. The only source
|
|
50
|
+
* for a sealed message, whose caption comes out of the envelope.
|
|
51
|
+
* 2. The caption under another name on `<data>` (`captionText`, `text`,
|
|
52
|
+
* `message`, `description`, `title`) from other clients.
|
|
53
|
+
* 3. A real `body`: older clients and other SDKs put the text in the
|
|
54
|
+
* `<body>` of the media message itself. "media", the file's name or URL,
|
|
55
|
+
* the sender's own name or e-mail and generated labels are not text.
|
|
56
|
+
*
|
|
57
|
+
* Never derived for a sealed message, and never for a message with no file.
|
|
58
|
+
*/
|
|
59
|
+
export declare const resolveMessageCaption: (message?: object | null, options?: CaptionOptions) => ResolvedCaption | undefined;
|
|
60
|
+
/** The caption a message carries, or undefined when it has none. */
|
|
61
|
+
export declare const getMessageCaption: (message?: object | null, options?: CaptionOptions) => string | undefined;
|
|
62
|
+
/** The mention spans of `getMessageCaption`'s text. */
|
|
63
|
+
export declare const getMessageCaptionMentions: (message?: object | null, options?: CaptionOptions) => IMentionSpan[] | undefined;
|
|
64
|
+
//# sourceMappingURL=caption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caption.d.ts","sourceRoot":"","sources":["../../../src/helpers/caption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK9C;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AAeD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,OAAO,OAAO,EACd,SAAS,MAAM,KACd,YAAY,EAAE,GAAG,SAMnB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,YAAY,GAAG,IAAI,KAC1B,iBAAiB,GAAG,SAKtB,CAAC;AAEF,kFAAkF;AAClF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kFAAkF;IAClF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AA2ID;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,GAChC,UAAU,MAAM,GAAG,IAAI,EACvB,UAAS,cAAmB,KAC3B,eAAe,GAAG,SAiCpB,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,GAC5B,UAAU,MAAM,GAAG,IAAI,EACvB,UAAU,cAAc,KACvB,MAAM,GAAG,SAA0D,CAAC;AAEvE,uDAAuD;AACvD,eAAO,MAAM,yBAAyB,GACpC,UAAU,MAAM,GAAG,IAAI,EACvB,UAAU,cAAc,KACvB,YAAY,EAAE,GAAG,SAA8D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMainMessageForThread.d.ts","sourceRoot":"","sources":["../../../src/helpers/createMainMessageForThread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"createMainMessageForThread.d.ts","sourceRoot":"","sources":["../../../src/helpers/createMainMessageForThread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,eAAO,MAAM,0BAA0B,GAAI,SAAS,QAAQ,KAAG,MAwB9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMessageFromXml.d.ts","sourceRoot":"","sources":["../../../src/helpers/createMessageFromXml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"createMessageFromXml.d.ts","sourceRoot":"","sources":["../../../src/helpers/createMessageFromXml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM1C,UAAU,mBAAoB,SAAQ,QAAQ;IAC5C,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,KAAK,mBAAmB,EACxB,SAAS,GAAG,EACZ,eAAe,MAAM,EACrB,iBAAiB,MAAM,EACvB,oBAAoB,OAAO,KAC1B,OAAO,CAAC,QAAQ,CAkJlB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type FileKind = 'image' | 'video' | 'audio' | 'file';
|
|
2
|
+
interface FileKindInput {
|
|
3
|
+
mimetype?: string | null;
|
|
4
|
+
name?: string | null;
|
|
5
|
+
url?: string | null;
|
|
6
|
+
duration?: number | string | null;
|
|
7
|
+
waveForm?: string | null;
|
|
8
|
+
originalName?: string | null;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Which card a file gets in a bubble. Mirrors the branches MediaMessage has
|
|
12
|
+
* always used for a single file (image, video, audio, octet-stream as a voice
|
|
13
|
+
* note, then the voice-message heuristics) so an album, a card stack and a
|
|
14
|
+
* lone file all agree on what a given file is.
|
|
15
|
+
*/
|
|
16
|
+
export declare const getFileKind: (input: FileKindInput) => FileKind;
|
|
17
|
+
/** True for the kinds that sit in the picture/video album. */
|
|
18
|
+
export declare const isAlbumKind: (kind: FileKind) => boolean;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=fileKind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileKind.d.ts","sourceRoot":"","sources":["../../../src/helpers/fileKind.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAE5D,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,aAAa,KAAG,QAclD,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,WAAW,GAAI,MAAM,QAAQ,KAAG,OACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDataFromXml.d.ts","sourceRoot":"","sources":["../../../src/helpers/getDataFromXml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"getDataFromXml.d.ts","sourceRoot":"","sources":["../../../src/helpers/getDataFromXml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAqDtD,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC5B;AACD,eAAO,MAAM,cAAc,GAAU,QAAQ,OAAO,KAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CA4EjF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runs `worker` over `items` with at most `limit` calls in flight, and
|
|
3
|
+
* resolves with the results in INPUT order, whatever order the calls finish
|
|
4
|
+
* in. Workers that throw are reported as rejected entries instead of
|
|
5
|
+
* aborting the rest of the batch, so one failed upload never stops its
|
|
6
|
+
* siblings.
|
|
7
|
+
*/
|
|
8
|
+
export declare function mapWithConcurrency<T, R>(items: readonly T[], limit: number, worker: (item: T, index: number) => Promise<R>): Promise<PromiseSettledResult<R>[]>;
|
|
9
|
+
//# sourceMappingURL=mapWithConcurrency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapWithConcurrency.d.ts","sourceRoot":"","sources":["../../../src/helpers/mapWithConcurrency.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAC3C,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAC7C,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,CAoBpC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IConfig } from '../types/types';
|
|
2
|
+
/** Hard client-side cap on a single upload. Mirrors the backend's body limit. */
|
|
3
|
+
export declare const MAX_MEDIA_BYTES: number;
|
|
4
|
+
/** The most files one message may carry (also the parser-side ceiling). */
|
|
5
|
+
export declare const MAX_MEDIA_FILES = 10;
|
|
6
|
+
/** Files per message the host allows: `attachments.maxFiles`, clamped to 1-10. */
|
|
7
|
+
export declare const mediaFileCap: (config?: Pick<IConfig, "attachments"> | null) => number;
|
|
8
|
+
/**
|
|
9
|
+
* Bytes allowed per file: the 50 MB upload cap, lowered by
|
|
10
|
+
* `attachments.maxSizeMB` when the host sets a smaller one.
|
|
11
|
+
*/
|
|
12
|
+
export declare const mediaSizeLimit: (config?: Pick<IConfig, "attachments"> | null, override?: number) => number;
|
|
13
|
+
//# sourceMappingURL=mediaLimits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaLimits.d.ts","sourceRoot":"","sources":["../../../src/helpers/mediaLimits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,iFAAiF;AACjF,eAAO,MAAM,eAAe,QAAmB,CAAC;AAEhD,2EAA2E;AAC3E,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,kFAAkF;AAClF,eAAO,MAAM,YAAY,GAAI,SAAS,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,GAAG,IAAI,KAAG,MAI3E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,SAAS,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,GAAG,IAAI,EAC5C,WAAW,MAAM,KAChB,MAIF,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retry hooks for media messages whose uploads did not all land.
|
|
3
|
+
*
|
|
4
|
+
* The send closure lives inside useSendMessage, but the bubble that shows
|
|
5
|
+
* "Retry" on a tile is somewhere else in the tree and has no access to it.
|
|
6
|
+
* The send registers its retry runner under the message id while the
|
|
7
|
+
* message is unsent, and the bubble looks it up here. The runner is removed
|
|
8
|
+
* as soon as the message is delivered.
|
|
9
|
+
*/
|
|
10
|
+
export type MediaRetryRunner = (indices?: number[]) => Promise<boolean>;
|
|
11
|
+
export declare const registerMediaRetry: (messageId: string, runner: MediaRetryRunner) => void;
|
|
12
|
+
export declare const unregisterMediaRetry: (messageId: string) => void;
|
|
13
|
+
export declare const hasMediaRetry: (messageId: string) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Re-runs the uploads still missing for `messageId` (only `index` / `indices`
|
|
16
|
+
* when given), then sends the message once every file is in. Resolves to
|
|
17
|
+
* false when nothing is registered or the attempt did not deliver.
|
|
18
|
+
*/
|
|
19
|
+
export declare const retryMediaSend: (messageId: string, index?: number | number[]) => Promise<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Asks for one file of `messageId` to be retried. Requests made in the same
|
|
22
|
+
* tick are merged into one run: the runner takes a single run at a time, so
|
|
23
|
+
* a separate call per tile would drop every retry after the first.
|
|
24
|
+
*/
|
|
25
|
+
export declare const requestMediaRetry: (messageId: string, index: number) => void;
|
|
26
|
+
//# sourceMappingURL=mediaSendRetry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaSendRetry.d.ts","sourceRoot":"","sources":["../../../src/helpers/mediaSendRetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAIxE,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,EAAE,QAAQ,gBAAgB,KAAG,IAEhF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,WAAW,MAAM,KAAG,IAExD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,KAAG,OAAiC,CAAC;AAEpF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,WAAW,MAAM,EACjB,QAAQ,MAAM,GAAG,MAAM,EAAE,KACxB,OAAO,CAAC,OAAO,CAKjB,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM,EAAE,OAAO,MAAM,KAAG,IAYpE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalises the media parts of a message's flat `<data>` attributes:
|
|
3
|
+
*
|
|
4
|
+
* - `attachments` (a JSON string on the wire) becomes the typed array, or is
|
|
5
|
+
* dropped when it decodes to nothing so the flat legacy fields win;
|
|
6
|
+
* - `caption` is kept only when it holds text, with `captionMentions` (JSON
|
|
7
|
+
* on the wire) checked against it;
|
|
8
|
+
* - in a sealed message (`clientEncrypted`) the caption attributes are
|
|
9
|
+
* always dropped: the only caption such a message may show is the one
|
|
10
|
+
* inside its encrypted body, which the caller lifts afterwards.
|
|
11
|
+
*
|
|
12
|
+
* Safe to apply twice, so the wrapped and the positional parsers can both
|
|
13
|
+
* call it.
|
|
14
|
+
*/
|
|
15
|
+
export declare const normalizeMediaDataAttrs: (attrs: Record<string, any>) => Record<string, any>;
|
|
16
|
+
//# sourceMappingURL=mediaWireData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaWireData.d.ts","sourceRoot":"","sources":["../../../src/helpers/mediaWireData.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACzB,MAAM,CAAC,MAAM,EAAE,GAAG,CAqCpB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IMentionSpan } from '../types/models/message.model';
|
|
2
|
+
/**
|
|
3
|
+
* Keeps only the spans that still read "@Name" at their offset in `text`.
|
|
4
|
+
* RN does not render mentions; a caption's spans are stored (and checked) so
|
|
5
|
+
* they survive a round trip to a client that does.
|
|
6
|
+
*/
|
|
7
|
+
export declare const validateMentionSpans: (text: string, spans: IMentionSpan[]) => IMentionSpan[];
|
|
8
|
+
//# sourceMappingURL=mentionSpans.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentionSpans.d.ts","sourceRoot":"","sources":["../../../src/helpers/mentionSpans.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,MAAM,MAAM,EACZ,OAAO,YAAY,EAAE,KACpB,YAAY,EAMX,CAAC"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/** A mimetype that says nothing: empty, or the storage's "could not sniff". */
|
|
2
|
+
export declare function isGenericMime(mime: string | undefined | null): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* The mimetype a file name's extension stands for, for the pictures, videos,
|
|
5
|
+
* audio and PDFs a bubble can show. Undefined for anything else.
|
|
6
|
+
*/
|
|
7
|
+
export declare function inferMimeFromName(name: string | undefined | null): string | undefined;
|
|
1
8
|
/**
|
|
2
9
|
* Returns true when the (mime, fileName, url) triple looks like an
|
|
3
10
|
* audio payload — either by mime, by recognised extension on the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mimeToExtension.d.ts","sourceRoot":"","sources":["../../../src/helpers/mimeToExtension.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mimeToExtension.d.ts","sourceRoot":"","sources":["../../../src/helpers/mimeToExtension.ts"],"names":[],"mappings":"AA8FA,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAOtE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAC9B,MAAM,GAAG,SAAS,CAKpB;AAkCD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,EACxB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,EACnB,IAAI,CAAC,EAAE;IACL,QAAQ,CAAC,EAAE,MAAM,G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AAC;CACrB,GAAG,OAAO,CAgBV;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EACnC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAC9B,MAAM,CAKR"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { IMessage, IRoom } from '../types/types';
|
|
2
|
+
export type ReceiptStatus = 'sent' | 'delivered' | 'seen';
|
|
3
|
+
/** Names listed in a "Read by" / "Delivered to" sheet before the rest become "+N". */
|
|
4
|
+
export declare const RECEIPT_NAME_LIMIT = 5;
|
|
5
|
+
/** Stanza ids of the receipt and marker frames (never chat messages). */
|
|
6
|
+
export declare const isReceiptMarkerId: (id: unknown) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The message id that becomes this reader's read watermark, or null when
|
|
9
|
+
* nothing should be sent: no displayable message, the newest message is the
|
|
10
|
+
* reader's own (nothing to report), or a read boundary (the reader scrolled
|
|
11
|
+
* up) sits before every message. With a boundary the watermark is the newest
|
|
12
|
+
* message at or before it, so a scrolled-up reader never claims messages they
|
|
13
|
+
* did not reach.
|
|
14
|
+
*/
|
|
15
|
+
export declare const getReadWatermarkMessageId: (room: Pick<IRoom, "messages"> | null | undefined, selfXmppUsername: string, boundaryTs?: number | null) => string | null;
|
|
16
|
+
/** The slice of the redux state the receipt rules read. */
|
|
17
|
+
export interface ReceiptStoreState {
|
|
18
|
+
chatSettingStore?: {
|
|
19
|
+
config?: {
|
|
20
|
+
disableLastRead?: boolean;
|
|
21
|
+
disableReadReceipts?: boolean;
|
|
22
|
+
} | null;
|
|
23
|
+
user?: {
|
|
24
|
+
xmppUsername?: string | null;
|
|
25
|
+
walletAddress?: string | null;
|
|
26
|
+
} | null;
|
|
27
|
+
} | null;
|
|
28
|
+
rooms: {
|
|
29
|
+
rooms: Record<string, IRoom>;
|
|
30
|
+
visibleRoomJID: string | null;
|
|
31
|
+
jumpWindow: {
|
|
32
|
+
roomJID: string;
|
|
33
|
+
} | null;
|
|
34
|
+
readBoundaries: Record<string, number>;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export declare const selfIdentity: (state: ReceiptStoreState) => string;
|
|
38
|
+
/**
|
|
39
|
+
* Watermark to send for `roomJid` right now, or null. Sends only while the
|
|
40
|
+
* room is the one on screen, never while an old-history jump window is open,
|
|
41
|
+
* and never when read markers are switched off (`disableLastRead` or
|
|
42
|
+
* `disableReadReceipts`).
|
|
43
|
+
*/
|
|
44
|
+
export declare const computeReadWatermark: (state: ReceiptStoreState, roomJid: string) => string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Other occupants whose read watermark sits at or after `messageId` in the
|
|
47
|
+
* room's list. Returns the shared empty array when there are none, so the
|
|
48
|
+
* selector result stays shallow-equal between store updates.
|
|
49
|
+
*/
|
|
50
|
+
export declare const viewersAtOrAfter: (room: Pick<IRoom, "messages" | "lastDisplayedByUser"> | null | undefined, messageId: string, selfXmppUsername: string) => string[];
|
|
51
|
+
/** Selector form of viewersAtOrAfter, keyed by room and message. */
|
|
52
|
+
export declare const selectSeenBy: (state: {
|
|
53
|
+
rooms: {
|
|
54
|
+
rooms: Record<string, IRoom>;
|
|
55
|
+
};
|
|
56
|
+
}, roomJid: string, messageId: string, selfXmppUsername: string) => string[];
|
|
57
|
+
/**
|
|
58
|
+
* sent / delivered / seen for one of the reader's own messages. "seen" wins
|
|
59
|
+
* over "delivered", which wins over "sent". Only other occupants count.
|
|
60
|
+
*/
|
|
61
|
+
export declare const deliveredToOthers: (message: Pick<IMessage, "receivedBy">, selfXmppUsername: string) => string[];
|
|
62
|
+
export declare const statusOf: (seenBy: string[], deliveredTo: string[]) => ReceiptStatus;
|
|
63
|
+
export declare const getReceiptStatus: (message: Pick<IMessage, "id" | "receivedBy">, room: Pick<IRoom, "messages" | "lastDisplayedByUser"> | null | undefined, selfXmppUsername: string) => {
|
|
64
|
+
status: ReceiptStatus;
|
|
65
|
+
seenBy: string[];
|
|
66
|
+
deliveredTo: string[];
|
|
67
|
+
};
|
|
68
|
+
/** Display name for a receipt entry: usersSet first, the raw username as the last resort. */
|
|
69
|
+
export declare const receiptNameFor: (usersSet: Record<string, any> | undefined, xmppUsername: string) => string;
|
|
70
|
+
/**
|
|
71
|
+
* Text for the tick's details sheet. Groups name the readers or recipients
|
|
72
|
+
* (capped, then "+N"); a 1:1 room only says Read / Delivered.
|
|
73
|
+
*/
|
|
74
|
+
export declare const describeReceipt: ({ status, isGroup, seenBy, deliveredTo, nameOf, t, }: {
|
|
75
|
+
status: ReceiptStatus;
|
|
76
|
+
isGroup: boolean;
|
|
77
|
+
seenBy: string[];
|
|
78
|
+
deliveredTo: string[];
|
|
79
|
+
nameOf: (xmppUsername: string) => string;
|
|
80
|
+
t: (key: string, vars?: Record<string, string | number>) => string;
|
|
81
|
+
}) => string;
|
|
82
|
+
//# sourceMappingURL=readReceipts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readReceipts.d.ts","sourceRoot":"","sources":["../../../src/helpers/readReceipts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAatD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;AAE1D,sFAAsF;AACtF,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAIpC,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,GAAI,IAAI,OAAO,KAAG,OAG/C,CAAC;AAYF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,GACpC,MAAM,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,IAAI,GAAG,SAAS,EAChD,kBAAkB,MAAM,EACxB,aAAa,MAAM,GAAG,IAAI,KACzB,MAAM,GAAG,IAaX,CAAC;AAEF,2DAA2D;AAC3D,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAE;QAC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AAY,CAAC,EACrC,kBAAkB,MAAM,KACvB,MAAM,EAGN,CAAC;AAEJ,eAAO,MAAM,QAAQ,GAAI,QAAQ,MAAM,EAAE,EAAE,aAAa,MAAM,EAAE,KAAG,aACS,CAAC;AAE7E,eAAO,MAAM,gBAAgB,GAC3B,SAAS,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,YAAY,CAAC,EAC5C,MAAM,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,qBAAqB,CAAC,GAAG,IAAI,GAAG,SAAS,EACxE,kBAAkB,MAAM,KACvB;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAIlE,CAAC;AAEF,6FAA6F;AAC7F,eAAO,MAAM,cAAc,GACzB,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,EACzC,cAAc,MAAM,KACnB,MAGF,CAAC;AAQF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,sDAO7B;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;CACpE,KAAG,MAcH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repairs file names the backend returns as UTF-8 bytes read as Latin-1
|
|
3
|
+
* (the classic multer/busboy `originalname` problem): "Список.pdf" arrives
|
|
4
|
+
* as "СпиÑок.pdf".
|
|
5
|
+
*
|
|
6
|
+
* Pure and conservative: a name is only replaced when every character fits
|
|
7
|
+
* in one byte, the bytes decode as strict UTF-8, the result differs, holds
|
|
8
|
+
* no replacement or control characters and contains at least one letter
|
|
9
|
+
* outside basic Latin. A correct name is returned untouched.
|
|
10
|
+
*/
|
|
11
|
+
export declare const repairFilenameEncoding: (name: string) => string;
|
|
12
|
+
//# sourceMappingURL=repairFilenameEncoding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repairFilenameEncoding.d.ts","sourceRoot":"","sources":["../../../src/helpers/repairFilenameEncoding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAuDH,eAAO,MAAM,sBAAsB,GAAI,MAAM,MAAM,KAAG,MAiBrD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safeJson.d.ts","sourceRoot":"","sources":["../../../src/helpers/safeJson.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,UAAU,OAAO,EAAE,UAAU,CAAC,KAAG,CAUjE,CAAC"}
|
|
@@ -11,10 +11,24 @@
|
|
|
11
11
|
* null when it isn't installed — callers fall back to plain
|
|
12
12
|
* AsyncStorage rather than crash (see `secureKeyValue.ts`).
|
|
13
13
|
*/
|
|
14
|
+
/**
|
|
15
|
+
* The subset of expo-secure-store's options the SDK uses. `keychainService`
|
|
16
|
+
* must be repeated on every read of an item written with it; the
|
|
17
|
+
* accessibility constants come from `SecureStoreRuntime.accessible`.
|
|
18
|
+
*/
|
|
19
|
+
export interface SecureStoreOptions {
|
|
20
|
+
keychainService?: string;
|
|
21
|
+
/** iOS only: one of `accessible`; ignored on Android. */
|
|
22
|
+
keychainAccessible?: unknown;
|
|
23
|
+
}
|
|
14
24
|
export interface SecureStoreRuntime {
|
|
15
|
-
getItemAsync: (key: string) => Promise<string | null>;
|
|
16
|
-
setItemAsync: (key: string, value: string) => Promise<void>;
|
|
17
|
-
deleteItemAsync: (key: string) => Promise<void>;
|
|
25
|
+
getItemAsync: (key: string, options?: SecureStoreOptions) => Promise<string | null>;
|
|
26
|
+
setItemAsync: (key: string, value: string, options?: SecureStoreOptions) => Promise<void>;
|
|
27
|
+
deleteItemAsync: (key: string, options?: SecureStoreOptions) => Promise<void>;
|
|
28
|
+
/** expo-secure-store's iOS keychain accessibility constants (undefined on older versions). */
|
|
29
|
+
accessible: {
|
|
30
|
+
afterFirstUnlockThisDeviceOnly?: unknown;
|
|
31
|
+
};
|
|
18
32
|
}
|
|
19
33
|
/**
|
|
20
34
|
* Resolve the SecureStore runtime, or null when the optional native
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secureStoreRuntime.d.ts","sourceRoot":"","sources":["../../../src/helpers/secureStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"secureStoreRuntime.d.ts","sourceRoot":"","sources":["../../../src/helpers/secureStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACpF,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1F,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,8FAA8F;IAC9F,UAAU,EAAE;QACV,8BAA8B,CAAC,EAAE,OAAO,CAAC;KAC1C,CAAC;CACH;AAID;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAO,kBAAkB,GAAG,IA6BvD,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAAO,OAAqC,CAAC;AAEhF,sBAAsB;AACtB,eAAO,MAAM,iCAAiC,QAAO,IAEpD,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IConfig } from '../types/types';
|
|
2
|
+
import { type CaptionInput } from '../helpers/caption';
|
|
2
3
|
export declare const useSendMessage: (_configOverride?: IConfig) => {
|
|
3
4
|
sendMessage: (message: string, activeRoomJID: string, isReply?: boolean, isChecked?: boolean, mainMessage?: string, existingId?: string) => Promise<void>;
|
|
4
|
-
sendMedia: (data: any, type: string, activeRoomJID: string, isReply?: boolean, isChecked?: boolean, mainMessage?: string, existingId?: string) => Promise<
|
|
5
|
+
sendMedia: (data: any, type: string, activeRoomJID: string, isReply?: boolean, isChecked?: boolean, mainMessage?: string, existingId?: string, caption?: CaptionInput) => Promise<boolean>;
|
|
5
6
|
sendEditMessage: (message: string, _activeRoomJID?: string) => Promise<void>;
|
|
6
7
|
retryMessage: (failedId: string) => Promise<void>;
|
|
7
8
|
isLastMessageFromUserAndProcessing: (roomJID: string) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSendMessage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSendMessage.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAe,OAAO,EAAY,MAAM,gBAAgB,CAAC;AAMrE,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAgF9E,eAAO,MAAM,cAAc,GAAI,kBAAkB,OAAO;2BAmCzC,MAAM,iBACA,MAAM,YACX,OAAO,cACL,OAAO,gBACL,MAAM,eAOP,MAAM;sBAgRb,GAAG,QACH,MAAM,iBACG,MAAM,YACZ,OAAO,cACL,OAAO,gBACL,MAAM,eACN,MAAM,YACT,YAAY,KACrB,OAAO,CAAC,OAAO,CAAC;+BAyjBH,MAAM,mBAAmB,MAAM;6BApE9B,MAAM;kDA+Gb,MAAM,KAAG,OAAO;CAoB7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../src/i18n/strings.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../src/i18n/strings.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAk4EnD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAOzD,CAAC;AAEF,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC,gFAAgF;AAChF,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,GAAG,IAAI,KAAG,MAIf,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,MAAM,GAAG,IAAI,EACtB,YAAY,aAAa,GAAG,IAAI,KAC/B,aAQF,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,WAAW,GACtB,UAAU,MAAM,EAChB,OAAO,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAKF,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,YAAY,GACvB,KAAK,MAAM,EACX,SAAS,MAAM,GAAG,IAAI,EACtB,YAAY,aAAa,GAAG,IAAI,EAChC,OAAO,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAGF,CAAC"}
|
package/lib/typescript/main.d.ts
CHANGED
|
@@ -33,6 +33,12 @@ export type { RegisterPushTokenOptions, RegisterPushTokenOutcome, UnregisterPush
|
|
|
33
33
|
export { detectPushTokenType, PushRegistrationError, isPushRegistrationError, } from './networking/api-requests/push.api';
|
|
34
34
|
export type { PushDeviceType, PushSubscriptionPayload, } from './networking/api-requests/push.api';
|
|
35
35
|
export type { PushTokenType, PushTokenRegistration } from './types/types';
|
|
36
|
+
export { ensurePushKeyPair, getPushKeyPair, resetPushKeyPair, clearPushKeyPair, PUSH_KEY_KEYCHAIN_SERVICE, PUSH_SECRET_KEY_ITEM, } from './push/pushKeyStore';
|
|
37
|
+
export type { PushKeyPair } from './push/pushKeyStore';
|
|
38
|
+
export { registerSealedPushTask, presentSealedPush, SEALED_PUSH_TASK, } from './push/sealedPushTask';
|
|
39
|
+
export type { SealedPushTaskOptions } from './push/sealedPushTask';
|
|
40
|
+
export { openSealedPush, isSealedPush, sealedPushEnvelopeOf, SEALED_PUSH_ALG, } from './push/sealedPush';
|
|
41
|
+
export type { SealedPushEnvelope, SealedPushContent, SealedPushFailure, OpenSealedPushResult, } from './push/sealedPush';
|
|
36
42
|
export { useChatRoomFocus } from './hooks/useChatRoomFocus';
|
|
37
43
|
export { logoutService, useLogout } from './hooks/useLogout';
|
|
38
44
|
export { useQRCodeChat, handleQRChatId } from './hooks/useQRCodeChatHandler';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,gCAAgC,CAAC;AAGxC,OAAO,EAAE,YAAY,IAAI,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,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Z,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,uBAAuB,EACvB,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAQjE,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,cAAc,GACf,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC9E,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -12,6 +12,8 @@ export declare function loginViaJwt(clientToken: string): Promise<User>;
|
|
|
12
12
|
export declare function uploadFile(formData: FormData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
13
13
|
export interface UploadFileOptions {
|
|
14
14
|
clientEncrypted?: boolean;
|
|
15
|
+
/** Called with 0 to 100 as the request body goes up (XHR upload progress). */
|
|
16
|
+
onProgress?: (percent: number) => void;
|
|
15
17
|
}
|
|
16
18
|
export declare function uploadFileV2(formData: FormData, activeRoomJID: string, options?: UploadFileOptions): Promise<{
|
|
17
19
|
data: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.api.d.ts","sourceRoot":"","sources":["../../../../src/networking/api-requests/auth.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAezC,wBAAsB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;UAEtD,IAAI;kBACI,MAAM;WACb,MAAM;gBACD,MAAM;aAuBrB;AAED,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,MAAoB,wDAYhC;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,wDAapB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,wDAM5C;AAED,wBAAsB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BpE;AAuBD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,wDAa5C;
|
|
1
|
+
{"version":3,"file":"auth.api.d.ts","sourceRoot":"","sources":["../../../../src/networking/api-requests/auth.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAezC,wBAAsB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;UAEtD,IAAI;kBACI,MAAM;WACb,MAAM;gBACD,MAAM;aAuBrB;AAED,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,MAAoB,wDAYhC;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,wDAapB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,wDAM5C;AAED,wBAAsB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BpE;AAuBD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,wDAa5C;AAmKD,MAAM,WAAW,iBAAiB;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,8EAA8E;IAC9E,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,wBAAsB,YAAY,CAChC,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC,CAmCxB;AAED,eAAO,MAAM,gCAAgC,QAAO,IAEnD,CAAC"}
|
|
@@ -14,19 +14,31 @@ export declare class PushRegistrationError extends Error {
|
|
|
14
14
|
export declare const isPushRegistrationError: (error: unknown) => error is PushRegistrationError;
|
|
15
15
|
export declare const detectPushTokenType: (token: string) => PushTokenType;
|
|
16
16
|
export declare const resolvePushDeviceType: () => PushDeviceType;
|
|
17
|
+
/** The only sealing scheme the push service knows (README, "Encrypted pushes"). */
|
|
18
|
+
export declare const PUSH_KEY_ALG = "sealed-box-x25519";
|
|
17
19
|
export interface PushSubscriptionPayload {
|
|
18
20
|
registrationToken: string;
|
|
19
21
|
deviceType: PushDeviceType;
|
|
20
22
|
tokenType?: PushTokenType;
|
|
23
|
+
/**
|
|
24
|
+
* Encrypted pushes: base64 of the device's 32-byte X25519 public key.
|
|
25
|
+
* Absent keeps whatever key the service holds for this token.
|
|
26
|
+
*/
|
|
27
|
+
pushKey?: string;
|
|
28
|
+
pushKeyAlg?: typeof PUSH_KEY_ALG;
|
|
29
|
+
pushKeyId?: string;
|
|
21
30
|
}
|
|
22
31
|
export interface RegisterPushSubscriptionArgs {
|
|
23
32
|
appId: string;
|
|
24
33
|
token: string;
|
|
25
34
|
tokenType: PushTokenType;
|
|
26
35
|
authToken: string;
|
|
36
|
+
/** Base64 public key for encrypted pushes (`ensurePushKeyPair().publicKey`). */
|
|
37
|
+
pushKey?: string;
|
|
38
|
+
pushKeyId?: string;
|
|
27
39
|
}
|
|
28
|
-
export declare const buildPushSubscriptionPayload: (token: string, tokenType: PushTokenType) => PushSubscriptionPayload;
|
|
29
|
-
export declare function registerPushSubscription({ appId, token, tokenType, authToken, }: RegisterPushSubscriptionArgs): Promise<void>;
|
|
40
|
+
export declare const buildPushSubscriptionPayload: (token: string, tokenType: PushTokenType, pushKey?: string, pushKeyId?: string) => PushSubscriptionPayload;
|
|
41
|
+
export declare function registerPushSubscription({ appId, token, tokenType, authToken, pushKey, pushKeyId, }: RegisterPushSubscriptionArgs): Promise<void>;
|
|
30
42
|
export interface UnregisterPushSubscriptionArgs {
|
|
31
43
|
appId: string;
|
|
32
44
|
token: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.api.d.ts","sourceRoot":"","sources":["../../../../src/networking/api-requests/push.api.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,SAAS,GAAG,KAAK,CAAC;AAEvD;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;gBAEZ,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO;CAM7D;AAED,eAAO,MAAM,uBAAuB,GAClC,OAAO,OAAO,KACb,KAAK,IAAI,qBACwD,CAAC;AAKrE,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,KAAG,a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CAAC,IAAI,CAAC,CASf"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Element } from 'ltx';
|
|
2
|
+
import type XmppClient from './xmppClient';
|
|
2
3
|
import { IMessage } from '../types/types';
|
|
3
|
-
declare const
|
|
4
|
+
declare const isReceiptMarkerStanza: (stanza: any) => boolean;
|
|
5
|
+
declare const onRealtimeMessage: (stanza: Element, xmppWs?: XmppClient) => Promise<IMessage | undefined>;
|
|
4
6
|
declare const onDeleteMessage: (stanza: Element) => Promise<void>;
|
|
7
|
+
declare const onReceivedReceipt: (stanza: Element) => void;
|
|
8
|
+
declare const onDisplayedMarker: (stanza: Element) => void;
|
|
5
9
|
declare const onEditMessage: (stanza: Element) => Promise<void>;
|
|
6
|
-
declare const onMessageHistory: (stanza: any) => Promise<void>;
|
|
10
|
+
declare const onMessageHistory: (stanza: any, xmppWs?: XmppClient) => Promise<void>;
|
|
7
11
|
declare const handleComposing: (stanza: Element, currentUser: string) => Promise<void>;
|
|
8
12
|
declare const onPresenceInRoom: (stanza: Element | any) => void;
|
|
9
13
|
declare const onChatInvite: (stanza: Element, client: any) => Promise<void>;
|
|
@@ -17,5 +21,5 @@ declare const onMessageError: (_stanza: Element, _xmpp?: any) => void;
|
|
|
17
21
|
declare const onReactionMessage: (stanza: Element) => void;
|
|
18
22
|
declare const onReactionHistory: (_stanza: Element) => void;
|
|
19
23
|
declare const onRoomKicked: (stanza: Element | any) => void;
|
|
20
|
-
export { onRealtimeMessage, onMessageHistory, onPresenceInRoom, onGetLastMessageArchive, handleComposing, onGetChatRooms, onNewRoomCreated, onGetMembers, onGetRoomInfo, onDeleteMessage, onEditMessage, onChatInvite, onMessageError, onReactionMessage, onReactionHistory, onRoomKicked, };
|
|
24
|
+
export { onRealtimeMessage, onMessageHistory, onReceivedReceipt, onDisplayedMarker, isReceiptMarkerStanza, onPresenceInRoom, onGetLastMessageArchive, handleComposing, onGetChatRooms, onNewRoomCreated, onGetMembers, onGetRoomInfo, onDeleteMessage, onEditMessage, onChatInvite, onMessageError, onReactionMessage, onReactionHistory, onRoomKicked, };
|
|
21
25
|
//# sourceMappingURL=stanzaHandlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stanzaHandlers.d.ts","sourceRoot":"","sources":["../../../src/networking/stanzaHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"stanzaHandlers.d.ts","sourceRoot":"","sources":["../../../src/networking/stanzaHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAE9B,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAqB3C,OAAO,EAAE,QAAQ,EAAqB,MAAM,gBAAgB,CAAC;AAoB7D,QAAA,MAAM,qBAAqB,GAAI,QAAQ,GAAG,KAAG,OAGO,CAAC;AA6BrD,QAAA,MAAM,iBAAiB,GAAU,QAAQ,OAAO,EAAE,SAAS,UAAU,kCAwIpE,CAAC;AAEF,QAAA,MAAM,eAAe,GAAU,QAAQ,OAAO,kBAiB7C,CAAC;AAIF,QAAA,MAAM,iBAAiB,GAAI,QAAQ,OAAO,SAgBzC,CAAC;AAGF,QAAA,MAAM,iBAAiB,GAAI,QAAQ,OAAO,SASzC,CAAC;AAEF,QAAA,MAAM,aAAa,GAAU,QAAQ,OAAO,kBAiB3C,CAAC;AAqIF,QAAA,MAAM,gBAAgB,GAAU,QAAQ,GAAG,EAAE,SAAS,UAAU,kBAsC/D,CAAC;AAEF,QAAA,MAAM,eAAe,GAAU,QAAQ,OAAO,EAAE,aAAa,MAAM,kBA8ClE,CAAC;AAgEF,QAAA,MAAM,gBAAgB,GAAI,QAAQ,OAAO,GAAG,GAAG,SAa9C,CAAC;AAEF,QAAA,MAAM,YAAY,GAAU,QAAQ,OAAO,EAAE,QAAQ,GAAG,kBAoBvD,CAAC;AAEF,QAAA,MAAM,YAAY,GAAI,QAAQ,OAAO,SAcpC,CAAC;AAEF,QAAA,MAAM,aAAa,GAAI,QAAQ,OAAO,SAGrC,CAAC;AAEF,QAAA,MAAM,uBAAuB,GAAI,QAAQ,OAAO,EAAE,OAAO,GAAG,SAG3D,CAAC;AAEF,QAAA,MAAM,gBAAgB,GAAI,QAAQ,OAAO,EAAE,MAAM,GAAG,SAGnD,CAAC;AAEF,QAAA,MAAM,cAAc,GAAI,QAAQ,OAAO,EAAE,MAAM,GAAG,SAwDjD,CAAC;AAKF,QAAA,MAAM,cAAc,GAAI,SAAS,OAAO,EAAE,QAAQ,GAAG,SAAO,CAAC;AAC7D,uEAAuE;AACvE,QAAA,MAAM,iBAAiB,GAAI,QAAQ,OAAO,SAezC,CAAC;AAEF,QAAA,MAAM,iBAAiB,GAAI,SAAS,OAAO,SAAO,CAAC;AAKnD,QAAA,MAAM,YAAY,GAAI,QAAQ,OAAO,GAAG,GAAG,SA4C1C,CAAC;AACF,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,aAAa,EACb,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,GACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleStanzas.xmpp.d.ts","sourceRoot":"","sources":["../../../../src/networking/xmpp/handleStanzas.xmpp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"handleStanzas.xmpp.d.ts","sourceRoot":"","sources":["../../../../src/networking/xmpp/handleStanzas.xmpp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAsB9B,OAAO,UAAU,MAAM,eAAe,CAAC;AAyCvC,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,QA6B/D;AAED,eAAO,MAAM,0BAA0B,QAAO,IAG7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendDisplayedMarker.xmpp.d.ts","sourceRoot":"","sources":["../../../../src/networking/xmpp/sendDisplayedMarker.xmpp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAO,MAAM,cAAc,CAAC;AAM3C,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,QAqBhB"}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import { Client } from '@xmpp/client';
|
|
2
|
+
/**
|
|
3
|
+
* One media stanza for one or more files.
|
|
4
|
+
*
|
|
5
|
+
* `data` carries the flat fields that describe attachment #0, so a client
|
|
6
|
+
* that predates multi-attach still shows the first file. With more than one
|
|
7
|
+
* file the whole list rides on `<data attachments='JSON'>` (selection order).
|
|
8
|
+
*
|
|
9
|
+
* A typed caption rides on the message too: as `caption` / `captionMentions`
|
|
10
|
+
* attributes in a plain room, and inside the sealed <body> in an e2ee room
|
|
11
|
+
* (never as an attribute there). A message with one file and no caption is
|
|
12
|
+
* byte-identical to what this function produced before multi-attach.
|
|
13
|
+
*/
|
|
2
14
|
export declare function sendMediaMessage(client: Client, roomJID: string, data: any, customId?: string, devServer?: string): string;
|
|
3
15
|
//# sourceMappingURL=sendMediaMessage.xmpp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendMediaMessage.xmpp.d.ts","sourceRoot":"","sources":["../../../../src/networking/xmpp/sendMediaMessage.xmpp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAO,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"sendMediaMessage.xmpp.d.ts","sourceRoot":"","sources":["../../../../src/networking/xmpp/sendMediaMessage.xmpp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAO,MAAM,cAAc,CAAC;AAyB3C;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,GAAG,EACT,QAAQ,CAAC,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM,UA8HnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendReceivedReceipt.xmpp.d.ts","sourceRoot":"","sources":["../../../../src/networking/xmpp/sendReceivedReceipt.xmpp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAO,MAAM,cAAc,CAAC;AAM3C,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,QAqBhB"}
|