@ethora/chat-component-rn 26.10.4 → 26.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +15 -0
  3. package/app.plugin.js +2 -0
  4. package/lib/commonjs/assets/icons.js +2 -2
  5. package/lib/commonjs/assets/icons.js.map +1 -1
  6. package/lib/commonjs/components/MainComponents/AlbumGrid.js +152 -0
  7. package/lib/commonjs/components/MainComponents/AlbumGrid.js.map +1 -0
  8. package/lib/commonjs/components/MainComponents/ChatRoom.js +2 -2
  9. package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
  10. package/lib/commonjs/components/MainComponents/MediaMessage.js +199 -123
  11. package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
  12. package/lib/commonjs/components/MainComponents/MediaUploadOverlay.js +109 -0
  13. package/lib/commonjs/components/MainComponents/MediaUploadOverlay.js.map +1 -0
  14. package/lib/commonjs/components/MessageBubble/MediaCaption.js +51 -0
  15. package/lib/commonjs/components/MessageBubble/MediaCaption.js.map +1 -0
  16. package/lib/commonjs/components/MessageBubble/Message.js +40 -1
  17. package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
  18. package/lib/commonjs/components/MessageBubble/MessageInteractions.js +2 -1
  19. package/lib/commonjs/components/MessageBubble/MessageInteractions.js.map +1 -1
  20. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +75 -0
  21. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  22. package/lib/commonjs/components/RoomComponents/LastMessageItem.js +20 -4
  23. package/lib/commonjs/components/RoomComponents/LastMessageItem.js.map +1 -1
  24. package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js +3 -2
  25. package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
  26. package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js +3 -2
  27. package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
  28. package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js +3 -2
  29. package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
  30. package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js +3 -2
  31. package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
  32. package/lib/commonjs/components/Thread/ThreadWrapper.js +3 -2
  33. package/lib/commonjs/components/Thread/ThreadWrapper.js.map +1 -1
  34. package/lib/commonjs/components/VideoCalls/ActiveCallBar.js +61 -16
  35. package/lib/commonjs/components/VideoCalls/ActiveCallBar.js.map +1 -1
  36. package/lib/commonjs/components/VideoCalls/CallIcons.js +41 -16
  37. package/lib/commonjs/components/VideoCalls/CallIcons.js.map +1 -1
  38. package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js +183 -9
  39. package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js.map +1 -1
  40. package/lib/commonjs/components/VideoCalls/VideoCallSession.js +40 -15
  41. package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
  42. package/lib/commonjs/components/VideoCalls/callSessionController.js +49 -26
  43. package/lib/commonjs/components/VideoCalls/callSessionController.js.map +1 -1
  44. package/lib/commonjs/components/VideoCalls/callUiStore.js +33 -4
  45. package/lib/commonjs/components/VideoCalls/callUiStore.js.map +1 -1
  46. package/lib/commonjs/components/VideoCalls/livekitRuntime.js +9 -1
  47. package/lib/commonjs/components/VideoCalls/livekitRuntime.js.map +1 -1
  48. package/lib/commonjs/components/VideoCalls/useCallKeep.js +197 -28
  49. package/lib/commonjs/components/VideoCalls/useCallKeep.js.map +1 -1
  50. package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js +88 -0
  51. package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js.map +1 -0
  52. package/lib/commonjs/components/VideoCalls/usePipTile.js +232 -0
  53. package/lib/commonjs/components/VideoCalls/usePipTile.js.map +1 -0
  54. package/lib/commonjs/components/styled/MediaFilePreview.js +60 -47
  55. package/lib/commonjs/components/styled/MediaFilePreview.js.map +1 -1
  56. package/lib/commonjs/components/styled/MessageImage.js +16 -6
  57. package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
  58. package/lib/commonjs/components/styled/SendInput.js +99 -68
  59. package/lib/commonjs/components/styled/SendInput.js.map +1 -1
  60. package/lib/commonjs/components/styled/VideoMessage.js +24 -10
  61. package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
  62. package/lib/commonjs/context/xmppProvider.js +46 -0
  63. package/lib/commonjs/context/xmppProvider.js.map +1 -1
  64. package/lib/commonjs/e2ee/fileEnvelope.js +6 -0
  65. package/lib/commonjs/e2ee/fileEnvelope.js.map +1 -1
  66. package/lib/commonjs/e2ee/sealedBody.js +32 -2
  67. package/lib/commonjs/e2ee/sealedBody.js.map +1 -1
  68. package/lib/commonjs/helpers/albumLayout.js +150 -0
  69. package/lib/commonjs/helpers/albumLayout.js.map +1 -0
  70. package/lib/commonjs/helpers/attachments.js +255 -0
  71. package/lib/commonjs/helpers/attachments.js.map +1 -0
  72. package/lib/commonjs/helpers/caption.js +214 -0
  73. package/lib/commonjs/helpers/caption.js.map +1 -0
  74. package/lib/commonjs/helpers/createMainMessageForThread.js +5 -1
  75. package/lib/commonjs/helpers/createMainMessageForThread.js.map +1 -1
  76. package/lib/commonjs/helpers/createMessageFromXml.js +19 -5
  77. package/lib/commonjs/helpers/createMessageFromXml.js.map +1 -1
  78. package/lib/commonjs/helpers/fileKind.js +40 -0
  79. package/lib/commonjs/helpers/fileKind.js.map +1 -0
  80. package/lib/commonjs/helpers/getDataFromXml.js +6 -1
  81. package/lib/commonjs/helpers/getDataFromXml.js.map +1 -1
  82. package/lib/commonjs/helpers/mapWithConcurrency.js +41 -0
  83. package/lib/commonjs/helpers/mapWithConcurrency.js.map +1 -0
  84. package/lib/commonjs/helpers/mediaLimits.js +33 -0
  85. package/lib/commonjs/helpers/mediaLimits.js.map +1 -0
  86. package/lib/commonjs/helpers/mediaSendRetry.js +64 -0
  87. package/lib/commonjs/helpers/mediaSendRetry.js.map +1 -0
  88. package/lib/commonjs/helpers/mediaWireData.js +62 -0
  89. package/lib/commonjs/helpers/mediaWireData.js.map +1 -0
  90. package/lib/commonjs/helpers/mentionSpans.js +19 -0
  91. package/lib/commonjs/helpers/mentionSpans.js.map +1 -0
  92. package/lib/commonjs/helpers/mimeToExtension.js +45 -0
  93. package/lib/commonjs/helpers/mimeToExtension.js.map +1 -1
  94. package/lib/commonjs/helpers/readReceipts.js +173 -0
  95. package/lib/commonjs/helpers/readReceipts.js.map +1 -0
  96. package/lib/commonjs/helpers/repairFilenameEncoding.js +79 -0
  97. package/lib/commonjs/helpers/repairFilenameEncoding.js.map +1 -0
  98. package/lib/commonjs/helpers/safeJson.js +18 -0
  99. package/lib/commonjs/helpers/safeJson.js.map +1 -0
  100. package/lib/commonjs/helpers/updateMessagesTillLast.js +3 -1
  101. package/lib/commonjs/helpers/updateMessagesTillLast.js.map +1 -1
  102. package/lib/commonjs/hooks/useSendMessage.js +384 -193
  103. package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
  104. package/lib/commonjs/i18n/strings.js +144 -0
  105. package/lib/commonjs/i18n/strings.js.map +1 -1
  106. package/lib/commonjs/main.js.map +1 -1
  107. package/lib/commonjs/networking/api-requests/auth.api.js +62 -3
  108. package/lib/commonjs/networking/api-requests/auth.api.js.map +1 -1
  109. package/lib/commonjs/networking/stanzaHandlers.js +100 -3
  110. package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
  111. package/lib/commonjs/networking/xmpp/handleStanzas.xmpp.js +4 -2
  112. package/lib/commonjs/networking/xmpp/handleStanzas.xmpp.js.map +1 -1
  113. package/lib/commonjs/networking/xmpp/sendDisplayedMarker.xmpp.js +28 -0
  114. package/lib/commonjs/networking/xmpp/sendDisplayedMarker.xmpp.js.map +1 -0
  115. package/lib/commonjs/networking/xmpp/sendMediaMessage.xmpp.js +53 -2
  116. package/lib/commonjs/networking/xmpp/sendMediaMessage.xmpp.js.map +1 -1
  117. package/lib/commonjs/networking/xmpp/sendReceivedReceipt.xmpp.js +28 -0
  118. package/lib/commonjs/networking/xmpp/sendReceivedReceipt.xmpp.js.map +1 -0
  119. package/lib/commonjs/networking/xmppClient.js +64 -0
  120. package/lib/commonjs/networking/xmppClient.js.map +1 -1
  121. package/lib/commonjs/roomStore/persistence.js +78 -5
  122. package/lib/commonjs/roomStore/persistence.js.map +1 -1
  123. package/lib/commonjs/roomStore/roomHeapSlice.js +4 -0
  124. package/lib/commonjs/roomStore/roomHeapSlice.js.map +1 -1
  125. package/lib/commonjs/roomStore/roomsSlice.js +114 -1
  126. package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
  127. package/lib/commonjs/types/models/attachment.model.js +2 -0
  128. package/lib/commonjs/types/models/attachment.model.js.map +1 -0
  129. package/lib/commonjs/version.js +1 -1
  130. package/lib/module/assets/icons.js +1 -1
  131. package/lib/module/assets/icons.js.map +1 -1
  132. package/lib/module/components/MainComponents/AlbumGrid.js +146 -0
  133. package/lib/module/components/MainComponents/AlbumGrid.js.map +1 -0
  134. package/lib/module/components/MainComponents/ChatRoom.js +2 -2
  135. package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
  136. package/lib/module/components/MainComponents/MediaMessage.js +200 -124
  137. package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
  138. package/lib/module/components/MainComponents/MediaUploadOverlay.js +104 -0
  139. package/lib/module/components/MainComponents/MediaUploadOverlay.js.map +1 -0
  140. package/lib/module/components/MessageBubble/MediaCaption.js +46 -0
  141. package/lib/module/components/MessageBubble/MediaCaption.js.map +1 -0
  142. package/lib/module/components/MessageBubble/Message.js +44 -5
  143. package/lib/module/components/MessageBubble/Message.js.map +1 -1
  144. package/lib/module/components/MessageBubble/MessageInteractions.js +2 -1
  145. package/lib/module/components/MessageBubble/MessageInteractions.js.map +1 -1
  146. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +75 -0
  147. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  148. package/lib/module/components/RoomComponents/LastMessageItem.js +20 -4
  149. package/lib/module/components/RoomComponents/LastMessageItem.js.map +1 -1
  150. package/lib/module/components/RoomComponents/styled/LastAudioMessage.js +3 -2
  151. package/lib/module/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
  152. package/lib/module/components/RoomComponents/styled/LastMessageFile.js +3 -2
  153. package/lib/module/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
  154. package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js +3 -2
  155. package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
  156. package/lib/module/components/RoomComponents/styled/LastMessageVideo.js +3 -2
  157. package/lib/module/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
  158. package/lib/module/components/Thread/ThreadWrapper.js +3 -2
  159. package/lib/module/components/Thread/ThreadWrapper.js.map +1 -1
  160. package/lib/module/components/VideoCalls/ActiveCallBar.js +63 -18
  161. package/lib/module/components/VideoCalls/ActiveCallBar.js.map +1 -1
  162. package/lib/module/components/VideoCalls/CallIcons.js +38 -15
  163. package/lib/module/components/VideoCalls/CallIcons.js.map +1 -1
  164. package/lib/module/components/VideoCalls/VideoCallOverlay.js +185 -11
  165. package/lib/module/components/VideoCalls/VideoCallOverlay.js.map +1 -1
  166. package/lib/module/components/VideoCalls/VideoCallSession.js +41 -16
  167. package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
  168. package/lib/module/components/VideoCalls/callSessionController.js +46 -24
  169. package/lib/module/components/VideoCalls/callSessionController.js.map +1 -1
  170. package/lib/module/components/VideoCalls/callUiStore.js +30 -3
  171. package/lib/module/components/VideoCalls/callUiStore.js.map +1 -1
  172. package/lib/module/components/VideoCalls/livekitRuntime.js +9 -1
  173. package/lib/module/components/VideoCalls/livekitRuntime.js.map +1 -1
  174. package/lib/module/components/VideoCalls/useCallKeep.js +198 -29
  175. package/lib/module/components/VideoCalls/useCallKeep.js.map +1 -1
  176. package/lib/module/components/VideoCalls/useOngoingCallNotification.js +84 -0
  177. package/lib/module/components/VideoCalls/useOngoingCallNotification.js.map +1 -0
  178. package/lib/module/components/VideoCalls/usePipTile.js +228 -0
  179. package/lib/module/components/VideoCalls/usePipTile.js.map +1 -0
  180. package/lib/module/components/styled/MediaFilePreview.js +61 -48
  181. package/lib/module/components/styled/MediaFilePreview.js.map +1 -1
  182. package/lib/module/components/styled/MessageImage.js +16 -6
  183. package/lib/module/components/styled/MessageImage.js.map +1 -1
  184. package/lib/module/components/styled/SendInput.js +99 -68
  185. package/lib/module/components/styled/SendInput.js.map +1 -1
  186. package/lib/module/components/styled/VideoMessage.js +24 -10
  187. package/lib/module/components/styled/VideoMessage.js.map +1 -1
  188. package/lib/module/context/xmppProvider.js +46 -0
  189. package/lib/module/context/xmppProvider.js.map +1 -1
  190. package/lib/module/e2ee/fileEnvelope.js +1 -1
  191. package/lib/module/e2ee/fileEnvelope.js.map +1 -1
  192. package/lib/module/e2ee/sealedBody.js +32 -2
  193. package/lib/module/e2ee/sealedBody.js.map +1 -1
  194. package/lib/module/helpers/albumLayout.js +143 -0
  195. package/lib/module/helpers/albumLayout.js.map +1 -0
  196. package/lib/module/helpers/attachments.js +245 -0
  197. package/lib/module/helpers/attachments.js.map +1 -0
  198. package/lib/module/helpers/caption.js +207 -0
  199. package/lib/module/helpers/caption.js.map +1 -0
  200. package/lib/module/helpers/createMainMessageForThread.js +5 -1
  201. package/lib/module/helpers/createMainMessageForThread.js.map +1 -1
  202. package/lib/module/helpers/createMessageFromXml.js +20 -6
  203. package/lib/module/helpers/createMessageFromXml.js.map +1 -1
  204. package/lib/module/helpers/fileKind.js +34 -0
  205. package/lib/module/helpers/fileKind.js.map +1 -0
  206. package/lib/module/helpers/getDataFromXml.js +6 -1
  207. package/lib/module/helpers/getDataFromXml.js.map +1 -1
  208. package/lib/module/helpers/mapWithConcurrency.js +37 -0
  209. package/lib/module/helpers/mapWithConcurrency.js.map +1 -0
  210. package/lib/module/helpers/mediaLimits.js +27 -0
  211. package/lib/module/helpers/mediaLimits.js.map +1 -0
  212. package/lib/module/helpers/mediaSendRetry.js +55 -0
  213. package/lib/module/helpers/mediaSendRetry.js.map +1 -0
  214. package/lib/module/helpers/mediaWireData.js +58 -0
  215. package/lib/module/helpers/mediaWireData.js.map +1 -0
  216. package/lib/module/helpers/mentionSpans.js +14 -0
  217. package/lib/module/helpers/mentionSpans.js.map +1 -0
  218. package/lib/module/helpers/mimeToExtension.js +43 -0
  219. package/lib/module/helpers/mimeToExtension.js.map +1 -1
  220. package/lib/module/helpers/readReceipts.js +160 -0
  221. package/lib/module/helpers/readReceipts.js.map +1 -0
  222. package/lib/module/helpers/repairFilenameEncoding.js +74 -0
  223. package/lib/module/helpers/repairFilenameEncoding.js.map +1 -0
  224. package/lib/module/helpers/safeJson.js +13 -0
  225. package/lib/module/helpers/safeJson.js.map +1 -0
  226. package/lib/module/helpers/updateMessagesTillLast.js +3 -1
  227. package/lib/module/helpers/updateMessagesTillLast.js.map +1 -1
  228. package/lib/module/hooks/useSendMessage.js +387 -195
  229. package/lib/module/hooks/useSendMessage.js.map +1 -1
  230. package/lib/module/i18n/strings.js +144 -0
  231. package/lib/module/i18n/strings.js.map +1 -1
  232. package/lib/module/main.js.map +1 -1
  233. package/lib/module/networking/api-requests/auth.api.js +62 -3
  234. package/lib/module/networking/api-requests/auth.api.js.map +1 -1
  235. package/lib/module/networking/stanzaHandlers.js +97 -4
  236. package/lib/module/networking/stanzaHandlers.js.map +1 -1
  237. package/lib/module/networking/xmpp/handleStanzas.xmpp.js +5 -3
  238. package/lib/module/networking/xmpp/handleStanzas.xmpp.js.map +1 -1
  239. package/lib/module/networking/xmpp/sendDisplayedMarker.xmpp.js +25 -0
  240. package/lib/module/networking/xmpp/sendDisplayedMarker.xmpp.js.map +1 -0
  241. package/lib/module/networking/xmpp/sendMediaMessage.xmpp.js +53 -2
  242. package/lib/module/networking/xmpp/sendMediaMessage.xmpp.js.map +1 -1
  243. package/lib/module/networking/xmpp/sendReceivedReceipt.xmpp.js +25 -0
  244. package/lib/module/networking/xmpp/sendReceivedReceipt.xmpp.js.map +1 -0
  245. package/lib/module/networking/xmppClient.js +64 -0
  246. package/lib/module/networking/xmppClient.js.map +1 -1
  247. package/lib/module/roomStore/persistence.js +78 -5
  248. package/lib/module/roomStore/persistence.js.map +1 -1
  249. package/lib/module/roomStore/roomHeapSlice.js +4 -0
  250. package/lib/module/roomStore/roomHeapSlice.js.map +1 -1
  251. package/lib/module/roomStore/roomsSlice.js +109 -0
  252. package/lib/module/roomStore/roomsSlice.js.map +1 -1
  253. package/lib/module/types/models/attachment.model.js +2 -0
  254. package/lib/module/types/models/attachment.model.js.map +1 -0
  255. package/lib/module/version.js +1 -1
  256. package/lib/typescript/assets/icons.d.ts +6 -1
  257. package/lib/typescript/assets/icons.d.ts.map +1 -1
  258. package/lib/typescript/components/MainComponents/AlbumGrid.d.ts +21 -0
  259. package/lib/typescript/components/MainComponents/AlbumGrid.d.ts.map +1 -0
  260. package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
  261. package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
  262. package/lib/typescript/components/MainComponents/MediaUploadOverlay.d.ts +17 -0
  263. package/lib/typescript/components/MainComponents/MediaUploadOverlay.d.ts.map +1 -0
  264. package/lib/typescript/components/MessageBubble/MediaCaption.d.ts +12 -0
  265. package/lib/typescript/components/MessageBubble/MediaCaption.d.ts.map +1 -0
  266. package/lib/typescript/components/MessageBubble/Message.d.ts.map +1 -1
  267. package/lib/typescript/components/MessageBubble/MessageInteractions.d.ts.map +1 -1
  268. package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
  269. package/lib/typescript/components/RoomComponents/LastMessageItem.d.ts.map +1 -1
  270. package/lib/typescript/components/RoomComponents/styled/LastAudioMessage.d.ts +2 -0
  271. package/lib/typescript/components/RoomComponents/styled/LastAudioMessage.d.ts.map +1 -1
  272. package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts +2 -0
  273. package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts.map +1 -1
  274. package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts +2 -0
  275. package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts.map +1 -1
  276. package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts +2 -0
  277. package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts.map +1 -1
  278. package/lib/typescript/components/Thread/ThreadWrapper.d.ts.map +1 -1
  279. package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts +9 -3
  280. package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts.map +1 -1
  281. package/lib/typescript/components/VideoCalls/CallIcons.d.ts +9 -0
  282. package/lib/typescript/components/VideoCalls/CallIcons.d.ts.map +1 -1
  283. package/lib/typescript/components/VideoCalls/VideoCallOverlay.d.ts.map +1 -1
  284. package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
  285. package/lib/typescript/components/VideoCalls/callSessionController.d.ts +7 -0
  286. package/lib/typescript/components/VideoCalls/callSessionController.d.ts.map +1 -1
  287. package/lib/typescript/components/VideoCalls/callUiStore.d.ts +13 -0
  288. package/lib/typescript/components/VideoCalls/callUiStore.d.ts.map +1 -1
  289. package/lib/typescript/components/VideoCalls/livekitRuntime.d.ts +5 -0
  290. package/lib/typescript/components/VideoCalls/livekitRuntime.d.ts.map +1 -1
  291. package/lib/typescript/components/VideoCalls/useCallKeep.d.ts +12 -0
  292. package/lib/typescript/components/VideoCalls/useCallKeep.d.ts.map +1 -1
  293. package/lib/typescript/components/VideoCalls/useOngoingCallNotification.d.ts +10 -0
  294. package/lib/typescript/components/VideoCalls/useOngoingCallNotification.d.ts.map +1 -0
  295. package/lib/typescript/components/VideoCalls/usePipTile.d.ts +46 -0
  296. package/lib/typescript/components/VideoCalls/usePipTile.d.ts.map +1 -0
  297. package/lib/typescript/components/styled/MediaFilePreview.d.ts.map +1 -1
  298. package/lib/typescript/components/styled/MessageImage.d.ts +10 -0
  299. package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
  300. package/lib/typescript/components/styled/SendInput.d.ts +7 -1
  301. package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
  302. package/lib/typescript/components/styled/VideoMessage.d.ts +7 -0
  303. package/lib/typescript/components/styled/VideoMessage.d.ts.map +1 -1
  304. package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
  305. package/lib/typescript/e2ee/fileEnvelope.d.ts +1 -1
  306. package/lib/typescript/e2ee/fileEnvelope.d.ts.map +1 -1
  307. package/lib/typescript/e2ee/sealedBody.d.ts +16 -0
  308. package/lib/typescript/e2ee/sealedBody.d.ts.map +1 -1
  309. package/lib/typescript/helpers/albumLayout.d.ts +66 -0
  310. package/lib/typescript/helpers/albumLayout.d.ts.map +1 -0
  311. package/lib/typescript/helpers/attachments.d.ts +55 -0
  312. package/lib/typescript/helpers/attachments.d.ts.map +1 -0
  313. package/lib/typescript/helpers/caption.d.ts +64 -0
  314. package/lib/typescript/helpers/caption.d.ts.map +1 -0
  315. package/lib/typescript/helpers/createMainMessageForThread.d.ts.map +1 -1
  316. package/lib/typescript/helpers/createMessageFromXml.d.ts.map +1 -1
  317. package/lib/typescript/helpers/fileKind.d.ts +20 -0
  318. package/lib/typescript/helpers/fileKind.d.ts.map +1 -0
  319. package/lib/typescript/helpers/getDataFromXml.d.ts.map +1 -1
  320. package/lib/typescript/helpers/mapWithConcurrency.d.ts +9 -0
  321. package/lib/typescript/helpers/mapWithConcurrency.d.ts.map +1 -0
  322. package/lib/typescript/helpers/mediaLimits.d.ts +13 -0
  323. package/lib/typescript/helpers/mediaLimits.d.ts.map +1 -0
  324. package/lib/typescript/helpers/mediaSendRetry.d.ts +26 -0
  325. package/lib/typescript/helpers/mediaSendRetry.d.ts.map +1 -0
  326. package/lib/typescript/helpers/mediaWireData.d.ts +16 -0
  327. package/lib/typescript/helpers/mediaWireData.d.ts.map +1 -0
  328. package/lib/typescript/helpers/mentionSpans.d.ts +8 -0
  329. package/lib/typescript/helpers/mentionSpans.d.ts.map +1 -0
  330. package/lib/typescript/helpers/mimeToExtension.d.ts +7 -0
  331. package/lib/typescript/helpers/mimeToExtension.d.ts.map +1 -1
  332. package/lib/typescript/helpers/readReceipts.d.ts +82 -0
  333. package/lib/typescript/helpers/readReceipts.d.ts.map +1 -0
  334. package/lib/typescript/helpers/repairFilenameEncoding.d.ts +12 -0
  335. package/lib/typescript/helpers/repairFilenameEncoding.d.ts.map +1 -0
  336. package/lib/typescript/helpers/safeJson.d.ts +2 -0
  337. package/lib/typescript/helpers/safeJson.d.ts.map +1 -0
  338. package/lib/typescript/helpers/updateMessagesTillLast.d.ts.map +1 -1
  339. package/lib/typescript/hooks/useSendMessage.d.ts +2 -1
  340. package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
  341. package/lib/typescript/i18n/strings.d.ts.map +1 -1
  342. package/lib/typescript/main.d.ts +1 -1
  343. package/lib/typescript/main.d.ts.map +1 -1
  344. package/lib/typescript/networking/api-requests/auth.api.d.ts +2 -0
  345. package/lib/typescript/networking/api-requests/auth.api.d.ts.map +1 -1
  346. package/lib/typescript/networking/stanzaHandlers.d.ts +7 -3
  347. package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
  348. package/lib/typescript/networking/xmpp/handleStanzas.xmpp.d.ts.map +1 -1
  349. package/lib/typescript/networking/xmpp/sendDisplayedMarker.xmpp.d.ts +3 -0
  350. package/lib/typescript/networking/xmpp/sendDisplayedMarker.xmpp.d.ts.map +1 -0
  351. package/lib/typescript/networking/xmpp/sendMediaMessage.xmpp.d.ts +12 -0
  352. package/lib/typescript/networking/xmpp/sendMediaMessage.xmpp.d.ts.map +1 -1
  353. package/lib/typescript/networking/xmpp/sendReceivedReceipt.xmpp.d.ts +3 -0
  354. package/lib/typescript/networking/xmpp/sendReceivedReceipt.xmpp.d.ts.map +1 -0
  355. package/lib/typescript/networking/xmppClient.d.ts +15 -0
  356. package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
  357. package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
  358. package/lib/typescript/roomStore/roomHeapSlice.d.ts +22 -1
  359. package/lib/typescript/roomStore/roomHeapSlice.d.ts.map +1 -1
  360. package/lib/typescript/roomStore/roomsSlice.d.ts +67 -3
  361. package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
  362. package/lib/typescript/types/models/attachment.model.d.ts +52 -0
  363. package/lib/typescript/types/models/attachment.model.d.ts.map +1 -0
  364. package/lib/typescript/types/models/message.model.d.ts +26 -0
  365. package/lib/typescript/types/models/message.model.d.ts.map +1 -1
  366. package/lib/typescript/types/models/modal.model.d.ts +7 -0
  367. package/lib/typescript/types/models/modal.model.d.ts.map +1 -1
  368. package/lib/typescript/types/models/room.model.d.ts +2 -0
  369. package/lib/typescript/types/models/room.model.d.ts.map +1 -1
  370. package/lib/typescript/types/types.d.ts +69 -1
  371. package/lib/typescript/types/types.d.ts.map +1 -1
  372. package/lib/typescript/version.d.ts +1 -1
  373. package/package.json +4 -1
  374. package/plugins/notification-service/Info.plist +31 -0
  375. package/plugins/notification-service/NotificationService.swift +82 -0
  376. package/plugins/withNotificationServiceExtension.js +137 -0
  377. package/src/assets/icons.tsx +20 -2
  378. package/src/components/MainComponents/AlbumGrid.tsx +183 -0
  379. package/src/components/MainComponents/ChatRoom.tsx +4 -2
  380. package/src/components/MainComponents/MediaMessage.tsx +246 -130
  381. package/src/components/MainComponents/MediaUploadOverlay.tsx +102 -0
  382. package/src/components/MessageBubble/MediaCaption.tsx +45 -0
  383. package/src/components/MessageBubble/Message.tsx +71 -3
  384. package/src/components/MessageBubble/MessageInteractions.tsx +2 -1
  385. package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +64 -0
  386. package/src/components/RoomComponents/LastMessageItem.tsx +15 -4
  387. package/src/components/RoomComponents/styled/LastAudioMessage.tsx +6 -3
  388. package/src/components/RoomComponents/styled/LastMessageFile.tsx +6 -2
  389. package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +6 -2
  390. package/src/components/RoomComponents/styled/LastMessageVideo.tsx +6 -2
  391. package/src/components/Thread/ThreadWrapper.tsx +5 -9
  392. package/src/components/VideoCalls/ActiveCallBar.tsx +56 -10
  393. package/src/components/VideoCalls/CallIcons.tsx +36 -12
  394. package/src/components/VideoCalls/VideoCallOverlay.tsx +205 -8
  395. package/src/components/VideoCalls/VideoCallSession.tsx +45 -13
  396. package/src/components/VideoCalls/callSessionController.ts +51 -20
  397. package/src/components/VideoCalls/callUiStore.ts +33 -3
  398. package/src/components/VideoCalls/livekitRuntime.ts +13 -0
  399. package/src/components/VideoCalls/useCallKeep.ts +204 -33
  400. package/src/components/VideoCalls/useOngoingCallNotification.ts +113 -0
  401. package/src/components/VideoCalls/usePipTile.ts +214 -0
  402. package/src/components/styled/MediaFilePreview.tsx +49 -34
  403. package/src/components/styled/MessageImage.tsx +21 -5
  404. package/src/components/styled/SendInput.tsx +101 -87
  405. package/src/components/styled/VideoMessage.tsx +34 -9
  406. package/src/context/xmppProvider.tsx +32 -0
  407. package/src/e2ee/fileEnvelope.ts +1 -1
  408. package/src/e2ee/sealedBody.ts +44 -5
  409. package/src/helpers/albumLayout.ts +207 -0
  410. package/src/helpers/attachments.ts +316 -0
  411. package/src/helpers/caption.ts +283 -0
  412. package/src/helpers/createMainMessageForThread.ts +6 -1
  413. package/src/helpers/createMessageFromXml.ts +21 -5
  414. package/src/helpers/fileKind.ts +38 -0
  415. package/src/helpers/getDataFromXml.ts +5 -1
  416. package/src/helpers/mapWithConcurrency.ts +32 -0
  417. package/src/helpers/mediaLimits.ts +27 -0
  418. package/src/helpers/mediaSendRetry.ts +59 -0
  419. package/src/helpers/mediaWireData.ts +57 -0
  420. package/src/helpers/mentionSpans.ts +17 -0
  421. package/src/helpers/mimeToExtension.ts +51 -0
  422. package/src/helpers/readReceipts.ts +219 -0
  423. package/src/helpers/repairFilenameEncoding.ts +82 -0
  424. package/src/helpers/safeJson.ts +11 -0
  425. package/src/helpers/updateMessagesTillLast.tsx +2 -1
  426. package/src/hooks/useSendMessage.tsx +448 -249
  427. package/src/i18n/strings.ts +144 -0
  428. package/src/main.ts +3 -0
  429. package/src/networking/api-requests/auth.api.ts +60 -3
  430. package/src/networking/stanzaHandlers.ts +91 -2
  431. package/src/networking/xmpp/handleStanzas.xmpp.ts +6 -2
  432. package/src/networking/xmpp/sendDisplayedMarker.xmpp.ts +31 -0
  433. package/src/networking/xmpp/sendMediaMessage.xmpp.ts +60 -3
  434. package/src/networking/xmpp/sendReceivedReceipt.xmpp.ts +31 -0
  435. package/src/networking/xmppClient.ts +48 -0
  436. package/src/roomStore/persistence.ts +94 -3
  437. package/src/roomStore/roomHeapSlice.ts +23 -1
  438. package/src/roomStore/roomsSlice.ts +112 -1
  439. package/src/types/models/attachment.model.ts +51 -0
  440. package/src/types/models/message.model.ts +29 -0
  441. package/src/types/models/modal.model.ts +7 -0
  442. package/src/types/models/room.model.ts +2 -0
  443. package/src/types/types.ts +83 -1
  444. package/src/version.ts +1 -1
  445. package/lib/commonjs/components/VideoCalls/useDraggable.js +0 -59
  446. package/lib/commonjs/components/VideoCalls/useDraggable.js.map +0 -1
  447. package/lib/module/components/VideoCalls/useDraggable.js +0 -55
  448. package/lib/module/components/VideoCalls/useDraggable.js.map +0 -1
  449. package/lib/typescript/components/VideoCalls/useDraggable.d.ts +0 -19
  450. package/lib/typescript/components/VideoCalls/useDraggable.d.ts.map +0 -1
  451. package/src/components/VideoCalls/useDraggable.ts +0 -46
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+
3
+ import React, { useCallback, useMemo } from 'react';
4
+ import { Pressable, StyleSheet, Text, View } from 'react-native';
5
+ import { useDispatch } from 'react-redux';
6
+ import CustomMessageImage from '../styled/MessageImage';
7
+ import CustomMessageVideo from '../styled/VideoMessage';
8
+ import { getAttachmentName } from '../../helpers/attachments';
9
+ import { getFileKind } from '../../helpers/fileKind';
10
+ import { getAlbumFrame, getAlbumLayout } from '../../helpers/albumLayout';
11
+ import { MEDIA_MAX_W } from '../../helpers/mediaDimensions';
12
+ import { appendFileToken } from '../../helpers/secureFileUrl';
13
+ import { useFileToken } from '../../hooks/useFileToken';
14
+ import { useT } from '../../i18n/useT';
15
+ import { setActiveFile, setActiveModal } from '../../roomStore/chatSettingsSlice';
16
+ import { MODAL_TYPES } from '../../helpers/constants/MODAL_TYPES';
17
+ import MediaUploadOverlay from './MediaUploadOverlay';
18
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
+ /**
20
+ * Photo and video album of a message with several media files. The geometry
21
+ * comes from getAlbumLayout / getAlbumFrame; every tile is the ordinary
22
+ * picture or video component sized to its cell. A tap opens the viewer on
23
+ * that file with the whole album as its siblings, so the viewer can page
24
+ * through files the grid does not show. The last tile of a long album carries
25
+ * a "+N" overlay for the files folded behind it.
26
+ */
27
+ const AlbumGrid = ({
28
+ attachments,
29
+ width = MEDIA_MAX_W,
30
+ onRetryTile
31
+ }) => {
32
+ const t = useT();
33
+ const dispatch = useDispatch();
34
+ const fileToken = useFileToken();
35
+ const layout = useMemo(() => getAlbumLayout(attachments.length), [attachments.length]);
36
+ const frame = useMemo(() => getAlbumFrame(layout, width), [layout, width]);
37
+ const siblings = useMemo(() => attachments.map(attachment => ({
38
+ fileName: getAttachmentName(attachment),
39
+ originalName: attachment.originalName,
40
+ fileURL: appendFileToken(attachment.location, fileToken) || '',
41
+ mimetype: attachment.mimetype || '',
42
+ duration: attachment.duration
43
+ })), [attachments, fileToken]);
44
+ const openAt = useCallback(index => {
45
+ const target = siblings[index];
46
+ // A file still on its way up has no server copy to open yet.
47
+ if (!target || !target.fileURL || attachments[index]?.uploadStatus) {
48
+ return;
49
+ }
50
+ dispatch(setActiveFile({
51
+ ...target,
52
+ siblings,
53
+ index
54
+ }));
55
+ dispatch(setActiveModal(MODAL_TYPES.FILE_PREVIEW));
56
+ }, [attachments, dispatch, siblings]);
57
+ return /*#__PURE__*/_jsx(View, {
58
+ testID: "album-grid",
59
+ style: [styles.grid, {
60
+ width: frame.width,
61
+ height: frame.height
62
+ }],
63
+ children: attachments.slice(0, layout.visible).map((attachment, position) => {
64
+ const style = frame.tiles[position];
65
+ const tile = {
66
+ width: Number(style.width),
67
+ height: Number(style.height)
68
+ };
69
+ const fileName = getAttachmentName(attachment);
70
+ const kind = getFileKind({
71
+ mimetype: attachment.mimetype,
72
+ name: fileName,
73
+ url: attachment.location,
74
+ duration: attachment.duration
75
+ });
76
+ // An outgoing tile shows the file on this device until its upload
77
+ // has given it a server copy.
78
+ const outgoing = Boolean(attachment.uploadStatus);
79
+ const fileURL = outgoing ? attachment.localUrl || '' : appendFileToken(attachment.location, fileToken) || '';
80
+ const preview = outgoing ? attachment.localUrl || undefined : appendFileToken(attachment.locationPreview, fileToken);
81
+ const showMore = position === layout.visible - 1 && layout.hidden > 0;
82
+ const open = () => openAt(position);
83
+ return /*#__PURE__*/_jsxs(View, {
84
+ testID: `album-tile-${position}`,
85
+ style: style,
86
+ children: [kind === 'video' ? /*#__PURE__*/_jsx(CustomMessageVideo, {
87
+ fileName: fileName,
88
+ originalName: attachment.originalName,
89
+ fileURL: fileURL,
90
+ previewURL: preview,
91
+ mimetype: attachment.mimetype || '',
92
+ tile: tile,
93
+ onOpen: outgoing ? undefined : open
94
+ }) : /*#__PURE__*/_jsx(CustomMessageImage, {
95
+ fileName: fileName,
96
+ originalName: attachment.originalName,
97
+ fileURL: fileURL,
98
+ locationPreview: preview,
99
+ mimetype: attachment.mimetype || '',
100
+ tile: tile,
101
+ onOpen: outgoing ? undefined : open
102
+ }), outgoing && attachment.uploadStatus && /*#__PURE__*/_jsx(MediaUploadOverlay, {
103
+ status: attachment.uploadStatus,
104
+ progress: attachment.uploadProgress,
105
+ onRetry: onRetryTile ? () => onRetryTile(position) : undefined
106
+ }), showMore && /*#__PURE__*/_jsx(Pressable, {
107
+ testID: "album-more",
108
+ accessibilityRole: "button",
109
+ accessibilityLabel: t('attachment.moreLabel', {
110
+ count: layout.hidden
111
+ }),
112
+ onPress: open,
113
+ style: styles.more,
114
+ children: /*#__PURE__*/_jsx(Text, {
115
+ style: styles.moreText,
116
+ children: t('attachment.moreCount', {
117
+ count: layout.hidden
118
+ })
119
+ })
120
+ })]
121
+ }, attachment.attachmentId || `${position}-${fileName}`);
122
+ })
123
+ });
124
+ };
125
+ export default AlbumGrid;
126
+ const styles = StyleSheet.create({
127
+ grid: {
128
+ position: 'relative',
129
+ overflow: 'hidden',
130
+ borderRadius: 10
131
+ },
132
+ more: {
133
+ ...StyleSheet.absoluteFill,
134
+ alignItems: 'center',
135
+ justifyContent: 'center',
136
+ // Sits on the photo itself, so it stays hard-coded: it must read on the
137
+ // picture, not on the theme.
138
+ backgroundColor: 'rgba(8, 12, 24, 0.5)'
139
+ },
140
+ moreText: {
141
+ color: '#FFFFFF',
142
+ fontSize: 28,
143
+ fontWeight: '600'
144
+ }
145
+ });
146
+ //# sourceMappingURL=AlbumGrid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useCallback","useMemo","Pressable","StyleSheet","Text","View","useDispatch","CustomMessageImage","CustomMessageVideo","getAttachmentName","getFileKind","getAlbumFrame","getAlbumLayout","MEDIA_MAX_W","appendFileToken","useFileToken","useT","setActiveFile","setActiveModal","MODAL_TYPES","MediaUploadOverlay","jsx","_jsx","jsxs","_jsxs","AlbumGrid","attachments","width","onRetryTile","t","dispatch","fileToken","layout","length","frame","siblings","map","attachment","fileName","originalName","fileURL","location","mimetype","duration","openAt","index","target","uploadStatus","FILE_PREVIEW","testID","style","styles","grid","height","children","slice","visible","position","tiles","tile","Number","kind","name","url","outgoing","Boolean","localUrl","preview","undefined","locationPreview","showMore","hidden","open","previewURL","onOpen","status","progress","uploadProgress","onRetry","accessibilityRole","accessibilityLabel","count","onPress","more","moreText","attachmentId","create","overflow","borderRadius","absoluteFill","alignItems","justifyContent","backgroundColor","color","fontSize","fontWeight"],"sourceRoot":"../../../../src","sources":["components/MainComponents/AlbumGrid.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAChE,SAASC,WAAW,QAAQ,aAAa;AAEzC,OAAOC,kBAAkB,MAAM,wBAAwB;AACvD,OAAOC,kBAAkB,MAAM,wBAAwB;AACvD,SAASC,iBAAiB,QAAQ,2BAA2B;AAC7D,SAASC,WAAW,QAAQ,wBAAwB;AACpD,SAASC,aAAa,EAAEC,cAAc,QAAQ,2BAA2B;AACzE,SAASC,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,IAAI,QAAQ,iBAAiB;AACtC,SACEC,aAAa,EACbC,cAAc,QACT,mCAAmC;AAC1C,SAASC,WAAW,QAAQ,qCAAqC;AACjE,OAAOC,kBAAkB,MAAM,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAWtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,SAAmC,GAAGA,CAAC;EAC3CC,WAAW;EACXC,KAAK,GAAGd,WAAW;EACnBe;AACF,CAAC,KAAK;EACJ,MAAMC,CAAC,GAAGb,IAAI,CAAC,CAAC;EAChB,MAAMc,QAAQ,GAAGxB,WAAW,CAAC,CAAC;EAC9B,MAAMyB,SAAS,GAAGhB,YAAY,CAAC,CAAC;EAEhC,MAAMiB,MAAM,GAAG/B,OAAO,CACpB,MAAMW,cAAc,CAACc,WAAW,CAACO,MAAM,CAAC,EACxC,CAACP,WAAW,CAACO,MAAM,CACrB,CAAC;EACD,MAAMC,KAAK,GAAGjC,OAAO,CAAC,MAAMU,aAAa,CAACqB,MAAM,E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,EAAE;cAAEoD,KAAK,EAAEjD,MAAM,CAACuC;YAAO,CAAC;UAAC,CAChD;QAAC,CACE,CACZ;MAAA,GA9CIlC,UAAU,CAACgD,YAAY,IAAI,GAAG5B,QAAQ,IAAInB,QAAQ,EA+CnD,CAAC;IAEX,CAAC;EAAC,CACE,CAAC;AAEX,CAAC;AAED,eAAeb,SAAS;AAExB,MAAM0B,MAAM,GAAGhD,UAAU,CAACmF,MAAM,CAAC;EAC/BlC,IAAI,EAAE;IACJK,QAAQ,EAAE,UAAU;IACpB8B,QAAQ,EAAE,QAAQ;IAClBC,YAAY,EAAE;EAChB,CAAC;EACDL,IAAI,EAAE;IACJ,GAAGhF,UAAU,CAACsF,YAAY;IAC1BC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxB;IACA;IACAC,eAAe,EAAE;EACnB,CAAC;EACDR,QAAQ,EAAE;IACRS,KAAK,EAAE,SAAS;IAChBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -144,14 +144,14 @@ const ChatRoom = /*#__PURE__*/React.memo(({
144
144
  }
