@ethora/chat-component-rn 26.10.8 → 26.10.10
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 +7 -0
- package/README.md +1 -1
- package/lib/commonjs/components/MainComponents/AlbumGrid.js +6 -2
- package/lib/commonjs/components/MainComponents/AlbumGrid.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js +16 -11
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MediaMessage.js +13 -0
- package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomList.js +7 -16
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +3 -3
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/Message.js +27 -1
- package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatMediaGrid.js +159 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatMediaGrid.js.map +1 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +203 -134
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/LeaveChatModal.js +180 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/LeaveChatModal.js.map +1 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +100 -162
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/MediaViewer.js +824 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/MediaViewer.js.map +1 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/useSaveFile.js +179 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/useSaveFile.js.map +1 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/MessageSearchModal.js +22 -5
- package/lib/commonjs/components/Modals/MessageSearchModal/MessageSearchModal.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/useCallKeep.js +1 -3
- package/lib/commonjs/components/VideoCalls/useCallKeep.js.map +1 -1
- package/lib/commonjs/components/styled/MessageImage.js +4 -1
- package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
- package/lib/commonjs/components/styled/VideoMessage.js +5 -1
- package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
- package/lib/commonjs/context/MediaSourceContext.js +18 -0
- package/lib/commonjs/context/MediaSourceContext.js.map +1 -0
- package/lib/commonjs/helpers/constants/MODAL_COMPONENTS.js +3 -1
- package/lib/commonjs/helpers/constants/MODAL_COMPONENTS.js.map +1 -1
- package/lib/commonjs/helpers/constants/MODAL_TYPES.js +2 -0
- package/lib/commonjs/helpers/constants/MODAL_TYPES.js.map +1 -1
- package/lib/commonjs/helpers/publicChatsEntry.js +8 -6
- package/lib/commonjs/helpers/publicChatsEntry.js.map +1 -1
- package/lib/commonjs/helpers/roomMedia.js +118 -0
- package/lib/commonjs/helpers/roomMedia.js.map +1 -0
- package/lib/commonjs/i18n/strings.js +36 -0
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +9 -13
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/callTokenStanza.js +13 -1
- package/lib/commonjs/networking/callTokenStanza.js.map +1 -1
- package/lib/commonjs/push/sealedPushTask.js +20 -1
- package/lib/commonjs/push/sealedPushTask.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/components/MainComponents/AlbumGrid.js +6 -2
- package/lib/module/components/MainComponents/AlbumGrid.js.map +1 -1
- package/lib/module/components/MainComponents/ChatHeader.js +18 -13
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/MediaMessage.js +13 -0
- package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/module/components/MainComponents/RoomList.js +7 -16
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/Menu/HeaderRoomListMenu.js +3 -3
- package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/module/components/MessageBubble/Message.js +27 -1
- package/lib/module/components/MessageBubble/Message.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatMediaGrid.js +154 -0
- package/lib/module/components/Modals/ChatProfileModal/ChatMediaGrid.js.map +1 -0
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +204 -136
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/LeaveChatModal.js +175 -0
- package/lib/module/components/Modals/ChatProfileModal/LeaveChatModal.js.map +1 -0
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +100 -163
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/MediaViewer.js +819 -0
- package/lib/module/components/Modals/FilePreviewModal/MediaViewer.js.map +1 -0
- package/lib/module/components/Modals/FilePreviewModal/useSaveFile.js +172 -0
- package/lib/module/components/Modals/FilePreviewModal/useSaveFile.js.map +1 -0
- package/lib/module/components/Modals/MessageSearchModal/MessageSearchModal.js +20 -4
- package/lib/module/components/Modals/MessageSearchModal/MessageSearchModal.js.map +1 -1
- package/lib/module/components/VideoCalls/useCallKeep.js +2 -4
- package/lib/module/components/VideoCalls/useCallKeep.js.map +1 -1
- package/lib/module/components/styled/MessageImage.js +4 -1
- package/lib/module/components/styled/MessageImage.js.map +1 -1
- package/lib/module/components/styled/VideoMessage.js +5 -1
- package/lib/module/components/styled/VideoMessage.js.map +1 -1
- package/lib/module/context/MediaSourceContext.js +13 -0
- package/lib/module/context/MediaSourceContext.js.map +1 -0
- package/lib/module/helpers/constants/MODAL_COMPONENTS.js +2 -1
- package/lib/module/helpers/constants/MODAL_COMPONENTS.js.map +1 -1
- package/lib/module/helpers/constants/MODAL_TYPES.js +2 -0
- package/lib/module/helpers/constants/MODAL_TYPES.js.map +1 -1
- package/lib/module/helpers/publicChatsEntry.js +8 -6
- package/lib/module/helpers/publicChatsEntry.js.map +1 -1
- package/lib/module/helpers/roomMedia.js +112 -0
- package/lib/module/helpers/roomMedia.js.map +1 -0
- package/lib/module/i18n/strings.js +36 -0
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +9 -13
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/callTokenStanza.js +13 -1
- package/lib/module/networking/callTokenStanza.js.map +1 -1
- package/lib/module/push/sealedPushTask.js +20 -1
- package/lib/module/push/sealedPushTask.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/components/MainComponents/AlbumGrid.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MediaMessage.d.ts +3 -1
- package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/Message.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ChatMediaGrid.d.ts +16 -0
- package/lib/typescript/components/Modals/ChatProfileModal/ChatMediaGrid.d.ts.map +1 -0
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/LeaveChatModal.d.ts +18 -0
- package/lib/typescript/components/Modals/ChatProfileModal/LeaveChatModal.d.ts.map +1 -0
- package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts +16 -0
- package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/FilePreviewModal/MediaViewer.d.ts +27 -0
- package/lib/typescript/components/Modals/FilePreviewModal/MediaViewer.d.ts.map +1 -0
- package/lib/typescript/components/Modals/FilePreviewModal/useSaveFile.d.ts +9 -0
- package/lib/typescript/components/Modals/FilePreviewModal/useSaveFile.d.ts.map +1 -0
- package/lib/typescript/components/Modals/MessageSearchModal/MessageSearchModal.d.ts +8 -0
- package/lib/typescript/components/Modals/MessageSearchModal/MessageSearchModal.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/useCallKeep.d.ts.map +1 -1
- package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
- package/lib/typescript/components/styled/VideoMessage.d.ts.map +1 -1
- package/lib/typescript/context/MediaSourceContext.d.ts +4 -0
- package/lib/typescript/context/MediaSourceContext.d.ts.map +1 -0
- package/lib/typescript/helpers/constants/MODAL_COMPONENTS.d.ts.map +1 -1
- package/lib/typescript/helpers/constants/MODAL_TYPES.d.ts +2 -0
- package/lib/typescript/helpers/constants/MODAL_TYPES.d.ts.map +1 -1
- package/lib/typescript/helpers/publicChatsEntry.d.ts +7 -5
- package/lib/typescript/helpers/publicChatsEntry.d.ts.map +1 -1
- package/lib/typescript/helpers/roomMedia.d.ts +26 -0
- package/lib/typescript/helpers/roomMedia.d.ts.map +1 -0
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/main.d.ts +1 -1
- package/lib/typescript/main.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts +6 -5
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/networking/callTokenStanza.d.ts.map +1 -1
- package/lib/typescript/push/sealedPushTask.d.ts +13 -0
- package/lib/typescript/push/sealedPushTask.d.ts.map +1 -1
- package/lib/typescript/types/models/modal.model.d.ts +18 -0
- package/lib/typescript/types/models/modal.model.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +18 -0
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/lib/typescript/version.d.ts.map +1 -1
- package/package.json +9 -2
- package/plugins/notification-service/NotificationService.swift +105 -19
- package/plugins/withNotificationServiceExtension.js +44 -4
- package/src/components/MainComponents/AlbumGrid.tsx +5 -1
- package/src/components/MainComponents/ChatHeader.tsx +16 -11
- package/src/components/MainComponents/MediaMessage.tsx +13 -2
- package/src/components/MainComponents/RoomList.tsx +8 -19
- package/src/components/Menu/HeaderRoomListMenu.tsx +13 -8
- package/src/components/MessageBubble/Message.tsx +24 -1
- package/src/components/Modals/ChatProfileModal/ChatMediaGrid.tsx +174 -0
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +119 -48
- package/src/components/Modals/ChatProfileModal/LeaveChatModal.tsx +191 -0
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +115 -185
- package/src/components/Modals/FilePreviewModal/MediaViewer.tsx +880 -0
- package/src/components/Modals/FilePreviewModal/useSaveFile.ts +207 -0
- package/src/components/Modals/MessageSearchModal/MessageSearchModal.tsx +56 -30
- package/src/components/VideoCalls/useCallKeep.ts +2 -4
- package/src/components/styled/MessageImage.tsx +3 -1
- package/src/components/styled/VideoMessage.tsx +5 -1
- package/src/context/MediaSourceContext.tsx +14 -0
- package/src/helpers/constants/MODAL_COMPONENTS.tsx +4 -1
- package/src/helpers/constants/MODAL_TYPES.ts +2 -0
- package/src/helpers/publicChatsEntry.ts +8 -7
- package/src/helpers/roomMedia.ts +126 -0
- package/src/i18n/strings.ts +36 -0
- package/src/main.ts +1 -1
- package/src/networking/api-requests/rooms.api.ts +13 -12
- package/src/networking/callTokenStanza.ts +10 -1
- package/src/push/sealedPushTask.ts +34 -1
- package/src/types/models/modal.model.ts +16 -0
- package/src/types/types.ts +16 -0
- package/src/version.ts +1 -1
package/src/i18n/strings.ts
CHANGED
|
@@ -159,6 +159,9 @@ const en: UiStringTable = {
|
|
|
159
159
|
'action.cancel': 'Cancel',
|
|
160
160
|
'action.save': 'Save',
|
|
161
161
|
'action.delete': 'Delete',
|
|
162
|
+
'action.reply': 'Reply',
|
|
163
|
+
'video.cantPlay': 'This video can\'t be played',
|
|
164
|
+
'video.cantPlayHint': 'Tap the save icon above to download it.',
|
|
162
165
|
'action.leave': 'Leave',
|
|
163
166
|
'action.muted': 'Muted',
|
|
164
167
|
'action.unmuted': 'Unmuted',
|
|
@@ -291,6 +294,8 @@ const en: UiStringTable = {
|
|
|
291
294
|
'modal.chatProfile.removePhoto': 'Remove photo',
|
|
292
295
|
'modal.chatProfile.membersLabel': 'Members: {count}',
|
|
293
296
|
'modal.chatProfile.membersUnavailable': 'Member list unavailable',
|
|
297
|
+
'modal.chatProfile.media': 'Media',
|
|
298
|
+
'modal.chatProfile.mediaEmpty': 'No photos or videos yet',
|
|
294
299
|
'modal.chatProfile.removeMember': 'Remove from this chat?',
|
|
295
300
|
'modal.chatProfile.memberListUnavailable': 'Member list unavailable',
|
|
296
301
|
'modal.deleteChat.title': 'Delete this chat ?',
|
|
@@ -300,6 +305,7 @@ const en: UiStringTable = {
|
|
|
300
305
|
'modal.addMembers.userIdPlaceholder': 'Enter User Id',
|
|
301
306
|
'modal.leaveChat.title': 'Leave Chat',
|
|
302
307
|
'modal.leaveChat.description': 'Are you sure you want to leave this chat?',
|
|
308
|
+
'modal.leaveChat.descriptionNamed': 'Are you sure you want to leave {name}?',
|
|
303
309
|
'modal.report.chatTitle': 'Report Chat',
|
|
304
310
|
'modal.report.messageTitle': 'Report Message',
|
|
305
311
|
'modal.report.otherDetails': 'Please enter additional details relevant to your report.',
|
|
@@ -564,6 +570,9 @@ const fr: UiStringTable = {
|
|
|
564
570
|
'action.cancel': 'Annuler',
|
|
565
571
|
'action.save': 'Enregistrer',
|
|
566
572
|
'action.delete': 'Supprimer',
|
|
573
|
+
'action.reply': 'Répondre',
|
|
574
|
+
'video.cantPlay': 'Impossible de lire cette vidéo',
|
|
575
|
+
'video.cantPlayHint': 'Touchez l\'icône d\'enregistrement en haut pour la télécharger.',
|
|
567
576
|
'action.leave': 'Quitter',
|
|
568
577
|
'action.muted': 'En sourdine',
|
|
569
578
|
'action.unmuted': 'Activé',
|
|
@@ -696,6 +705,8 @@ const fr: UiStringTable = {
|
|
|
696
705
|
'modal.chatProfile.removePhoto': 'Supprimer la photo',
|
|
697
706
|
'modal.chatProfile.membersLabel': 'Membres : {count}',
|
|
698
707
|
'modal.chatProfile.membersUnavailable': 'Liste des membres indisponible',
|
|
708
|
+
'modal.chatProfile.media': 'Médias',
|
|
709
|
+
'modal.chatProfile.mediaEmpty': 'Aucune photo ni vidéo pour l\'instant',
|
|
699
710
|
'modal.chatProfile.removeMember': 'Retirer de cette discussion ?',
|
|
700
711
|
'modal.chatProfile.memberListUnavailable': 'Liste des membres indisponible',
|
|
701
712
|
'modal.deleteChat.title': 'Supprimer cette discussion ?',
|
|
@@ -705,6 +716,7 @@ const fr: UiStringTable = {
|
|
|
705
716
|
'modal.addMembers.userIdPlaceholder': "Entrez l'ID utilisateur",
|
|
706
717
|
'modal.leaveChat.title': 'Quitter la discussion',
|
|
707
718
|
'modal.leaveChat.description': 'Voulez-vous vraiment quitter cette discussion ?',
|
|
719
|
+
'modal.leaveChat.descriptionNamed': 'Voulez-vous vraiment quitter {name} ?',
|
|
708
720
|
'modal.report.chatTitle': 'Signaler la discussion',
|
|
709
721
|
'modal.report.messageTitle': 'Signaler le message',
|
|
710
722
|
'modal.report.otherDetails': 'Veuillez indiquer des détails supplémentaires concernant votre signalement.',
|
|
@@ -969,6 +981,9 @@ const es: UiStringTable = {
|
|
|
969
981
|
'action.cancel': 'Cancelar',
|
|
970
982
|
'action.save': 'Guardar',
|
|
971
983
|
'action.delete': 'Eliminar',
|
|
984
|
+
'action.reply': 'Responder',
|
|
985
|
+
'video.cantPlay': 'No se puede reproducir este video',
|
|
986
|
+
'video.cantPlayHint': 'Toca el icono de guardar de arriba para descargarlo.',
|
|
972
987
|
'action.leave': 'Salir',
|
|
973
988
|
'action.muted': 'Silenciado',
|
|
974
989
|
'action.unmuted': 'Activado',
|
|
@@ -1101,6 +1116,8 @@ const es: UiStringTable = {
|
|
|
1101
1116
|
'modal.chatProfile.removePhoto': 'Quitar la foto',
|
|
1102
1117
|
'modal.chatProfile.membersLabel': 'Miembros: {count}',
|
|
1103
1118
|
'modal.chatProfile.membersUnavailable': 'Lista de miembros no disponible',
|
|
1119
|
+
'modal.chatProfile.media': 'Multimedia',
|
|
1120
|
+
'modal.chatProfile.mediaEmpty': 'Aún no hay fotos ni videos',
|
|
1104
1121
|
'modal.chatProfile.removeMember': '¿Quitar de este chat?',
|
|
1105
1122
|
'modal.chatProfile.memberListUnavailable': 'Lista de miembros no disponible',
|
|
1106
1123
|
'modal.deleteChat.title': '¿Eliminar este chat?',
|
|
@@ -1110,6 +1127,7 @@ const es: UiStringTable = {
|
|
|
1110
1127
|
'modal.addMembers.userIdPlaceholder': 'Introduce el ID de usuario',
|
|
1111
1128
|
'modal.leaveChat.title': 'Salir del chat',
|
|
1112
1129
|
'modal.leaveChat.description': '¿Seguro que quieres salir de este chat?',
|
|
1130
|
+
'modal.leaveChat.descriptionNamed': '¿Seguro que quieres salir de {name}?',
|
|
1113
1131
|
'modal.report.chatTitle': 'Reportar chat',
|
|
1114
1132
|
'modal.report.messageTitle': 'Reportar mensaje',
|
|
1115
1133
|
'modal.report.otherDetails': 'Introduce detalles adicionales relevantes para tu reporte.',
|
|
@@ -1374,6 +1392,9 @@ const pt: UiStringTable = {
|
|
|
1374
1392
|
'action.cancel': 'Cancelar',
|
|
1375
1393
|
'action.save': 'Guardar',
|
|
1376
1394
|
'action.delete': 'Eliminar',
|
|
1395
|
+
'action.reply': 'Responder',
|
|
1396
|
+
'video.cantPlay': 'Não é possível reproduzir este vídeo',
|
|
1397
|
+
'video.cantPlayHint': 'Toque no ícone de guardar acima para o transferir.',
|
|
1377
1398
|
'action.leave': 'Sair',
|
|
1378
1399
|
'action.muted': 'Muted',
|
|
1379
1400
|
'action.unmuted': 'Unmuted',
|
|
@@ -1506,6 +1527,8 @@ const pt: UiStringTable = {
|
|
|
1506
1527
|
'modal.chatProfile.removePhoto': 'Remover foto',
|
|
1507
1528
|
'modal.chatProfile.membersLabel': 'Membros: {count}',
|
|
1508
1529
|
'modal.chatProfile.membersUnavailable': 'Lista de membros indisponível',
|
|
1530
|
+
'modal.chatProfile.media': 'Multimédia',
|
|
1531
|
+
'modal.chatProfile.mediaEmpty': 'Ainda não há fotos nem vídeos',
|
|
1509
1532
|
'modal.chatProfile.removeMember': 'Remover deste chat?',
|
|
1510
1533
|
'modal.chatProfile.memberListUnavailable': 'Lista de membros indisponível',
|
|
1511
1534
|
'modal.deleteChat.title': 'Eliminar este chat?',
|
|
@@ -1515,6 +1538,7 @@ const pt: UiStringTable = {
|
|
|
1515
1538
|
'modal.addMembers.userIdPlaceholder': 'Introduza o ID do utilizador',
|
|
1516
1539
|
'modal.leaveChat.title': 'Sair do chat',
|
|
1517
1540
|
'modal.leaveChat.description': 'Tem a certeza de que quer sair deste chat?',
|
|
1541
|
+
'modal.leaveChat.descriptionNamed': 'Tem a certeza de que quer sair de {name}?',
|
|
1518
1542
|
'modal.report.chatTitle': 'Denunciar chat',
|
|
1519
1543
|
'modal.report.messageTitle': 'Denunciar mensagem',
|
|
1520
1544
|
'modal.report.otherDetails': 'Indique detalhes adicionais relevantes para a sua denúncia.',
|
|
@@ -1779,6 +1803,9 @@ const ht: UiStringTable = {
|
|
|
1779
1803
|
'action.cancel': 'Anile',
|
|
1780
1804
|
'action.save': 'Anrejistre',
|
|
1781
1805
|
'action.delete': 'Efase',
|
|
1806
|
+
'action.reply': 'Reponn',
|
|
1807
|
+
'video.cantPlay': 'Videyo sa a pa ka jwe',
|
|
1808
|
+
'video.cantPlayHint': 'Peze ikòn sove anwo a pou telechaje li.',
|
|
1782
1809
|
'action.leave': 'Kite',
|
|
1783
1810
|
'action.muted': 'Muted',
|
|
1784
1811
|
'action.unmuted': 'Unmuted',
|
|
@@ -1911,6 +1938,8 @@ const ht: UiStringTable = {
|
|
|
1911
1938
|
'modal.chatProfile.removePhoto': 'Retire foto a',
|
|
1912
1939
|
'modal.chatProfile.membersLabel': 'Manm: {count}',
|
|
1913
1940
|
'modal.chatProfile.membersUnavailable': 'Lis manm yo pa disponib',
|
|
1941
|
+
'modal.chatProfile.media': 'Medya',
|
|
1942
|
+
'modal.chatProfile.mediaEmpty': 'Poko gen foto ni videyo',
|
|
1914
1943
|
'modal.chatProfile.removeMember': 'Retire nan chat sa a?',
|
|
1915
1944
|
'modal.chatProfile.memberListUnavailable': 'Lis manm yo pa disponib',
|
|
1916
1945
|
'modal.deleteChat.title': 'Efase chat sa a?',
|
|
@@ -1920,6 +1949,7 @@ const ht: UiStringTable = {
|
|
|
1920
1949
|
'modal.addMembers.userIdPlaceholder': 'Antre ID itilizatè a',
|
|
1921
1950
|
'modal.leaveChat.title': 'Kite chat la',
|
|
1922
1951
|
'modal.leaveChat.description': 'Èske ou sèten ou vle kite chat sa a?',
|
|
1952
|
+
'modal.leaveChat.descriptionNamed': 'Èske ou sèten ou vle kite {name}?',
|
|
1923
1953
|
'modal.report.chatTitle': 'Rapòte chat la',
|
|
1924
1954
|
'modal.report.messageTitle': 'Rapòte mesaj la',
|
|
1925
1955
|
'modal.report.otherDetails': 'Tanpri antre detay anplis ki gen rapò ak rapò ou a.',
|
|
@@ -2184,6 +2214,9 @@ const zh: UiStringTable = {
|
|
|
2184
2214
|
'action.cancel': '取消',
|
|
2185
2215
|
'action.save': '保存',
|
|
2186
2216
|
'action.delete': '删除',
|
|
2217
|
+
'action.reply': '回复',
|
|
2218
|
+
'video.cantPlay': '无法播放此视频',
|
|
2219
|
+
'video.cantPlayHint': '点击上方的保存图标下载。',
|
|
2187
2220
|
'action.leave': '退出',
|
|
2188
2221
|
'action.muted': 'Muted',
|
|
2189
2222
|
'action.unmuted': 'Unmuted',
|
|
@@ -2316,6 +2349,8 @@ const zh: UiStringTable = {
|
|
|
2316
2349
|
'modal.chatProfile.removePhoto': '移除图片',
|
|
2317
2350
|
'modal.chatProfile.membersLabel': '成员:{count}',
|
|
2318
2351
|
'modal.chatProfile.membersUnavailable': '成员列表不可用',
|
|
2352
|
+
'modal.chatProfile.media': '媒体',
|
|
2353
|
+
'modal.chatProfile.mediaEmpty': '暂无图片或视频',
|
|
2319
2354
|
'modal.chatProfile.removeMember': '将其移出该聊天?',
|
|
2320
2355
|
'modal.chatProfile.memberListUnavailable': '成员列表不可用',
|
|
2321
2356
|
'modal.deleteChat.title': '删除此聊天?',
|
|
@@ -2325,6 +2360,7 @@ const zh: UiStringTable = {
|
|
|
2325
2360
|
'modal.addMembers.userIdPlaceholder': '输入用户 ID',
|
|
2326
2361
|
'modal.leaveChat.title': '退出聊天',
|
|
2327
2362
|
'modal.leaveChat.description': '确定要退出此聊天吗?',
|
|
2363
|
+
'modal.leaveChat.descriptionNamed': '确定要退出 {name} 吗?',
|
|
2328
2364
|
'modal.report.chatTitle': '举报聊天',
|
|
2329
2365
|
'modal.report.messageTitle': '举报消息',
|
|
2330
2366
|
'modal.report.otherDetails': '请填写与您举报相关的补充信息。',
|
package/src/main.ts
CHANGED
|
@@ -81,7 +81,7 @@ export {
|
|
|
81
81
|
presentSealedPush,
|
|
82
82
|
SEALED_PUSH_TASK,
|
|
83
83
|
} from './push/sealedPushTask';
|
|
84
|
-
export type { SealedPushTaskOptions } from './push/sealedPushTask';
|
|
84
|
+
export type { SealedPushTaskOptions, ShownMessagePush } from './push/sealedPushTask';
|
|
85
85
|
export {
|
|
86
86
|
openSealedPush,
|
|
87
87
|
isSealedPush,
|
|
@@ -497,24 +497,25 @@ export async function deleteRoomMember(data: DeleteRoomMember) {
|
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
/**
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
*
|
|
500
|
+
* Leave a chat on the server: `PUT /v1/chats/my/{chatName}/leave` sets the
|
|
501
|
+
* `left` flag on the caller's own membership, and /chats/my stops listing
|
|
502
|
+
* the room. The unavailable presence alone only leaves the MUC for this
|
|
503
|
+
* session, the next /chats/my would bring the chat back. Not
|
|
504
|
+
* `DELETE /users-access`: that one is owner-only and refuses self-removal.
|
|
505
|
+
* A 404 means we are not a member any more, which is what we wanted.
|
|
505
506
|
*/
|
|
506
507
|
export async function leaveRoom(chatName: string): Promise<void> {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
throw new Error('Cannot leave the chat: no chat name or user');
|
|
508
|
+
if (!chatName) {
|
|
509
|
+
throw new Error('Cannot leave the chat: no chat name');
|
|
510
510
|
}
|
|
511
511
|
const token = store.getState().chatSettingStore.user.token || '';
|
|
512
512
|
invalidateRoomsCache();
|
|
513
513
|
try {
|
|
514
|
-
await http.
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
514
|
+
await http.put(
|
|
515
|
+
`/v1/chats/my/${encodeURIComponent(chatName)}/leave`,
|
|
516
|
+
{},
|
|
517
|
+
{ headers: { Authorization: token } }
|
|
518
|
+
);
|
|
518
519
|
} catch (error: any) {
|
|
519
520
|
if (error?.response?.status !== 404) {throw error;}
|
|
520
521
|
} finally {
|
|
@@ -310,6 +310,8 @@ const handleCallStateData = (
|
|
|
310
310
|
!!currentCall.callId &&
|
|
311
311
|
currentCall.callId === stanzaCallId;
|
|
312
312
|
|
|
313
|
+
if (stanzaCallId && currentCall.callId && !callIdMatches) {return;}
|
|
314
|
+
|
|
313
315
|
const isTerminalState =
|
|
314
316
|
state === 'ended' ||
|
|
315
317
|
state === 'declined' ||
|
|
@@ -381,7 +383,7 @@ export const onCallTokenMessage = (stanza: Element): boolean => {
|
|
|
381
383
|
.split('/')[0]
|
|
382
384
|
.split('@')[0]
|
|
383
385
|
.trim();
|
|
384
|
-
handleCallStateData(
|
|
386
|
+
handleCallStateData(data, fromRoom);
|
|
385
387
|
|
|
386
388
|
// Server call-logs (carry callerXmppUsername / durationMs) should
|
|
387
389
|
// flow on to onRealtimeMessage / onMessageHistory where they become
|
|
@@ -394,6 +396,13 @@ export const onCallTokenMessage = (stanza: Element): boolean => {
|
|
|
394
396
|
return true;
|
|
395
397
|
}
|
|
396
398
|
|
|
399
|
+
if (dataType === 'call-state-declined') {
|
|
400
|
+
handleCallStateData({
|
|
401
|
+
attrs: { ...data.attrs, state: 'declined' },
|
|
402
|
+
} as unknown as Element);
|
|
403
|
+
return true;
|
|
404
|
+
}
|
|
405
|
+
|
|
397
406
|
if (dataType === 'call-invite') {
|
|
398
407
|
const inviteKind = String(data.attrs?.kind || '').toLowerCase();
|
|
399
408
|
const normalized: 'audio' | 'video' =
|
|
@@ -40,6 +40,20 @@ export interface SealedPushTaskOptions {
|
|
|
40
40
|
* where the XMPP invite rings the in-app call screen.
|
|
41
41
|
*/
|
|
42
42
|
onCallPush?: (data: Record<string, unknown>) => void | Promise<void>;
|
|
43
|
+
onMessageShown?: (shown: ShownMessagePush) => void | Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ShownMessagePush {
|
|
47
|
+
identifier: string;
|
|
48
|
+
channelId?: string;
|
|
49
|
+
title: string;
|
|
50
|
+
body: string;
|
|
51
|
+
sender: string;
|
|
52
|
+
senderJid: string;
|
|
53
|
+
chat: string;
|
|
54
|
+
chatJid: string;
|
|
55
|
+
image: string;
|
|
56
|
+
reaction: boolean;
|
|
43
57
|
}
|
|
44
58
|
|
|
45
59
|
const PLACEHOLDER_TITLE = 'New message';
|
|
@@ -157,11 +171,30 @@ export async function presentSealedPush(
|
|
|
157
171
|
const base = envelope.jid || envelope.msgID || '';
|
|
158
172
|
const identifier = base ? (reaction ? `${base}#reaction` : base) : undefined;
|
|
159
173
|
const channelId = (reaction && options.reactionChannelId) || options.channelId;
|
|
174
|
+
const content = notificationContent(result, options);
|
|
160
175
|
await notifications.scheduleNotificationAsync({
|
|
161
176
|
identifier,
|
|
162
|
-
content
|
|
177
|
+
content,
|
|
163
178
|
trigger: channelId ? { channelId } : null,
|
|
164
179
|
});
|
|
180
|
+
if (result.ok && result.content.image && identifier && options.onMessageShown) {
|
|
181
|
+
try {
|
|
182
|
+
await options.onMessageShown({
|
|
183
|
+
identifier,
|
|
184
|
+
channelId,
|
|
185
|
+
title: content.title,
|
|
186
|
+
body: content.body ?? '',
|
|
187
|
+
sender: result.content.sender,
|
|
188
|
+
senderJid: result.content.senderJid,
|
|
189
|
+
chat: result.content.chat,
|
|
190
|
+
chatJid: result.content.chatJid,
|
|
191
|
+
image: result.content.image,
|
|
192
|
+
reaction,
|
|
193
|
+
});
|
|
194
|
+
} catch (e) {
|
|
195
|
+
pushLog('warn', 'push: drawing the sender avatar failed', e);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
165
198
|
return result;
|
|
166
199
|
}
|
|
167
200
|
|
|
@@ -16,4 +16,20 @@ export interface ModalFile {
|
|
|
16
16
|
siblings?: ModalFile[];
|
|
17
17
|
/** Position of this file in `siblings`. */
|
|
18
18
|
index?: number;
|
|
19
|
+
/** The message the file came from, for the viewer's Reply and Delete. */
|
|
20
|
+
source?: ModalFileSource;
|
|
21
|
+
/** Poster frame of a video, for grids that show it before it plays. */
|
|
22
|
+
previewURL?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ModalFileSource {
|
|
26
|
+
messageId: string;
|
|
27
|
+
roomJid: string;
|
|
28
|
+
/** Sent by the signed-in user: the viewer offers Delete. */
|
|
29
|
+
own?: boolean;
|
|
30
|
+
/** The thread the viewer's Reply opens; absent where replies are off. */
|
|
31
|
+
replyTo?: { id: string; chatJID: string };
|
|
32
|
+
senderName?: string;
|
|
33
|
+
/** When it was sent, ms since epoch. */
|
|
34
|
+
timestamp?: number;
|
|
19
35
|
}
|
package/src/types/types.ts
CHANGED
|
@@ -1162,6 +1162,22 @@ export interface ModalFile {
|
|
|
1162
1162
|
siblings?: ModalFile[];
|
|
1163
1163
|
/** Position of this file in `siblings`. */
|
|
1164
1164
|
index?: number;
|
|
1165
|
+
/** The message the file came from, for the viewer's Reply and Delete. */
|
|
1166
|
+
source?: ModalFileSource;
|
|
1167
|
+
/** Poster frame of a video, for grids that show it before it plays. */
|
|
1168
|
+
previewURL?: string;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
export interface ModalFileSource {
|
|
1172
|
+
messageId: string;
|
|
1173
|
+
roomJid: string;
|
|
1174
|
+
/** Sent by the signed-in user: the viewer offers Delete. */
|
|
1175
|
+
own?: boolean;
|
|
1176
|
+
/** The thread the viewer's Reply opens; absent where replies are off. */
|
|
1177
|
+
replyTo?: { id: string; chatJID: string };
|
|
1178
|
+
senderName?: string;
|
|
1179
|
+
/** When it was sent, ms since epoch. */
|
|
1180
|
+
timestamp?: number;
|
|
1165
1181
|
}
|
|
1166
1182
|
|
|
1167
1183
|
// Re-export so middleware/hooks that historically import from `types`
|
package/src/version.ts
CHANGED