@ethora/chat-component-rn 26.7.8 → 26.7.9
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 +0 -2
- package/lib/commonjs/assets/icons.js +2 -2
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatRoom.js +17 -8
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MediaMessage.js +8 -5
- package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js +5 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageList.js +2 -1
- package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +1 -51
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +51 -12
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js +12 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js +13 -2
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js +13 -2
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/commonjs/components/styled/MessageImage.js +3 -1
- package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
- package/lib/commonjs/components/styled/UnsupportedType.js +14 -4
- package/lib/commonjs/components/styled/UnsupportedType.js.map +1 -1
- package/lib/commonjs/components/styled/VideoMessage.js +3 -1
- package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
- package/lib/commonjs/context/xmppProvider.js +46 -31
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/helpers/createMessageFromXml.js +19 -1
- package/lib/commonjs/helpers/createMessageFromXml.js.map +1 -1
- package/lib/commonjs/helpers/getDisplayFileName.js +79 -0
- package/lib/commonjs/helpers/getDisplayFileName.js.map +1 -0
- package/lib/commonjs/helpers/getServerReadTimestamp.js +125 -0
- package/lib/commonjs/helpers/getServerReadTimestamp.js.map +1 -0
- package/lib/commonjs/helpers/initXmppRooms.js +9 -7
- package/lib/commonjs/helpers/initXmppRooms.js.map +1 -1
- package/lib/commonjs/helpers/isOwnMessage.js +75 -0
- package/lib/commonjs/helpers/isOwnMessage.js.map +1 -0
- package/lib/commonjs/helpers/mimeToExtension.js +6 -14
- package/lib/commonjs/helpers/mimeToExtension.js.map +1 -1
- package/lib/commonjs/hooks/useChatRoomFocus.js +17 -8
- package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/commonjs/hooks/useChatWrapperInit.js +12 -7
- package/lib/commonjs/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/commonjs/i18n/strings.js +0 -18
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +0 -13
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/stanzaHandlers.js +20 -2
- package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js +45 -11
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js +36 -2
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/roomStore/index.js +35 -2
- package/lib/commonjs/roomStore/index.js.map +1 -1
- package/lib/commonjs/roomStore/persistence.js +200 -11
- package/lib/commonjs/roomStore/persistence.js.map +1 -1
- package/lib/commonjs/roomStore/roomsSlice.js +83 -6
- package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
- package/lib/module/assets/icons.js +1 -1
- package/lib/module/assets/icons.js.map +1 -1
- package/lib/module/components/MainComponents/ChatRoom.js +17 -8
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/MediaMessage.js +9 -6
- package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/module/components/MainComponents/MessageContainer.js +5 -1
- package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/module/components/MainComponents/MessageList.js +2 -1
- package/lib/module/components/MainComponents/MessageList.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +3 -53
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +52 -13
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js +12 -1
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js +13 -2
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js +13 -2
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/module/components/styled/MessageImage.js +3 -1
- package/lib/module/components/styled/MessageImage.js.map +1 -1
- package/lib/module/components/styled/UnsupportedType.js +14 -4
- package/lib/module/components/styled/UnsupportedType.js.map +1 -1
- package/lib/module/components/styled/VideoMessage.js +3 -1
- package/lib/module/components/styled/VideoMessage.js.map +1 -1
- package/lib/module/context/xmppProvider.js +47 -32
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/helpers/createMessageFromXml.js +19 -1
- package/lib/module/helpers/createMessageFromXml.js.map +1 -1
- package/lib/module/helpers/getDisplayFileName.js +73 -0
- package/lib/module/helpers/getDisplayFileName.js.map +1 -0
- package/lib/module/helpers/getServerReadTimestamp.js +120 -0
- package/lib/module/helpers/getServerReadTimestamp.js.map +1 -0
- package/lib/module/helpers/initXmppRooms.js +9 -7
- package/lib/module/helpers/initXmppRooms.js.map +1 -1
- package/lib/module/helpers/isOwnMessage.js +70 -0
- package/lib/module/helpers/isOwnMessage.js.map +1 -0
- package/lib/module/helpers/mimeToExtension.js +6 -13
- package/lib/module/helpers/mimeToExtension.js.map +1 -1
- package/lib/module/hooks/useChatRoomFocus.js +17 -8
- package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/module/hooks/useChatWrapperInit.js +12 -7
- package/lib/module/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/module/i18n/strings.js +0 -18
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +0 -12
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/stanzaHandlers.js +20 -2
- package/lib/module/networking/stanzaHandlers.js.map +1 -1
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js +45 -11
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/module/networking/xmppClient.js +36 -2
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/roomStore/index.js +37 -4
- package/lib/module/roomStore/index.js.map +1 -1
- package/lib/module/roomStore/persistence.js +197 -11
- package/lib/module/roomStore/persistence.js.map +1 -1
- package/lib/module/roomStore/roomsSlice.js +83 -6
- package/lib/module/roomStore/roomsSlice.js.map +1 -1
- package/lib/typescript/assets/icons.d.ts +0 -8
- package/lib/typescript/assets/icons.d.ts.map +1 -1
- 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/MessageContainer.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts.map +1 -1
- package/lib/typescript/components/styled/MessageImage.d.ts +6 -0
- package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
- package/lib/typescript/components/styled/UnsupportedType.d.ts.map +1 -1
- package/lib/typescript/components/styled/VideoMessage.d.ts +6 -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/helpers/createMessageFromXml.d.ts.map +1 -1
- package/lib/typescript/helpers/getAvatarColor.d.ts +1 -1
- package/lib/typescript/helpers/getDisplayFileName.d.ts +49 -0
- package/lib/typescript/helpers/getDisplayFileName.d.ts.map +1 -0
- package/lib/typescript/helpers/getServerReadTimestamp.d.ts +69 -0
- package/lib/typescript/helpers/getServerReadTimestamp.d.ts.map +1 -0
- package/lib/typescript/helpers/initXmppRooms.d.ts.map +1 -1
- package/lib/typescript/helpers/isOwnMessage.d.ts +36 -0
- package/lib/typescript/helpers/isOwnMessage.d.ts.map +1 -0
- package/lib/typescript/helpers/mimeToExtension.d.ts +0 -15
- package/lib/typescript/helpers/mimeToExtension.d.ts.map +1 -1
- package/lib/typescript/hooks/useChatRoomFocus.d.ts +4 -1
- package/lib/typescript/hooks/useChatRoomFocus.d.ts.map +1 -1
- package/lib/typescript/hooks/useChatWrapperInit.d.ts.map +1 -1
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts +0 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts +9 -2
- package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/roomStore/index.d.ts.map +1 -1
- package/lib/typescript/roomStore/persistence.d.ts +18 -1
- package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts +13 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
- package/lib/typescript/types/models/room.model.d.ts +0 -1
- package/lib/typescript/types/models/room.model.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +0 -1
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/icons.tsx +0 -24
- package/src/components/MainComponents/ChatRoom.tsx +21 -10
- package/src/components/MainComponents/MediaMessage.tsx +8 -5
- package/src/components/MainComponents/MessageContainer.tsx +5 -1
- package/src/components/MainComponents/MessageList.tsx +2 -1
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +2 -36
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +63 -26
- package/src/components/RoomComponents/styled/LastMessageFile.tsx +14 -2
- package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +14 -2
- package/src/components/RoomComponents/styled/LastMessageVideo.tsx +14 -2
- package/src/components/styled/MessageImage.tsx +8 -1
- package/src/components/styled/UnsupportedType.tsx +14 -4
- package/src/components/styled/VideoMessage.tsx +8 -1
- package/src/context/xmppProvider.tsx +47 -24
- package/src/helpers/createMessageFromXml.ts +20 -1
- package/src/helpers/getDisplayFileName.ts +87 -0
- package/src/helpers/getServerReadTimestamp.ts +120 -0
- package/src/helpers/initXmppRooms.tsx +9 -9
- package/src/helpers/isOwnMessage.ts +90 -0
- package/src/helpers/mimeToExtension.ts +6 -22
- package/src/hooks/useChatRoomFocus.ts +14 -5
- package/src/hooks/useChatWrapperInit.ts +12 -7
- package/src/i18n/strings.ts +0 -18
- package/src/networking/api-requests/rooms.api.ts +0 -9
- package/src/networking/stanzaHandlers.ts +20 -6
- package/src/networking/xmpp/flushLastViewedToPrivateStore.ts +65 -18
- package/src/networking/xmppClient.ts +41 -2
- package/src/roomStore/index.ts +40 -4
- package/src/roomStore/persistence.ts +197 -7
- package/src/roomStore/roomsSlice.ts +84 -6
- package/src/types/models/room.model.ts +0 -1
- package/src/types/types.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../../src/components/MainComponents/MessageList.tsx"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,KAMN,MAAM,OAAO,CAAC;AAYf,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAS,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../../src/components/MainComponents/MessageList.tsx"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,KAMN,MAAM,OAAO,CAAC;AAYf,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAS,MAAM,mBAAmB,CAAC;AAanE,UAAU,gBAAgB,CAAC,QAAQ,SAAS,QAAQ;IAClD,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAClC,OAAO,EAAE,QAAQ,CAAC;QAClB,MAAM,EAAE,OAAO,CAAC;QAChB,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC,CAAC;IACH,kBAAkB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QACvC,IAAI,EAAE,IAAI,CAAC;QACX,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC,CAAC;IACH,qBAAqB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,CAChB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,KACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB;;;;;;;OAOG;IACH,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC5D;AAED,QAAA,MAAM,WAAW,GAAI,QAAQ,SAAS,QAAQ,EAAE,+JAY7C,gBAAgB,CAAC,QAAQ,CAAC,sBA4a5B,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatProfileModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modals/ChatProfileModal/ChatProfileModal.tsx"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,KAA+C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatProfileModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modals/ChatProfileModal/ChatProfileModal.tsx"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,KAA+C,MAAM,OAAO,CAAC;AAqDpE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,aAAa,OAAO,EACpB,kBAAkB,MAAM,KACvB,MAAM,GAAG,IAA+C,CAAC;AAE5D;yCACyC;AACzC,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,GAAG,IAAI,KAAG,MAOnD,CAAC;AAEF,UAAU,qBAAqB;IAC7B,gBAAgB,EAAE,GAAG,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA+lBrD,CAAC;AA+HF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePreviewModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modals/FilePreviewModal/FilePreviewModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FilePreviewModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modals/FilePreviewModal/FilePreviewModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAkH3D,UAAU,qBAAqB;IAC7B,gBAAgB,EAAE,GAAG,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA6VrD,CAAC;AAkBF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { LastMessage } from '../../../types/types';
|
|
3
|
-
interface LastMessageFileProps extends Pick<LastMessage, 'user' | 'originalName' | 'locationPreview'> {
|
|
3
|
+
interface LastMessageFileProps extends Pick<LastMessage, 'user' | 'originalName' | 'fileName' | 'mimetype' | 'locationPreview'> {
|
|
4
4
|
}
|
|
5
5
|
declare const LastMessageFile: FC<LastMessageFileProps>;
|
|
6
6
|
export default LastMessageFile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LastMessageFile.d.ts","sourceRoot":"","sources":["../../../../../src/components/RoomComponents/styled/LastMessageFile.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"LastMessageFile.d.ts","sourceRoot":"","sources":["../../../../../src/components/RoomComponents/styled/LastMessageFile.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAgBnD,UAAU,oBACR,SAAQ,IAAI,CACV,WAAW,EACX,MAAM,GAAG,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,iBAAiB,CACtE;CAAG;AAKN,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAgD7C,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { LastMessage } from '../../../types/types';
|
|
3
|
-
interface LastMessagePhotoProps extends Pick<LastMessage, 'user' | 'originalName' | 'locationPreview'> {
|
|
3
|
+
interface LastMessagePhotoProps extends Pick<LastMessage, 'user' | 'originalName' | 'fileName' | 'mimetype' | 'locationPreview'> {
|
|
4
4
|
}
|
|
5
5
|
declare const LastMessagePhoto: FC<LastMessagePhotoProps>;
|
|
6
6
|
export default LastMessagePhoto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LastMessagePhoto.d.ts","sourceRoot":"","sources":["../../../../../src/components/RoomComponents/styled/LastMessagePhoto.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIlC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"LastMessagePhoto.d.ts","sourceRoot":"","sources":["../../../../../src/components/RoomComponents/styled/LastMessagePhoto.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIlC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAuBnD,UAAU,qBACR,SAAQ,IAAI,CACV,WAAW,EACX,MAAM,GAAG,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,iBAAiB,CACtE;CAAG;AAEN,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAiC/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { LastMessage } from '../../../types/types';
|
|
3
|
-
interface LastMessageVideoProps extends Pick<LastMessage, 'user' | 'location' | 'originalName'> {
|
|
3
|
+
interface LastMessageVideoProps extends Pick<LastMessage, 'user' | 'location' | 'originalName' | 'fileName' | 'mimetype'> {
|
|
4
4
|
}
|
|
5
5
|
declare const LastMessageVideo: FC<LastMessageVideoProps>;
|
|
6
6
|
export default LastMessageVideo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LastMessageVideo.d.ts","sourceRoot":"","sources":["../../../../../src/components/RoomComponents/styled/LastMessageVideo.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIlC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"LastMessageVideo.d.ts","sourceRoot":"","sources":["../../../../../src/components/RoomComponents/styled/LastMessageVideo.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIlC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAsCnD,UAAU,qBACR,SAAQ,IAAI,CACV,WAAW,EACX,MAAM,GAAG,UAAU,GAAG,cAAc,GAAG,UAAU,GAAG,UAAU,CAC/D;CAAG;AAEN,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAkC/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -3,6 +3,12 @@ interface CustomMessageImageProps {
|
|
|
3
3
|
/** Full-size file. Opened in the preview modal, NOT rendered inline. */
|
|
4
4
|
fileURL: string;
|
|
5
5
|
fileName: string;
|
|
6
|
+
/**
|
|
7
|
+
* The sender's original file name (bug #40) - kept alongside `fileName`
|
|
8
|
+
* so the preview modal's save/share/download logic can prefer it over
|
|
9
|
+
* the server's stored/hashed name.
|
|
10
|
+
*/
|
|
11
|
+
originalName?: string;
|
|
6
12
|
mimetype: string;
|
|
7
13
|
/**
|
|
8
14
|
* Server-generated thumbnail — what the bubble actually renders, same
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageImage.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/MessageImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoBnD,UAAU,uBAAuB;IAC/B,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AASD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"MessageImage.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/MessageImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoBnD,UAAU,uBAAuB;IAC/B,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AASD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA8FzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnsupportedType.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/UnsupportedType.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"UnsupportedType.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/UnsupportedType.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsB1B,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACnC;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA+H7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface CustomMessageVideoProps {
|
|
3
3
|
fileName: string;
|
|
4
|
+
/**
|
|
5
|
+
* The sender's original file name (bug #40) - kept alongside `fileName`
|
|
6
|
+
* so the preview modal's save/share/download logic can prefer it over
|
|
7
|
+
* the server's stored/hashed name.
|
|
8
|
+
*/
|
|
9
|
+
originalName?: string;
|
|
4
10
|
fileURL: string;
|
|
5
11
|
mimetype: string;
|
|
6
12
|
/** The backend-generated poster frame (message.locationPreview). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/VideoMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAmBnD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAqGD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"VideoMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/VideoMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAmBnD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAqGD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+BzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xmppProvider.d.ts","sourceRoot":"","sources":["../../../src/context/xmppProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,SAAS,EAQV,MAAM,OAAO,CAAC;AAIf,OAAO,UAEN,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,OAAO,EACP,uBAAuB,EAEvB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAmCxB,UAAU,QAAQ;IAChB,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC;CAC9B;AAED,UAAU,eAAe;IACvB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC9B,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,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CAswBpD,CAAC;AAEF,eAAO,MAAM,aAAa,uBAkBzB,CAAC;AAEF,iFAAiF;AACjF,wBAAgB,cAAc,SAE7B"}
|
|
@@ -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;AAE1C,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,
|
|
1
|
+
{"version":3,"file":"createMessageFromXml.d.ts","sourceRoot":"","sources":["../../../src/helpers/createMessageFromXml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,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,CA6GlB,CAAC"}
|
|
@@ -3,5 +3,5 @@ export declare const getAvatarColor: (name?: string | null, config?: {
|
|
|
3
3
|
avatar?: string;
|
|
4
4
|
};
|
|
5
5
|
}) => string | undefined;
|
|
6
|
-
export declare const getAvatarTextColor: (bg?: string) => "#
|
|
6
|
+
export declare const getAvatarTextColor: (bg?: string) => "#FFFFFF" | "#141414";
|
|
7
7
|
//# sourceMappingURL=getAvatarColor.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface DisplayFileNameOptions {
|
|
2
|
+
originalName?: string | null;
|
|
3
|
+
fileName?: string | null;
|
|
4
|
+
location?: string | null;
|
|
5
|
+
mimetype?: string | null;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Picks the best human-readable filename for a chat attachment - the
|
|
9
|
+
* single source of truth for every place a file name is rendered in the
|
|
10
|
+
* UI, saved to disk, shared, or downloaded.
|
|
11
|
+
*
|
|
12
|
+
* Priority: `originalName` (the sender's own file name, e.g. "test1.pdf")
|
|
13
|
+
* beats `fileName` (the server's stored/hashed name, e.g.
|
|
14
|
+
* "3f9a1c...c2.pdf") beats the last path segment of `location`. The
|
|
15
|
+
* stored hash name is only a fallback of last resort.
|
|
16
|
+
*
|
|
17
|
+
* Bug #40: display and save/share/download logic used to prefer the
|
|
18
|
+
* stored hash name over the original one, so an attachment sent as
|
|
19
|
+
* "test1.pdf" showed up (and got saved to the phone) as something like
|
|
20
|
+
* "3f9a1c...c2.pdf" - both directions (web -> RN and RN -> RN).
|
|
21
|
+
*
|
|
22
|
+
* Always returns a non-empty string with a valid extension: if the
|
|
23
|
+
* chosen candidate has no extension (a hash name can be `<hex>` with no
|
|
24
|
+
* extension at all, or `<hex>.<ext>`), one is appended from `mimetype`
|
|
25
|
+
* (or `.bin` as a last resort when the mime is unknown/missing too).
|
|
26
|
+
*/
|
|
27
|
+
export declare function getDisplayFileName(options: DisplayFileNameOptions): string;
|
|
28
|
+
/**
|
|
29
|
+
* Makes a display name safe to use as an actual path segment when
|
|
30
|
+
* saving/sharing a file to the device: strips path separators (so an
|
|
31
|
+
* odd/hostile server-provided name can't escape the target directory)
|
|
32
|
+
* and control characters. Keeps the rest of the name - including the
|
|
33
|
+
* extension - intact.
|
|
34
|
+
*/
|
|
35
|
+
export declare function sanitizeFileNameForPath(name: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Resolves a filename that is safe to write into a target directory:
|
|
38
|
+
* sanitizes it, then - if `exists` reports a collision - inserts
|
|
39
|
+
* " (1)", " (2)", ... before the extension until a free name is found,
|
|
40
|
+
* so saving two different attachments that share a display name never
|
|
41
|
+
* silently overwrites the first one.
|
|
42
|
+
*
|
|
43
|
+
* `exists` is injected so callers can back it with whatever existence
|
|
44
|
+
* check makes sense for their storage API (expo-file-system,
|
|
45
|
+
* StorageAccessFramework directory listing, ...) - this function stays
|
|
46
|
+
* pure and easy to unit test.
|
|
47
|
+
*/
|
|
48
|
+
export declare function getUniqueFileName(name: string, exists: (candidateName: string) => Promise<boolean>): Promise<string>;
|
|
49
|
+
//# sourceMappingURL=getDisplayFileName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDisplayFileName.d.ts","sourceRoot":"","sources":["../../../src/helpers/getDisplayFileName.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAO1E;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO5D;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAClD,OAAO,CAAC,MAAM,CAAC,CAiBjB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { IMessage, IRoom } from '../types/types';
|
|
2
|
+
export declare const FUTURE_READ_MARKER_TOLERANCE_MS: number;
|
|
3
|
+
export interface ReadTimestampHeapState {
|
|
4
|
+
messageHeap?: IMessage[] | null;
|
|
5
|
+
failedMessages?: Record<string, unknown> | null;
|
|
6
|
+
}
|
|
7
|
+
type RoomForReadTimestamp = Pick<IRoom, 'jid' | 'messages' | 'lastViewedTimestamp'>;
|
|
8
|
+
/**
|
|
9
|
+
* Resolve the "read up to here" marker for `room` using SERVER time,
|
|
10
|
+
* never the device clock.
|
|
11
|
+
*
|
|
12
|
+
* Bug #38: if the device clock is ahead when the user leaves a room, a
|
|
13
|
+
* `Date.now()` read marker lands in the future. The private-store merge
|
|
14
|
+
* (flushLastViewedToPrivateStore.ts) is forward-only ("if (prevNum >=
|
|
15
|
+
* ts) continue"), so once a future marker is written, no later
|
|
16
|
+
* *correct* write can ever replace it - the room's unread count is
|
|
17
|
+
* stuck wrong forever, on every device, from that point on. Anchoring
|
|
18
|
+
* to the newest SERVER-acknowledged message's own timestamp instead
|
|
19
|
+
* means the marker we write can never be ahead of what the server
|
|
20
|
+
* itself has recorded for the room.
|
|
21
|
+
*
|
|
22
|
+
* "Server-acknowledged" excludes:
|
|
23
|
+
* - a message still marked `pending` (the optimistic bubble shown
|
|
24
|
+
* while a send is in flight - it carries the DEVICE send time via
|
|
25
|
+
* `date`, not a server timestamp, until the server echoes it back
|
|
26
|
+
* and insertMessageWithDelimiter flips `pending` off);
|
|
27
|
+
* - a message id present in `heapState.messageHeap` (queued retry -
|
|
28
|
+
* used for offline media sends, see roomHeapSlice.ts) or
|
|
29
|
+
* `heapState.failedMessages` (a send that never reached the server
|
|
30
|
+
* at all).
|
|
31
|
+
*
|
|
32
|
+
* `msgSortableMs` (roomsSlice.ts) reads the server-assigned microsecond
|
|
33
|
+
* timestamp encoded in the first 13 digits of the message id - the same
|
|
34
|
+
* source already used for message ordering and unread counting - so
|
|
35
|
+
* this stays consistent with the rest of the read/unread pipeline.
|
|
36
|
+
*
|
|
37
|
+
* Falls back to the room's existing `lastViewedTimestamp` (so leaving
|
|
38
|
+
* an empty or never-scrolled room doesn't regress the marker), then to
|
|
39
|
+
* `0` when there's truly nothing to anchor to yet (a brand new room
|
|
40
|
+
* with no history and no prior marker). Callers should treat `0` as
|
|
41
|
+
* "skip the write" rather than substituting a device-clock guess.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getServerReadTimestamp(room: RoomForReadTimestamp | null | undefined, heapState?: ReadTimestampHeapState | null): number;
|
|
44
|
+
/**
|
|
45
|
+
* Is `marker` a leftover from a device whose clock was wrong when it
|
|
46
|
+
* stamped a read marker (bug #38)?
|
|
47
|
+
*
|
|
48
|
+
* TWO independent signals must agree before we're willing to throw a
|
|
49
|
+
* stored marker away, because "waive the forward-only guard" is a
|
|
50
|
+
* destructive operation:
|
|
51
|
+
*
|
|
52
|
+
* 1. it sits well past the newest message we know the room has, AND
|
|
53
|
+
* 2. it sits well past real time.
|
|
54
|
+
*
|
|
55
|
+
* Signal 1 alone is NOT enough, and that is the whole point of this
|
|
56
|
+
* function: a device whose local cache for a room is simply stale (very
|
|
57
|
+
* common - any room whose history hasn't been synced yet this session)
|
|
58
|
+
* sees a perfectly legitimate marker written by another device that HAS
|
|
59
|
+
* seen newer messages, and would happily "heal" it backwards, resurrecting
|
|
60
|
+
* already-read messages as unread on every device. A real timestamp can
|
|
61
|
+
* never be ahead of real time, so requiring signal 2 as well means a
|
|
62
|
+
* stale cache on its own can no longer trigger the self-heal.
|
|
63
|
+
*
|
|
64
|
+
* Signal 2 alone is not used either: it would let a device whose own
|
|
65
|
+
* clock is running SLOW mistake every correct marker for a corrupt one.
|
|
66
|
+
*/
|
|
67
|
+
export declare function isCorruptFutureReadMarker(marker: number, newestAckedMs: number): boolean;
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=getServerReadTimestamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getServerReadTimestamp.d.ts","sourceRoot":"","sources":["../../../src/helpers/getServerReadTimestamp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAWtD,eAAO,MAAM,+BAA+B,QAAgB,CAAC;AAE7D,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACjD;AAED,KAAK,oBAAoB,GAAG,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,GAAG,qBAAqB,CAAC,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,EAC7C,SAAS,CAAC,EAAE,sBAAsB,GAAG,IAAI,GACxC,MAAM,CA4BR;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GACpB,OAAO,CAKT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initXmppRooms.d.ts","sourceRoot":"","sources":["../../../src/helpers/initXmppRooms.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"initXmppRooms.d.ts","sourceRoot":"","sources":["../../../src/helpers/initXmppRooms.tsx"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAItD,QAAA,MAAM,aAAa,GACjB,MAAM,IAAI,EACV,QAAQ,OAAO,EACf,YAAY,UAAU,EACtB,QAAQ;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAA;CAAE,EAChC,UAAU,MAAM,kBA4DjB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IMessage } from '../types/types';
|
|
2
|
+
/**
|
|
3
|
+
* Bug #41: during reconnect catch-up (app was backgrounded/offline, then
|
|
4
|
+
* comes back online), messages replayed from MAM could transiently render
|
|
5
|
+
* on the RIGHT (as if sent by the current user) before flipping to the
|
|
6
|
+
* LEFT a moment later. Root cause: `message.user.id === walletAddress`
|
|
7
|
+
* treats `undefined === undefined` (or `'' === ''`) as a match, and the
|
|
8
|
+
* two sides could independently be empty for one frame -- the message's
|
|
9
|
+
* sender id before the MAM-derived value settled, and/or the current
|
|
10
|
+
* user's id before it rehydrated. Two blank ids must never compare equal.
|
|
11
|
+
*
|
|
12
|
+
* A second, related issue: the same logical sender id can show up in
|
|
13
|
+
* different shapes depending on which code path produced it -- a bare
|
|
14
|
+
* id ("wallet123") or a bare JID with an incidental session resource
|
|
15
|
+
* ("wallet123@host/sessionResource", as `senderJID` attrs carry on the
|
|
16
|
+
* wire -- see src/assets/test.xml). In every shape used in this
|
|
17
|
+
* codebase the identifying segment is the part BEFORE the first '@' (or
|
|
18
|
+
* before '/' when there's no '@'); anything after that -- domain,
|
|
19
|
+
* resource -- is noise. Comparing raw strings with `===` fails whenever
|
|
20
|
+
* one side still carries that noise and the other doesn't. Normalizing
|
|
21
|
+
* both sides (strip resource, strip domain, lowercase) before comparing
|
|
22
|
+
* makes the check tolerant of that drift.
|
|
23
|
+
*/
|
|
24
|
+
export interface OwnMessageUserLike {
|
|
25
|
+
id?: string | null;
|
|
26
|
+
xmppUsername?: string | null;
|
|
27
|
+
walletAddress?: string | null;
|
|
28
|
+
}
|
|
29
|
+
export type OwnMessageCurrentUser = OwnMessageUserLike | string | null | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Robustly determine whether `message` was sent by `currentUser`. Never
|
|
32
|
+
* returns true from two blank/undefined ids, and tolerates bare-id vs.
|
|
33
|
+
* full-JID mismatches between the sender id and the current user id.
|
|
34
|
+
*/
|
|
35
|
+
export declare const isOwnMessage: (message: Pick<IMessage, "user"> | null | undefined, currentUser: OwnMessageCurrentUser) => boolean;
|
|
36
|
+
//# sourceMappingURL=isOwnMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isOwnMessage.d.ts","sourceRoot":"","sources":["../../../src/helpers/isOwnMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,WAAW,kBAAkB;IACjC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,MAAM,qBAAqB,GAC7B,kBAAkB,GAClB,MAAM,GACN,IAAI,GACJ,SAAS,CAAC;AAkCd;;;;GAIG;AACH,eAAO,MAAM,YAAY,GACvB,SAAS,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,EAClD,aAAa,qBAAqB,KACjC,OAYF,CAAC"}
|
|
@@ -57,19 +57,4 @@ export declare function isUnsupportedAudioForIosPlayback(opts: {
|
|
|
57
57
|
* extension is appended so callers always get a usable filename.
|
|
58
58
|
*/
|
|
59
59
|
export declare function ensureFilenameHasExtension(fileName: string | undefined | null, mime: string | undefined | null): string;
|
|
60
|
-
/**
|
|
61
|
-
* Best-effort filename derivation for a message bubble:
|
|
62
|
-
* - server-provided `fileName`
|
|
63
|
-
* - server-provided `originalName`
|
|
64
|
-
* - URL pathname
|
|
65
|
-
* - generic `media_<timestamp>` so we never render an empty label
|
|
66
|
-
*
|
|
67
|
-
* Always returns a string with a valid extension.
|
|
68
|
-
*/
|
|
69
|
-
export declare function deriveDisplayFilename(opts: {
|
|
70
|
-
fileName?: string | null;
|
|
71
|
-
originalName?: string | null;
|
|
72
|
-
url?: string | null;
|
|
73
|
-
mime?: string | null;
|
|
74
|
-
}): string;
|
|
75
60
|
//# sourceMappingURL=mimeToExtension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mimeToExtension.d.ts","sourceRoot":"","sources":["../../../src/helpers/mimeToExtension.ts"],"names":[],"mappings":"AAkGA;;;;;;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,GAAG,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,GACA,OAAO,CA8CT;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAI3E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAWtE;AAQD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE;IACnD,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,GAAG,OAAO,CAiBV;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE;IACtD,IAAI,CAAC,EAAE,M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DK assumes "mounted == active". With this hook,
|
|
23
23
|
* focus marks the room visible (clearing the badge) and blur stamps
|
|
24
|
-
* `lastViewedTimestamp
|
|
24
|
+
* `lastViewedTimestamp` to the newest SERVER-acknowledged message so
|
|
25
|
+
* future messages count as unread. Deliberately not `Date.now()`: a
|
|
26
|
+
* device clock running ahead would write a future marker that the
|
|
27
|
+
* forward-only private-store merge could never correct again (bug #38).
|
|
25
28
|
*
|
|
26
29
|
* Usage with React Navigation:
|
|
27
30
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatRoomFocus.d.ts","sourceRoot":"","sources":["../../../src/hooks/useChatRoomFocus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useChatRoomFocus.d.ts","sourceRoot":"","sources":["../../../src/hooks/useChatRoomFocus.ts"],"names":[],"mappings":"AAWA,UAAU,uBAAuB;IAC/B,wEAAwE;IACxE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;;;;;;OAOG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,gBAAgB,GAAI,yBAG9B,uBAAuB,SA4CzB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatWrapperInit.d.ts","sourceRoot":"","sources":["../../../src/hooks/useChatWrapperInit.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,UAAU,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"useChatWrapperInit.d.ts","sourceRoot":"","sources":["../../../src/hooks/useChatWrapperInit.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAgBlD,UAAU,uBAAuB;IAC/B,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,wBAAwB;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5D,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC;IACnE,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,QAAA,MAAM,kBAAkB,GAAI,uCAIzB,uBAAuB,KAAG,wBAqP5B,CAAC;AAEF,eAAe,kBAAkB,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;AA41CnD,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"}
|
|
@@ -10,7 +10,6 @@ export declare function getRooms(): Promise<{
|
|
|
10
10
|
export declare function getRoomByName(chatName: string): Promise<ApiRoom>;
|
|
11
11
|
export declare function postRoom(data: PostRoom): Promise<any>;
|
|
12
12
|
export declare function postPrivateRoom(username: string, title?: string): Promise<ApiRoom>;
|
|
13
|
-
export declare function setRoomMuted(chatName: string, muted: boolean): Promise<boolean>;
|
|
14
13
|
export declare function postReportRoom(data: PostReportRoom): Promise<any>;
|
|
15
14
|
export declare function postAddRoomMember(data: PostAddRoomMember): Promise<RoomMember[]>;
|
|
16
15
|
export declare function deleteRoomMember(data: DeleteRoomMember): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooms.api.d.ts","sourceRoot":"","sources":["../../../../src/networking/api-requests/rooms.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"rooms.api.d.ts","sourceRoot":"","sources":["../../../../src/networking/api-requests/rooms.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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AO,SAAO,CAAC;AACnD,QAAA,MAAM,YAAY,GAAI,SAAS,OAAO,SAAO,CAAC;AAE9C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,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,12 +1,16 @@
|
|
|
1
|
+
import { type ReadTimestampHeapState } from '../../helpers/getServerReadTimestamp';
|
|
2
|
+
import type { IMessage } from '../../types/types';
|
|
1
3
|
interface RoomLike {
|
|
2
4
|
jid: string;
|
|
3
5
|
lastViewedTimestamp?: number;
|
|
4
6
|
unreadMessages?: number;
|
|
7
|
+
messages?: IMessage[];
|
|
5
8
|
}
|
|
6
9
|
interface FlushOpts {
|
|
7
10
|
visibleRoomJID?: string | null;
|
|
8
11
|
visibleRoomTs?: number | null;
|
|
9
12
|
onlyIfNoUnread?: boolean;
|
|
13
|
+
heapState?: ReadTimestampHeapState;
|
|
10
14
|
}
|
|
11
15
|
/**
|
|
12
16
|
* Merge in-memory lastViewedTimestamp values into the server-side
|
|
@@ -15,8 +19,11 @@ interface FlushOpts {
|
|
|
15
19
|
* each other's entries.
|
|
16
20
|
*
|
|
17
21
|
* Called on: tab change away from chat, AppState background/inactive,
|
|
18
|
-
* and (with onlyIfNoUnread=true) logout. ChatRoom's own unmount path
|
|
19
|
-
*
|
|
22
|
+
* and (with onlyIfNoUnread=true) logout. ChatRoom's own unmount path also
|
|
23
|
+
* goes through this (via flushLastViewedToPrivateStoreStanza) for the
|
|
24
|
+
* single-room case - actionSetTimestampToPrivateStore is a separate,
|
|
25
|
+
* unconditional low-level write primitive kept for direct/external use
|
|
26
|
+
* and is not part of this merge path.
|
|
20
27
|
*/
|
|
21
28
|
export declare function flushLastViewedToPrivateStore(client: any, rooms: Record<string, RoomLike> | null | undefined, opts?: FlushOpts): Promise<boolean>;
|
|
22
29
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flushLastViewedToPrivateStore.d.ts","sourceRoot":"","sources":["../../../../src/networking/xmpp/flushLastViewedToPrivateStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flushLastViewedToPrivateStore.d.ts","sourceRoot":"","sources":["../../../../src/networking/xmpp/flushLastViewedToPrivateStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,UAAU,QAAQ;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,UAAU,SAAS;IAKjB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ/B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI9B,cAAc,CAAC,EAAE,OAAO,CAAC;IAMzB,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,GAAG,EACX,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,IAAI,GAAG,SAAS,EAClD,IAAI,GAAE,SAAc,GACnB,OAAO,CAAC,OAAO,CAAC,CAmFlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xmppClient.d.ts","sourceRoot":"","sources":["../../../src/networking/xmppClient.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;
|
|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AO,CAAC;KACrB;IAiBR,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,MAAM;IA8BpE,cAAc,CAAC,aAAa,EAAE,MAAM;IAI9B,uBAAuB,CAC3B,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,MAAM,CAAC;IAMlB,yBAAyB,CACvB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EAAE,EACxB,eAAe,CAAC,EAAE,MAAM;IAY1B,qCAAqC,CACnC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE,OAAO,EACjB,aAAa,CAAC,EAAE,OAAO,EACvB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO;CA4CX;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/roomStore/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/roomStore/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAWvC,QAAA,MAAM,WAAW;;;;;;;;;;GAQf,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAmCvD,eAAO,MAAM,KAAK;;;;;;;;;;;;oCAEgC,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG,OAAO,KAAK,CAAC,QAAQ,CAAC;AAEhD,eAAO,MAAM,aAAa,GAAI,OAAO,SAAS,KAAG,KAAK,GAAG,IAKxD,CAAC;AAIF,eAAO,MAAM,cAAc,eA4CpB,CAAC"}
|
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
import { Middleware } from '@reduxjs/toolkit';
|
|
2
|
-
import { IRoom, User } from '../types/types';
|
|
2
|
+
import { IMessage, IRoom, User } from '../types/types';
|
|
3
|
+
import type { FailedMessagePayload } from './roomHeapSlice';
|
|
3
4
|
export declare const MESSAGE_LIMIT = 100;
|
|
5
|
+
export declare const MAX_PERSISTED_FAILED_MESSAGES = 200;
|
|
4
6
|
interface PersistedChatState {
|
|
5
7
|
user: User;
|
|
6
8
|
}
|
|
7
9
|
interface PersistedRoomsState {
|
|
8
10
|
rooms: Record<string, IRoom>;
|
|
9
11
|
}
|
|
12
|
+
interface PersistedHeapState {
|
|
13
|
+
failedMessages: Record<string, FailedMessagePayload>;
|
|
14
|
+
}
|
|
15
|
+
export declare function reconstructFailedMessagePayload(message: IMessage, roomJID: string): FailedMessagePayload | null;
|
|
16
|
+
/**
|
|
17
|
+
* Scan every persisted room for messages still `pending: true` that
|
|
18
|
+
* DON'T already have a restored failure entry (those are handled by the
|
|
19
|
+
* caller separately, from the persisted `failedMessages` map), and
|
|
20
|
+
* synthesize a retry-able FailedMessagePayload for each. Pure function:
|
|
21
|
+
* the caller (roomStore/index.ts) is responsible for dispatching
|
|
22
|
+
* `markMessageFailed` for the results.
|
|
23
|
+
*/
|
|
24
|
+
export declare function computeBootTimeFailures(rooms: Record<string, IRoom> | null | undefined, alreadyFailed: Record<string, FailedMessagePayload> | null | undefined): FailedMessagePayload[];
|
|
10
25
|
/**
|
|
11
26
|
* Middleware that debounces writes of the persisted slices to AsyncStorage.
|
|
12
27
|
* Only triggers on actions that actually mutate persisted state.
|
|
@@ -20,11 +35,13 @@ export declare const persistenceMiddleware: Middleware;
|
|
|
20
35
|
export declare function readPersistedState(): Promise<{
|
|
21
36
|
chat: PersistedChatState | null;
|
|
22
37
|
rooms: PersistedRoomsState | null;
|
|
38
|
+
heap: PersistedHeapState | null;
|
|
23
39
|
}>;
|
|
24
40
|
export declare function clearPersistedState(): Promise<void>;
|
|
25
41
|
export declare const PERSIST_KEYS: {
|
|
26
42
|
KEY_CHAT: string;
|
|
27
43
|
KEY_ROOMS: string;
|
|
44
|
+
KEY_HEAP: string;
|
|
28
45
|
};
|
|
29
46
|
export {};
|
|
30
47
|
//# sourceMappingURL=persistence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../../../src/roomStore/persistence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../../../src/roomStore/persistence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AA8B5D,eAAO,MAAM,aAAa,MAAM,CAAC;AAMjC,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,UAAU,kBAAkB;IAC1B,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CAE9B;AAED,UAAU,kBAAkB;IAC1B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;CAKtD;AA4OD,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,MAAM,GACd,oBAAoB,GAAG,IAAI,CAkC7B;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,IAAI,GAAG,SAAS,EAC/C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAAG,IAAI,GAAG,SAAS,GACrE,oBAAoB,EAAE,CAaxB;AAID;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,UAkDnC,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC;IAClD,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAChC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAClC,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACjC,CAAC,CA6BD;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAMzD;AAED,eAAO,MAAM,YAAY;;;;CAAoC,CAAC"}
|
|
@@ -87,7 +87,19 @@ declare const reducers: {
|
|
|
87
87
|
*
|
|
88
88
|
* Monotonic: a marker only ever moves a baseline FORWARD, so a stale
|
|
89
89
|
* server value can't resurrect already-read messages and a more-recent
|
|
90
|
-
* local read (tab blur stamping
|
|
90
|
+
* local read (tab blur stamping the server read timestamp) always wins.
|
|
91
|
+
*
|
|
92
|
+
* Bug #38 self-heal: forward-only is correct for a SANE existing
|
|
93
|
+
* value, but a device whose clock was ahead may have already stamped
|
|
94
|
+
* a marker in the future (either persisted locally from a previous
|
|
95
|
+
* session, or fetched from the server before this fix existed). To
|
|
96
|
+
* "only ever move forward" from a corrupt future value is to never
|
|
97
|
+
* move at all - the room would stay stuck at `unreadMessages: 0`
|
|
98
|
+
* forever. When the room is loaded, detect a marker that sits well
|
|
99
|
+
* past the newest message we actually know it has and waive the
|
|
100
|
+
* forward-only check for that one comparison, so the incoming
|
|
101
|
+
* (already-clamped, see xmppClient.getChatsPrivateStoreRequestStanza)
|
|
102
|
+
* value can correct it even though it's numerically smaller.
|
|
91
103
|
*/
|
|
92
104
|
applyPrivateStoreMarkers: (state: WritableDraft<RoomMessagesState>, action: PayloadAction<Record<string, number>>) => void;
|
|
93
105
|
setRoomRole: (state: WritableDraft<RoomMessagesState>, action: PayloadAction<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roomsSlice.d.ts","sourceRoot":"","sources":["../../../src/roomStore/roomsSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,aAAa,EAAE,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAElF,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAC;AAWvD,eAAO,MAAM,qBAAqB,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"roomsSlice.d.ts","sourceRoot":"","sources":["../../../src/roomStore/roomsSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,aAAa,EAAE,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAElF,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAC;AAWvD,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAuMzC,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC,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