145
145
  sendMs(message, activeRoomJID);
146
146
  }, [activeRoomJID, sendMs, dispatch]);
147
- const sendMedia = useCallback((data, type) => {
147
+ const sendMedia = useCallback((data, type, caption) => {
148
148
  // Return the promise so callers can sequence the follow-up
149
149
  // text send AFTER the upload finishes (consumer expectation:
150
150
  // media first, text second — never interleaved).
151
151
  if (store.getState().rooms.jumpWindow) {
152
152
  dispatch(clearJumpWindow());
153
153
  }
154
- return sendMessageMedia(data, type, activeRoomJID || '');
154
+ return caption ? sendMessageMedia(data, type, activeRoomJID || '', false, false, '', undefined, caption) : sendMessageMedia(data, type, activeRoomJID || '');
155
155
  }, [activeRoomJID, dispatch]);
156
156
 
157
157
  // One history request per room at a time. Everything the request needs
@@ -1 +1 @@
1
- {"version":3,"names":["isJoiningRoom","React","useState","useEffect","useCallback","useRef","ChatContainer","NonRoomChat","useDispatch","useSelector","useStore","MessageList","ArchivedMessageCard","loadRoomHistory","SendInput","clearJumpWindow","clearReadBoundary","clearVisibleRoom","deleteRoomMessage","setEditAction","setLastViewedTimestamp","setReadBoundary","setVisibleRoom","Loader","useXmppClient","ChatHeader","NoMessagesPlaceholder","NewChatModal","EditWrapper","EncryptedSendNotice","MAX_SEAL_BYTES","loadRoomMembers","EmptyChatIllustration","getIconColor","getChatBackgroundColor","ChooseChatMessage","useSendMessage","useRoomInitialization","useChatSettingState","useTheme","isOwnMessage","CustomTypingIndicator","AppState","Keyboard","Platform","View","KeyboardAvoidingView","KeyboardStickyView","KeyboardInputDock","useComposing","store","getFlushBoundaryTs","getReadMarkerTimestamp","useSafeAreaInsets","getInputDockPaddingBottom","getKeyboardVerticalOffset","getKeyboardAvoidingOffset","getInputDockKeyboardPadding","jsx","_jsx","jsxs","_jsxs","EMPTY_MESSAGES","ChatRoom","memo","CustomMessageComponent","CustomInputComponent","CustomScrollableArea","CustomDaySeparator","CustomNewMessageLabel","handleBackClick","eventHandlers","propsEventHandlers","client","dispatch","insets","theme","isLoadingMore","setIsLoadingMore","user","config","storeConfig","configWithEventHandlers","useMemo","reduxStore","activeRoomJID","state","rooms","activeRoom","undefined","hasRooms","Object","keys","length","editAction","globalLoading","isLoading","joiningRoomJID","loading","e2eeRoom","e2ee","e2eeOn","enabled","maxMediaBytes","roomMessages","messages","sendMessage","sendMs","sendMedia","sendMessageMedia","sendEditMessage","isLastMessageFromUserAndProcessing","sendStartComposing","sendEndComposing","stickyInputEnabled","disableKeyboardAvoidingView","keyboardStickyInput","onAppStateChange","nextState","dismiss","subscription","addEventListener","remove","message","getState","jumpWindow","data","type","inFlightRoomsRef","Set","loadMoreMessages","chatJID","max","idOfMessageBefore","room","inFlight","current","before","onBusyChange","onCloseEdit","isEdit","clientRef","lastBoundarySentRef","handleReadBoundaryChange","boundaryTs","next","jid","ts","roomJID","heapState","roomHeapSlice","readBoundaries","timestamp","liveClient","flushLastViewedToPrivateStoreStanza","visibleRoomJID","visibleRoomTs","catch","messageId","testID","style","flex","justifyContent","alignItems","children","color","colors","primary","keyboardVerticalOffset","platform","OS","configuredOffset","bottomInset","bottom","inputDockPaddingBottom","configuredPadding","hostOwnsLayout","keyboardAvoidingOffset","inputDockKeyboardPadding","noKeyboardHandling","stickyInput","avoidKeyboard","KeyboardWrapper","keyboardWrapperProps","backgroundColor","surface","behavior","collapsingDock","InputDockTag","inputDockProps","paddingBottom","borderTopLeftRadius","borderTopRightRadius","shadowColor","shadow","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","offset","closed","opened","closedPadding","openedPadding","chatRoomStyles","disableHeader","currentRoom","chatHeaderAdditional","element","panelColor","dark","surfaceSecondary","decoratedMessages","map","msg","idx","showDateLabel","Date","date","toDateString","isReply","renderMessage","decorated","isUser","scrollController","scrollToBottom","waitForImagesLoaded","showScrollButton","newMessagesCount","resetNewMessageCounter","typingIndicator","composing","customTypingIndicator","customComponent","usersTyping","composingList","text","isVisible","CustomMessage","onReadBoundaryChange","onClose","onFocus","onBlur","isMessageProcessing","editMessage","position","styles"],"sourceRoot":"../../../../src","sources":["components/MainComponents/ChatRoom.tsx"],"mappings":";;AAAA;;AAEA,SAASA,aAAa,QAAQ,2BAA2B;AACzD,OAAOC,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AACvE,SAASC,aAAa,EAAEC,WAAW,QAAQ,4BAA4B;AACvE,SAASC,WAAW,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,aAAa;AAEhE,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,SACEC,eAAe,EACfC,iBAAiB,EACjBC,gBAAgB,EAChBC,iBAAiB,EACjBC,aAAa,EACbC,sBAAsB,EACtBC,eAAe,EACfC,cAA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AAS,EAAEvJ,UAAU,EAAEiJ,SAAS,IAAI;MAAM,CAC3C,CACF;IAAA,CACU;EAAC,CACD,CAAC;AAEtB,CACF,CAAC;AAED,eAAe1K,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["isJoiningRoom","React","useState","useEffect","useCallback","useRef","ChatContainer","NonRoomChat","useDispatch","useSelector","useStore","MessageList","ArchivedMessageCard","loadRoomHistory","SendInput","clearJumpWindow","clearReadBoundary","clearVisibleRoom","deleteRoomMessage","setEditAction","setLastViewedTimestamp","setReadBoundary","setVisibleRoom","Loader","useXmppClient","ChatHeader","NoMessagesPlaceholder","NewChatModal","EditWrapper","EncryptedSendNotice","MAX_SEAL_BYTES","loadRoomMembers","EmptyChatIllustration","getIconColor","getChatBackgroundColor","ChooseChatMessage","useSendMessage","useRoomInitialization","useChatSettingState","useTheme","isOwnMessage","CustomTypingIndicator","AppState","Keyboard","Platform","View","KeyboardAvoidingView","KeyboardStickyView","KeyboardInputDock","useComposing","store","getFlushBoundaryTs","getReadMarkerTimestamp","useSafeAreaInsets","getInputDockPaddingBottom","getKeyboardVerticalOffset","getKeyboardAvoidingOffset","getInputDockKeyboardPadding","jsx","_jsx","jsxs","_jsxs","EMPTY_MESSAGES","ChatRoom","memo","CustomMessageComponent","CustomInputComponent","CustomScrollableArea","CustomDaySeparator","CustomNewMessageLabel","handleBackClick","eventHandlers","propsEventHandlers","client","dispatch","insets","theme","isLoadingMore","setIsLoadingMore","user","config","storeConfig","configWithEventHandlers","useMemo","reduxStore","activeRoomJID","state","rooms","activeRoom","undefined","hasRooms","Object","keys","length","editAction","globalLoading","isLoading","joiningRoomJID","loading","e2eeRoom","e2ee","e2eeOn","enabled","maxMediaBytes","roomMessages","messages","sendMessage","sendMs","sendMedia","sendMessageMedia","sendEditMessage","isLastMessageFromUserAndProcessing","sendStartComposing","sendEndComposing","stickyInputEnabled","disableKeyboardAvoidingView","keyboardStickyInput","onAppStateChange","nextState","dismiss","subscription","addEventListener","remove","message","getState","jumpWindow","data","type","caption","inFlightRoomsRef","Set","loadMoreMessages","chatJID","max","idOfMessageBefore","room","inFlight","current","before","onBusyChange","onCloseEdit","isEdit","clientRef","lastBoundarySentRef","handleReadBoundaryChange","boundaryTs","next","jid","ts","roomJID","heapState","roomHeapSlice","readBoundaries","timestamp","liveClient","flushLastViewedToPrivateStoreStanza","visibleRoomJID","visibleRoomTs","catch","messageId","testID","style","flex","justifyContent","alignItems","children","color","colors","primary","keyboardVerticalOffset","platform","OS","configuredOffset","bottomInset","bottom","inputDockPaddingBottom","configuredPadding","hostOwnsLayout","keyboardAvoidingOffset","inputDockKeyboardPadding","noKeyboardHandling","stickyInput","avoidKeyboard","KeyboardWrapper","keyboardWrapperProps","backgroundColor","surface","behavior","collapsingDock","InputDockTag","inputDockProps","paddingBottom","borderTopLeftRadius","borderTopRightRadius","shadowColor","shadow","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","offset","closed","opened","closedPadding","openedPadding","chatRoomStyles","disableHeader","currentRoom","chatHeaderAdditional","element","panelColor","dark","surfaceSecondary","decoratedMessages","map","msg","idx","showDateLabel","Date","date","toDateString","isReply","renderMessage","decorated","isUser","scrollController","scrollToBottom","waitForImagesLoaded","showScrollButton","newMessagesCount","resetNewMessageCounter","typingIndicator","composing","customTypingIndicator","customComponent","usersTyping","composingList","text","isVisible","CustomMessage","onReadBoundaryChange","onClose","onFocus","onBlur","isMessageProcessing","editMessage","position","styles"],"sourceRoot":"../../../../src","sources":["components/MainComponents/ChatRoom.tsx"],"mappings":";;AAAA;;AAEA,SAASA,aAAa,QAAQ,2BAA2B;AACzD,OAAOC,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AACvE,SAASC,aAAa,EAAEC,WAAW,QAAQ,4BAA4B;AACvE,SAASC,WAAW,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,aAAa;AAEhE,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,mBAAm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AAEkJ,SAAS,iBACnB/K,IAAA,CAAClB,qBAAqB;QACpBoM,WAAW,EACTrJ,UAAU,EAAEsJ,aAAa,IAAI,CAAC,MAAM,CACrC;QACDC,IAAI,EAAE7J,uBAAuB,CAACyJ,qBAAqB,CAACI,IAAK;QACzDS,QAAQ,EACNtK,uBAAuB,CAACyJ,qBAAqB,CAACa,QAC/C;QACDC,MAAM,EAAEvK,uBAAuB,CAACyJ,qBAAqB,CAACc,MAAO;QAC7Db,eAAe,EACb1J,uBAAuB,CAACyJ,qBAAqB,CAACC,eAC/C;QACDI,SAAS,EAAExJ,UAAU,EAAEkJ,SAAS,IAAI;MAAM,CAC3C,CACF;IAAA,CACU;EAAC,CACD,CAAC;AAEtB,CACF,CAAC;AAED,eAAe3K,QAAQ","ignoreList":[]}
@@ -6,7 +6,9 @@ import CustomMessageImage from '../styled/MessageImage';
6
6
  import CustomMessageVideo from '../styled/VideoMessage';
7
7
  import AudioMessage from '../styled/AudioMessage';
8
8
  import { ActivityIndicator, Image, StyleSheet, Text, View } from 'react-native';
9
- import { isLikelyAudio } from '../../helpers/mimeToExtension';
9
+ import { getAttachmentName, getMessageAttachments } from '../../helpers/attachments';
10
+ import { getMessageCaption } from '../../helpers/caption';
11
+ import { getFileKind, isAlbumKind } from '../../helpers/fileKind';
10
12
  import { getDisplayFileName } from '../../helpers/getDisplayFileName';
11
13
  import { FileIcon, PlayIcon } from '../../assets/icons';
12
14
  import { defaultMediaDims } from '../../helpers/mediaDimensions';
@@ -14,7 +16,11 @@ import { useFileToken } from '../../hooks/useFileToken';
14
16
  import { appendFileToken } from '../../helpers/secureFileUrl';
15
17
  import { useTheme } from '../../hooks/useTheme';
16
18
  import SealedAttachment from './SealedAttachment';
17
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
+ import AlbumGrid from './AlbumGrid';
20
+ import MediaCaption from '../MessageBubble/MediaCaption';
21
+ import MediaUploadOverlay from './MediaUploadOverlay';
22
+ import { requestMediaRetry } from '../../helpers/mediaSendRetry';
23
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
18
24
  const pendingImageDims = defaultMediaDims();
19
25
  const getPendingStatusLabel = mimeType => {
20
26
  if (mimeType?.startsWith('image/')) {
@@ -160,149 +166,219 @@ const PendingMediaMessage = ({
160
166
  })
161
167
  });
162
168
  };
163
- const MediaMessage = ({
164
- mimeType,
165
- location: rawLocation,
166
- messageText: rawMessageText,
169
+ /** One file of a message: the picture, video, player or file card it gets. */
170
+ const AttachmentCard = ({
171
+ attachment,
172
+ index,
167
173
  message,
168
- isUser
174
+ isUser,
175
+ fileToken
169
176
  }) => {
170
- const fileToken = useFileToken();
171
- const theme = useTheme();
177
+ const mimeType = attachment.mimetype || '';
178
+ const rawLocation = attachment.location;
179
+ const rawPreview = attachment.locationPreview;
172
180
  const location = appendFileToken(rawLocation, fileToken);
173
- const messageText = appendFileToken(rawMessageText, fileToken);
174
- if (message?.clientEncrypted === 'true') {
175
- return /*#__PURE__*/_jsx(SealedAttachment, {
176
- message: message,
181
+ const previewText = appendFileToken(rawPreview, fileToken);
182
+ const originalName = attachment.originalName;
183
+ const duration = attachment.duration ?? message?.duration;
184
+ const waveForm = index === 0 ? message?.waveForm : undefined;
185
+ const displayName = getDisplayFileName({
186
+ originalName,
187
+ fileName: attachment.fileName,
188
+ location: rawLocation || rawPreview,
189
+ mimetype: mimeType
190
+ });
191
+ const kind = getFileKind({
192
+ mimetype: mimeType,
193
+ name: displayName,
194
+ url: rawLocation,
195
+ duration,
196
+ waveForm,
197
+ originalName
198
+ });
199
+
200
+ // The sender's own voice note plays from its local file while it
201
+ // uploads, waveform and all - no placeholder card in between.
202
+ const localPreview = attachment.localUrl;
203
+ if (message?.pending && kind === 'audio' && (localPreview || previewText || location)) {
204
+ return /*#__PURE__*/_jsx(AudioMessage, {
205
+ src: localPreview || previewText || location || '',
206
+ mimeType: mimeType,
207
+ fileName: displayName,
208
+ duration: duration,
209
+ waveForm: waveForm,
177
210
  isUser: isUser
178
211
  });
179
212
  }
180
- if (mimeType) {
181
- const displayName = getDisplayFileName({
182
- originalName: message?.originalName,
183
- fileName: message?.fileName,
184
- location: rawLocation || rawMessageText,
185
- mimetype: mimeType
186
- });
187
- const isAudioPayload = isLikelyAudio(mimeType, displayName, rawLocation, {
188
- duration: message?.duration,
189
- waveForm: message?.waveForm,
190
- originalName: message?.originalName
213
+ if (message?.pending) {
214
+ return /*#__PURE__*/_jsx(PendingMediaMessage, {
215
+ fileName: displayName,
216
+ mimeType: mimeType,
217
+ previewUri: localPreview || previewText || location || '',
218
+ isUser: isUser,
219
+ size: index === 0 ? message?.size : attachment.size
191
220
  });
192
- // The sender's own voice note plays from its local file while it
193
- // uploads, waveform and all — no placeholder card in between.
194
- if (message?.pending && isAudioPayload && (messageText || location)) {
221
+ }
222
+ switch (kind) {
223
+ case 'image':
224
+ return /*#__PURE__*/_jsx(CustomMessageImage, {
225
+ fileName: displayName,
226
+ originalName: originalName
227
+ // Full-size original: opened by the preview modal.
228
+ ,
229
+ fileURL: location || previewText || ''
230
+ // ...and the thumbnail the bubble actually renders, which is
231
+ // what the web client shows too.
232
+ ,
233
+ locationPreview: previewText,
234
+ mimetype: mimeType
235
+ });
236
+ case 'video':
237
+ return /*#__PURE__*/_jsx(CustomMessageVideo, {
238
+ fileName: displayName,
239
+ originalName: originalName,
240
+ fileURL: location || ''
241
+ // The message's locationPreview is the poster frame the backend
242
+ // generated for this video. Handing it over lets the bubble render
243
+ // as a still + play badge instead of mounting a video surface per
244
+ // row (see VideoMessage).
245
+ ,
246
+ previewURL: previewText,
247
+ mimetype: mimeType
248
+ });
249
+ case 'audio':
250
+ // Covers audio/*, octet-stream voice notes and the voice-message
251
+ // heuristics of isLikelyAudio (customer-reported #9 voicemail fix):
252
+ // a voicemail shipped as octet-stream with no audio extension still
253
+ // gets the player instead of a broken `.bin` file card.
195
254
  return /*#__PURE__*/_jsx(AudioMessage, {
196
- src: messageText || location || '',
255
+ src: location || '',
197
256
  mimeType: mimeType,
198
257
  fileName: displayName,
199
- duration: message?.duration,
200
- waveForm: message?.waveForm,
258
+ originalName: originalName,
259
+ duration: duration,
260
+ waveForm: waveForm,
201
261
  isUser: isUser
202
262
  });
203
- }
204
- if (message?.pending) {
205
- return /*#__PURE__*/_jsx(PendingMediaMessage, {
263
+ default:
264
+ return /*#__PURE__*/_jsx(FileDownload, {
265
+ fileURL: location ? location : '',
206
266
  fileName: displayName,
207
- mimeType: mimeType,
208
- previewUri: messageText || location || '',
267
+ mimetype: mimeType,
209
268
  isUser: isUser,
210
- size: message?.size
269
+ originalName: originalName,
270
+ duration: duration,
271
+ waveForm: waveForm
211
272
  });
273
+ }
274
+ };
275
+ const MediaMessage = ({
276
+ mimeType,
277
+ location: rawLocation,
278
+ messageText: rawMessageText,
279
+ message,
280
+ isUser
281
+ }) => {
282
+ const fileToken = useFileToken();
283
+ const theme = useTheme();
284
+
285
+ // Order of truth: the message's own attachments, else its flat fields, else
286
+ // the props the bubble was handed (a bare file with no message around it).
287
+ const attachments = useMemo(() => getMessageAttachments(message ?? {
288
+ location: rawLocation,
289
+ locationPreview: rawMessageText,
290
+ mimetype: mimeType
291
+ }), [message, rawLocation, rawMessageText, mimeType]);
292
+ const caption = message ? getMessageCaption(message) : undefined;
293
+ if (message?.clientEncrypted === 'true') {
294
+ // A sealed file has nothing to show until it is opened, so each one is a
295
+ // card of its own (SealedAttachment); the caption came out of the
296
+ // encrypted body.
297
+ return /*#__PURE__*/_jsxs(_Fragment, {
298
+ children: [/*#__PURE__*/_jsx(SealedAttachment, {
299
+ message: message,
300
+ isUser: isUser
301
+ }), /*#__PURE__*/_jsx(MediaCaption, {
302
+ text: caption,
303
+ isUser: isUser
304
+ })]
305
+ });
306
+ }
307
+ if (attachments.length === 0) {
308
+ return /*#__PURE__*/_jsx(Text, {
309
+ style: {
310
+ color: theme.text
311
+ },
312
+ children: "Unsupported media type"
313
+ });
314
+ }
315
+
316
+ // A file of an outgoing multi-file message carries its upload state. It is
317
+ // "reachable" through its local copy, not a server one, until the send lands.
318
+ const isOutgoingFile = attachment => Boolean(message?.pending) && Boolean(attachment.uploadStatus || attachment.localUrl);
319
+ const card = (attachment, index) => {
320
+ const body = /*#__PURE__*/_jsx(AttachmentCard, {
321
+ attachment: attachment,
322
+ index: index,
323
+ message: message,
324
+ isUser: isUser,
325
+ fileToken: fileToken
326
+ }, attachment.attachmentId || `${index}-${attachment.location}`);
327
+ // In a multi-file message each file gets its own progress and Retry.
328
+ if (!attachment.uploadStatus || attachments.length < 2) {
329
+ return body;
212
330
  }
213
- switch (true) {
214
- case mimeType.startsWith('image/'):
215
- return /*#__PURE__*/_jsx(CustomMessageImage, {
216
- fileName: displayName,
217
- originalName: message?.originalName
218
- // Full-size original: opened by the preview modal.
219
- ,
220
- fileURL: location || messageText || ''
221
- // ...and the thumbnail the bubble actually renders, which is
222
- // what the web client shows too.
223
- ,
224
- locationPreview: messageText,
225
- mimetype: mimeType
226
- });
227
- case mimeType.startsWith('video/'):
228
- return /*#__PURE__*/_jsx(CustomMessageVideo, {
229
- fileName: displayName,
230
- originalName: message?.originalName,
231
- fileURL: location || ''
232
- // `messageText` is the message's locationPreview — the poster
233
- // frame the backend generated for this video. Handing it over
234
- // lets the bubble render as a still + play badge instead of
235
- // mounting a video surface per row (see VideoMessage).
236
- ,
237
- previewURL: messageText,
238
- mimetype: mimeType
239
- });
240
- case mimeType.startsWith('audio/'):
241
- {
242
- return /*#__PURE__*/_jsx(AudioMessage, {
243
- src: location || '',
244
- mimeType: mimeType,
245
- fileName: displayName,
246
- originalName: message?.originalName,
247
- duration: message?.duration,
248
- waveForm: message?.waveForm,
249
- isUser: isUser
250
- });
251
- }
252
- case mimeType.includes('application/octet-stream'):
253
- {
254
- return /*#__PURE__*/_jsx(AudioMessage, {
255
- src: location || '',
256
- mimeType: mimeType,
257
- fileName: displayName,
258
- originalName: message?.originalName,
259
- duration: message?.duration,
260
- waveForm: message?.waveForm,
261
- isUser: isUser
262
- });
263
- }
264
- default:
265
- {
266
- // Some senders (notably the web app's voice-message uploader)
267
- // ship audio as `application/octet-stream` with no audio file
268
- // extension. `isLikelyAudio` recognises those via the URL path,
269
- // filename, or voice-message naming hints (voicemail-,
270
- // voice-note-, recording-, …) so we still render the AudioMessage
271
- // player instead of falling through to the generic FileDownload
272
- // card (where the voicemail rendered as a broken `.bin`
273
- // attachment). Customer-reported #9 voicemail fix.
274
- if (isAudioPayload) {
275
- return /*#__PURE__*/_jsx(AudioMessage, {
276
- src: location || '',
277
- mimeType: mimeType,
278
- fileName: displayName,
279
- originalName: message?.originalName,
280
- duration: message?.duration,
281
- waveForm: message?.waveForm,
282
- isUser: isUser
283
- });
284
- }
285
- return /*#__PURE__*/_jsx(FileDownload, {
286
- fileURL: location ? location : '',
287
- fileName: displayName,
288
- mimetype: mimeType,
289
- isUser: isUser,
290
- originalName: message?.originalName,
291
- duration: message?.duration,
292
- waveForm: message?.waveForm
293
- });
294
- }
295
- }
331
+ return /*#__PURE__*/_jsxs(View, {
332
+ style: styles.uploadTile,
333
+ testID: `media-upload-tile-${index}`,
334
+ children: [body, /*#__PURE__*/_jsx(MediaUploadOverlay, {
335
+ status: attachment.uploadStatus,
336
+ progress: attachment.uploadProgress,
337
+ onRetry: message?.id ? () => requestMediaRetry(message.id, index) : undefined
338
+ })]
339
+ }, `tile-${attachment.attachmentId || index}`);
340
+ };
341
+
342
+ // Pictures and videos share one album when there are two or more of them;
343
+ // documents and voice notes follow as one card each. A lone picture is the
344
+ // ordinary bubble picture, exactly as a single-file message always was.
345
+ const album = attachments.filter(attachment => (Boolean(attachment.location) || isOutgoingFile(attachment)) && isAlbumKind(getFileKind({
346
+ mimetype: attachment.mimetype,
347
+ name: getAttachmentName(attachment),
348
+ url: attachment.location,
349
+ duration: attachment.duration
350
+ })));
351
+ const useAlbum = album.length >= 2;
352
+ const rest = useAlbum ? attachments.filter(attachment => !album.includes(attachment)) : attachments;
353
+
354
+ // One file and no text: the card alone, no wrapper around it.
355
+ if (!useAlbum && attachments.length === 1 && !caption) {
356
+ return card(attachments[0], 0);
296
357
  }
297
- return /*#__PURE__*/_jsx(Text, {
298
- style: {
299
- color: theme.text
300
- },
301
- children: "Unsupported media type"
358
+ return /*#__PURE__*/_jsxs(View, {
359
+ style: styles.stack,
360
+ children: [useAlbum && /*#__PURE__*/_jsx(AlbumGrid, {
361
+ attachments: album,
362
+ onRetryTile: message?.id ? position => requestMediaRetry(message.id, attachments.indexOf(album[position])) : undefined
363
+ }), rest.map(attachment => card(attachment, attachments.indexOf(attachment))), /*#__PURE__*/_jsx(MediaCaption, {
364
+ text: caption,
365
+ isUser: isUser
366
+ })]
302
367
  });
303
368
  };
304
369
  export default MediaMessage;
305
370
  const styles = StyleSheet.create({
371
+ stack: {
372
+ alignItems: 'flex-start',
373
+ gap: 4
374
+ },
375
+ // Frames one file of a multi-file message so its upload overlay covers it.
376
+ uploadTile: {
377
+ position: 'relative',
378
+ alignSelf: 'stretch',
379
+ borderRadius: 10,
380
+ overflow: 'hidden'
381
+ },
306
382
  pendingImageWrapper: {
307
383
  width: pendingImageDims.width,
308
384
  height: pendingImageDims.height,