@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
@@ -10,6 +10,10 @@ var _reactRedux = require("react-redux");
10
10
  var _roomStore = require("../../roomStore");
11
11
  var _callSlice = require("../../roomStore/callSlice");
12
12
  var _callTokenStanza = require("../../networking/callTokenStanza");
13
+ var _callActions = require("./callActions");
14
+ var _callSessionController = require("./callSessionController");
15
+ var _livekitRuntime = require("./livekitRuntime");
16
+ var _callUiStore = require("./callUiStore");
13
17
  /**
14
18
  * Native incoming-call UI (Android ConnectionService / iOS CallKit) via
15
19
  * the optional `react-native-callkeep` package.
@@ -19,6 +23,12 @@ var _callTokenStanza = require("../../networking/callTokenStanza");
19
23
  * loaded lazily exactly like the LiveKit packages, so hosts that don't
20
24
  * install it get the plain in-app ring screen and nothing breaks.
21
25
  *
26
+ * On iOS every call, incoming or outgoing, is also reported to CallKit for
27
+ * as long as it lasts. That is what puts it in the Dynamic Island / the
28
+ * green status-bar pill when the app is in the background, with the
29
+ * system's own mute and end buttons, and what keeps the call's audio
30
+ * running in the background.
31
+ *
22
32
  * Platform reality, stated plainly:
23
33
  * - Android: full value. A ConnectionService call shows the system
24
34
  * incoming-call screen over the lock screen.
@@ -78,16 +88,31 @@ const toUuid = seed => {
78
88
  const hex = bytes.map(b => b.toString(16).padStart(2, '0')).join('');
79
89
  return [hex.slice(0, 8), hex.slice(8, 12), '4' + hex.slice(13, 16), (parseInt(hex[16], 16) & 0x3 | 0x8).toString(16) + hex.slice(17, 20), hex.slice(20, 32)].join('-');
80
90
  };
91
+ const trace = (...args) => {
92
+ if (__DEV__) {
93
+ console.log('[calls] CallKit:', ...args);
94
+ }
95
+ };
81
96
  const useCallKeep = () => {
82
97
  const dispatch = (0, _reactRedux.useDispatch)();
83
98
  const call = (0, _reactRedux.useSelector)(state => state.call);
99
+ const session = (0, _callSessionController.useCallSession)();
84
100
  const callKeep = (0, _react.useMemo)(() => loadCallKeep(), []);
101
+ const [ready, setReady] = (0, _react.useState)(false);
85
102
  const activeUuidRef = (0, _react.useRef)(null);
86
- const readyRef = (0, _react.useRef)(false);
103
+ // The CallKit call has been answered (from the system screen or in-app).
104
+ const answeredRef = (0, _react.useRef)(false);
105
+ const outgoingReportedRef = (0, _react.useRef)('none');
106
+ const isIOS = _reactNative.Platform.OS === 'ios';
87
107
 
88
108
  // One-time native setup.
89
109
  (0, _react.useEffect)(() => {
90
110
  if (!callKeep) {
111
+ if (isIOS) {
112
+ // The usual reason for "no Dynamic Island": the JS package is there
113
+ // but the binary was built without the RNCallKeep pod.
114
+ trace('unavailable (react-native-callkeep is not linked in this build)');
115
+ }
91
116
  return;
92
117
  }
93
118
  let cancelled = false;
@@ -96,7 +121,12 @@ const useCallKeep = () => {
96
121
  await callKeep.setup({
97
122
  ios: {
98
123
  appName: 'Ethora',
99
- supportsVideo: true
124
+ supportsVideo: true,
125
+ maximumCallGroups: '1',
126
+ maximumCallsPerCallGroup: '1',
127
+ // Our calls are not phone calls: keep them out of the Phone
128
+ // app's Recents, whose entries would dial back into nowhere.
129
+ includesCallsInRecents: false
100
130
  },
101
131
  android: {
102
132
  alertTitle: 'Permissions required',
@@ -115,28 +145,35 @@ const useCallKeep = () => {
115
145
  return;
116
146
  }
117
147
  callKeep.setAvailable?.(true);
118
- readyRef.current = true;
119
- } catch {
148
+ trace('ready');
149
+ setReady(true);
150
+ } catch (error) {
151
+ trace('setup failed', error);
120
152
  // Host didn't grant phone-account permission, or the module isn't
121
153
  // linked. The in-app ring screen still works, so stay quiet.
122
- readyRef.current = false;
154
+ setReady(false);
123
155
  }
124
156
  })();
125
157
  return () => {
126
158
  cancelled = true;
127
159
  };
128
- }, [callKeep]);
160
+ }, [callKeep, isIOS]);
129
161
 
130
- // Bridge native answer/end actions back into Redux.
162
+ // Bridge native actions back into the call.
131
163
  (0, _react.useEffect)(() => {
132
164
  if (!callKeep) {
133
165
  return;
134
166
  }
135
167
  const onAnswer = () => {
168
+ answeredRef.current = true;
136
169
  // The user answered from the system screen, which on Android may
137
170
  // mean the app was not even in the foreground.
138
171
  callKeep.backToForeground?.();
139
- if (_roomStore.store.getState().call.direction === 'incoming') {
172
+ // Only from the ring: CallKit also reports the answer we make on its
173
+ // behalf after an in-app accept, and re-accepting then would drop an
174
+ // in-progress call back to 'connecting'.
175
+ const current = _roomStore.store.getState().call;
176
+ if (current.direction === 'incoming' && current.phase === 'ringing-incoming') {
140
177
  dispatch((0, _callSlice.acceptIncomingCall)());
141
178
  }
142
179
  };
@@ -148,54 +185,190 @@ const useCallKeep = () => {
148
185
  if (snapshot.direction === 'incoming' && snapshot.phase === 'ringing-incoming') {
149
186
  (0, _callTokenStanza.sendCallStateSignal)('declined');
150
187
  dispatch((0, _callSlice.declineIncomingCall)());
188
+ return;
189
+ }
190
+ // Ended from the Dynamic Island, the lock screen or a headset.
191
+ if (snapshot.phase === 'error') {
192
+ return;
193
+ }
194
+ (0, _callActions.terminateActiveCall)(snapshot.phase === 'requesting' ? 'cancelled' : 'ended');
195
+ };
196
+
197
+ // The system mute button (Dynamic Island, lock screen, CarPlay).
198
+ const onMuted = ({
199
+ muted
200
+ }) => {
201
+ void (0, _callSessionController.setCallMicEnabled)(!muted);
202
+ };
203
+
204
+ // Another call (e.g. a phone call) put ours on hold: stop sending audio.
205
+ const onHold = ({
206
+ hold
207
+ }) => {
208
+ if (hold) {
209
+ void (0, _callSessionController.setCallMicEnabled)(false);
210
+ }
211
+ };
212
+
213
+ // CallKit owns the iOS audio session: WebRTC may only start its audio
214
+ // unit once CallKit has activated the session.
215
+ const onAudioActivated = () => {
216
+ try {
217
+ (0, _livekitRuntime.loadLiveKit)()?.RTCAudioSession?.audioSessionDidActivate?.();
218
+ } catch {
219
+ // Older webrtc builds manage the session on their own.
220
+ }
221
+ };
222
+ const onAudioDeactivated = () => {
223
+ try {
224
+ (0, _livekitRuntime.loadLiveKit)()?.RTCAudioSession?.audioSessionDidDeactivate?.();
225
+ } catch {
226
+ // noop
151
227
  }
152
228
  };
153
229
  callKeep.addEventListener('answerCall', onAnswer);
154
230
  callKeep.addEventListener('endCall', onEnd);
231
+ callKeep.addEventListener('didPerformSetMutedCallAction', onMuted);
232
+ callKeep.addEventListener('didToggleHoldCallAction', onHold);
233
+ callKeep.addEventListener('didActivateAudioSession', onAudioActivated);
234
+ // CallKit rejected or dropped our calls (e.g. a build without the voip
235
+ // background mode): there is nothing to end any more.
236
+ const onReset = () => {
237
+ trace('provider reset');
238
+ };
239
+ callKeep.addEventListener('didResetProvider', onReset);
240
+ // The system's verdict on displayIncomingCall ("Unentitled" means the
241
+ // app lacks the voip background mode).
242
+ const onDisplayed = ({
243
+ error,
244
+ errorCode
245
+ }) => {
246
+ trace('incoming call shown', error ? `failed: ${errorCode || ''} ${error}` : 'ok');
247
+ // CallKit refused it (Do Not Disturb, unentitled...): bring the
248
+ // in-app ring card back so the call can still be answered.
249
+ if (error) {
250
+ (0, _callUiStore.setCallSystemRinging)(false);
251
+ }
252
+ };
253
+ callKeep.addEventListener('didDisplayIncomingCall', onDisplayed);
254
+ callKeep.addEventListener('didDeactivateAudioSession', onAudioDeactivated);
155
255
  return () => {
156
256
  callKeep.removeEventListener('answerCall');
157
257
  callKeep.removeEventListener('endCall');
258
+ callKeep.removeEventListener('didPerformSetMutedCallAction');
259
+ callKeep.removeEventListener('didToggleHoldCallAction');
260
+ callKeep.removeEventListener('didActivateAudioSession');
261
+ callKeep.removeEventListener('didDeactivateAudioSession');
262
+ callKeep.removeEventListener('didResetProvider');
263
+ callKeep.removeEventListener('didDisplayIncomingCall');
158
264
  };
159
265
  }, [callKeep, dispatch]);
266
+ const displayName = call.roomName || 'Ethora';
267
+ const isRinging = call.direction === 'incoming' && call.phase === 'ringing-incoming';
268
+ const isLive = call.phase === 'connecting' || call.phase === 'in-call';
269
+ const isOutgoing = call.direction === 'outgoing';
270
+ const peerConnected = session.anchorAt !== null;
160
271
 
161
- // Show / dismiss the native screen as the call state changes.
272
+ // Report the call to the system as its state changes.
162
273
  (0, _react.useEffect)(() => {
163
- if (!callKeep || !readyRef.current) {
274
+ if (!callKeep || !ready) {
164
275
  return;
165
276
  }
166
- const isRinging = call.direction === 'incoming' && call.phase === 'ringing-incoming';
167
- if (isRinging && !activeUuidRef.current) {
277
+ const release = () => {
278
+ if (!activeUuidRef.current) {
279
+ return;
280
+ }
281
+ try {
282
+ callKeep.endCall(activeUuidRef.current);
283
+ } catch {
284
+ // Screen already gone.
285
+ }
286
+ activeUuidRef.current = null;
287
+ answeredRef.current = false;
288
+ outgoingReportedRef.current = 'none';
289
+ };
290
+ if (call.phase === 'idle' || call.phase === 'error') {
291
+ release();
292
+ return;
293
+ }
294
+ if (isRinging) {
295
+ if (activeUuidRef.current) {
296
+ return;
297
+ }
168
298
  const uuid = toUuid(call.callId || call.roomJid || String(Date.now()));
169
299
  activeUuidRef.current = uuid;
300
+ answeredRef.current = false;
301
+ // iOS: the system banner is the ring UI (Telegram-style); the in-app
302
+ // card would only cover the screen under it.
303
+ if (isIOS) {
304
+ (0, _callUiStore.setCallSystemRinging)(true);
305
+ }
170
306
  try {
171
- callKeep.displayIncomingCall(uuid, call.peerXmppUsername || call.roomName || 'Ethora', call.roomName || undefined, 'generic', call.kind === 'video');
307
+ callKeep.displayIncomingCall(uuid, displayName, displayName, 'generic', call.kind === 'video');
172
308
  } catch {
173
309
  activeUuidRef.current = null;
310
+ (0, _callUiStore.setCallSystemRinging)(false);
174
311
  }
175
312
  return;
176
313
  }
177
314
 
178
- // Any exit from ringing (answered in-app, declined, peer cancelled)
179
- // must tear the system screen down or it hangs around ringing.
180
- if (!isRinging && activeUuidRef.current && call.phase !== 'connecting' && call.phase !== 'in-call') {
315
+ // iOS: an outgoing call is a CallKit call from the first ring, so it
316
+ // shows in the Dynamic Island even before the peer answers.
317
+ if (isIOS && isOutgoing && !activeUuidRef.current && callKeep.startCall) {
318
+ // Unique per call: CallKit refuses a UUID it has seen before, and
319
+ // the callId only arrives with the token.
320
+ const uuid = toUuid(`${call.roomJid || ''}|${call.startedAt || Date.now()}`);
321
+ activeUuidRef.current = uuid;
322
+ outgoingReportedRef.current = 'none';
323
+ trace('startCall', uuid);
181
324
  try {
182
- callKeep.endCall(activeUuidRef.current);
325
+ callKeep.startCall(uuid, displayName, displayName, 'generic', call.kind === 'video');
183
326
  } catch {
184
- // Screen already gone.
327
+ activeUuidRef.current = null;
185
328
  }
186
- activeUuidRef.current = null;
329
+ return;
330
+ }
331
+ const uuid = activeUuidRef.current;
332
+ if (!uuid) {
333
+ return;
334
+ }
335
+ if (isIOS && isOutgoing) {
336
+ if (peerConnected && outgoingReportedRef.current !== 'connected') {
337
+ outgoingReportedRef.current = 'connected';
338
+ callKeep.reportConnectedOutgoingCallWithUUID?.(uuid);
339
+ } else if (isLive && !peerConnected && outgoingReportedRef.current === 'none') {
340
+ outgoingReportedRef.current = 'connecting';
341
+ callKeep.reportConnectingOutgoingCallWithUUID?.(uuid);
342
+ }
343
+ return;
187
344
  }
188
- if (call.phase === 'idle' && activeUuidRef.current) {
345
+
346
+ // Incoming, accepted with the in-app button: tell CallKit, or its
347
+ // screen keeps ringing on top of the call.
348
+ if (isIOS && isLive && !answeredRef.current) {
349
+ answeredRef.current = true;
189
350
  try {
190
- callKeep.endCall(activeUuidRef.current);
351
+ callKeep.answerIncomingCall?.(uuid);
191
352
  } catch {
192
353
  // noop
193
354
  }
194
- activeUuidRef.current = null;
195
355
  }
196
- }, [callKeep, call.direction, call.phase, call.callId, call.roomJid, call.roomName, call.peerXmppUsername, call.kind]);
356
+ }, [callKeep, ready, isIOS, isRinging, isLive, isOutgoing, peerConnected, displayName, call.phase, call.callId, call.roomJid, call.startedAt, call.kind]);
197
357
 
198
- // Nothing to clean up on unmount beyond the active screen: this hook
358
+ // Keep the system mute button in step with ours.
359
+ (0, _react.useEffect)(() => {
360
+ const uuid = activeUuidRef.current;
361
+ if (!callKeep || !ready || !isIOS || !uuid || !isLive) {
362
+ return;
363
+ }
364
+ try {
365
+ callKeep.setMutedCall?.(uuid, !session.micOn);
366
+ } catch {
367
+ // noop
368
+ }
369
+ }, [callKeep, ready, isIOS, isLive, session.micOn]);
370
+
371
+ // Nothing to clean up on unmount beyond the active call: this hook
199
372
  // lives for the lifetime of the provider.
200
373
  (0, _react.useEffect)(() => () => {
201
374
  if (callKeep && activeUuidRef.current) {
@@ -206,10 +379,6 @@ const useCallKeep = () => {
206
379
  }
207
380
  }
208
381
  }, [callKeep]);
209
-
210
- // iOS-only note kept as a runtime no-op so the import isn't unused when
211
- // the platform check is tree-shaken in release builds.
212
- void _reactNative.Platform.OS;
213
382
  };
214
383
  exports.useCallKeep = useCallKeep;
215
384
  //# sourceMappingURL=useCallKeep.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactRedux","_roomStore","_callSlice","_callTokenStanza","cachedCallKeep","loadCallKeep","undefined","NativeModules","RNCallKeep","mod","default","exports","toUuid","seed","hash","bytes","i","ch","charCodeAt","Math","max","length","imul","push","hex","map","b","toString","padStart","join","slice","parseInt","useCallKeep","dispatch","useDispatch","call","useSelector","state","callKeep","useMemo","activeUuidRef","useRef","readyRef","useEffect","cancelled","setup","ios","appName","supportsVideo","android","alertTitle","alertDescription","cancelButton","okButton","additionalPermissions","foregroundService","channelId","channelName","notificationTitle","setAvailable","current","onAnswer","backToForeground","store","getState","direction","acceptIncomingCall","onEnd","snapshot","phase","sendCallStateSignal","declineIncomingCall","addEventListener","removeEventListener","isRinging","uuid","callId","roomJid","String","Date","now","displayIncomingCall","peerXmppUsername","roomName","kind","endCall","Platform","OS"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/useCallKeep.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA,IAAIM,cAAiD;AAE9C,MAAMC,YAAY,GAAGA,CAAA,KAA6B;EACvD,IAAID,cAAc,KAAKE,SAAS,EAAE;IAChC,OAAOF,cAAc;EACvB;EACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAM;MAAEG;IAAc,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kC,KAAK,KAAK,MAAM,IAAI7B,aAAa,CAACoB,OAAO,EAAE;MAClD,IAAI;QACFtB,QAAQ,CAAC+C,OAAO,CAAC7C,aAAa,CAACoB,OAAO,CAAC;MACzC,CAAC,CAAC,MAAM;QACN;MAAA;MAEFpB,aAAa,CAACoB,OAAO,GAAG,IAAI;IAC9B;EACF,CAAC,EAAE,CACDtB,QAAQ,EACRH,IAAI,CAAC8B,SAAS,EACd9B,IAAI,CAACkC,KAAK,EACVlC,IAAI,CAACyC,MAAM,EACXzC,IAAI,CAAC0C,OAAO,EACZ1C,IAAI,CAACgD,QAAQ,EACbhD,IAAI,CAAC+C,gBAAgB,EACrB/C,IAAI,CAACiD,IAAI,CACV,CAAC;;EAEF;EACA;EACA,IAAAzC,gBAAS,EACP,MAAM,MAAM;IACV,IAAIL,QAAQ,IAAIE,aAAa,CAACoB,OAAO,EAAE;MACrC,IAAI;QACFtB,QAAQ,CAAC+C,OAAO,CAAC7C,aAAa,CAACoB,OAAO,CAAC;MACzC,CAAC,CAAC,MAAM;QACN;MAAA;IAEJ;EACF,CAAC,EACD,CAACtB,QAAQ,CACX,CAAC;;EAED;EACA;EACA,KAAKgD,qBAAQ,CAACC,EAAE;AAClB,CAAC;AAAC5E,OAAA,CAAAqB,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNative","_reactRedux","_roomStore","_callSlice","_callTokenStanza","_callActions","_callSessionController","_livekitRuntime","_callUiStore","cachedCallKeep","loadCallKeep","undefined","NativeModules","RNCallKeep","mod","default","exports","toUuid","seed","hash","bytes","i","ch","charCodeAt","Math","max","length","imul","push","hex","map","b","toString","padStart","join","slice","parseInt","trace","args","__DEV__","console","log","useCallKeep","dispatch","useDispatch","call","useSelector","state","session","useCallSession","callKeep","useMemo","ready","setReady","useState","activeUuidRef","useRef","answeredRef","outgoingReportedRef","isIOS","Platform","OS","useEffect","cancelled","setup","ios","appName","supportsVideo","maximumCallGroups","maximumCallsPerCallGroup","includesCallsInRecents","android","alertTitle","alertDescription","cancelButton","okButton","additionalPermissions","foregroundService","channelId","channelName","notificationTitle","setAvailable","error","onAnswer","current","backToForeground","store","getState","direction","phase","acceptIncomingCall","onEnd","snapshot","sendCallStateSignal","declineIncomingCall","terminateActiveCall","onMuted","muted","setCallMicEnabled","onHold","hold","onAudioActivated","loadLiveKit","RTCAudioSession","audioSessionDidActivate","onAudioDeactivated","audioSessionDidDeactivate","addEventListener","onReset","onDisplayed","errorCode","setCallSystemRinging","removeEventListener","displayName","roomName","isRinging","isLive","isOutgoing","peerConnected","anchorAt","release","endCall","uuid","callId","roomJid","String","Date","now","displayIncomingCall","kind","startCall","startedAt","reportConnectedOutgoingCallWithUUID","reportConnectingOutgoingCallWithUUID","answerIncomingCall","setMutedCall","micOn"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/useCallKeep.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,sBAAA,GAAAP,OAAA;AACA,IAAAQ,eAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA+BA,IAAIU,cAAiD;AAE9C,MAAMC,YAAY,GAAGA,CAAA,KAA6B;EACvD,IAAID,cAAc,KAAKE,SAAS,EAAE;IAChC,OAAOF,cAAc;EACvB;EACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAM;MAAEG;IAAc,CAAC,GAAGb,OAAO,CAAC,cAAc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,OAAO;IAClC,IAAI,CAAClC,QAAQ,IAAI,CAACE,KAAK,IAAI,CAACO,KAAK,IAAI,CAAC+D,IAAI,IAAI,CAACN,MAAM,EAAE;MAAC;IAAO;IAC/D,IAAI;MACFlE,QAAQ,CAACqF,YAAY,GAAGb,IAAI,EAAE,CAAC1E,OAAO,CAACwF,KAAK,CAAC;IAC/C,CAAC,CAAC,MAAM;MACN;IAAA;EAEJ,CAAC,EAAE,CAACtF,QAAQ,EAAEE,KAAK,EAAEO,KAAK,EAAEyD,MAAM,EAAEpE,OAAO,CAACwF,KAAK,CAAC,CAAC;;EAEnD;EACA;EACA,IAAA1E,gBAAS,EACP,MAAM,MAAM;IACV,IAAIZ,QAAQ,IAAIK,aAAa,CAAC6B,OAAO,EAAE;MACrC,IAAI;QACFlC,QAAQ,CAACuE,OAAO,CAAClE,aAAa,CAAC6B,OAAO,CAAC;MACzC,CAAC,CAAC,MAAM;QACN;MAAA;IAEJ;EACF,CAAC,EACD,CAAClC,QAAQ,CACX,CAAC;AACH,CAAC;AAAClC,OAAA,CAAA0B,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useOngoingCallNotification = void 0;
7
+ var _react = require("react");
8
+ var _reactRedux = require("react-redux");
9
+ var _useT = require("../../i18n/useT");
10
+ var _callActions = require("./callActions");
11
+ var _callSessionController = require("./callSessionController");
12
+ var _callUiStore = require("./callUiStore");
13
+ /**
14
+ * Drives the host's ongoing-call notification (`videoCalls.
15
+ * ongoingCallNotification`, an Android foreground-service notification in
16
+ * the Ethora app): shown while a call is connecting or connected, updated
17
+ * when the mic, camera or timer anchor change, and its buttons act on the
18
+ * call like the in-app ones.
19
+ */
20
+ const useOngoingCallNotification = adapter => {
21
+ const t = (0, _useT.useT)();
22
+ const call = (0, _reactRedux.useSelector)(state => state.call);
23
+ const session = (0, _callSessionController.useCallSession)();
24
+ const shownRef = (0, _react.useRef)(false);
25
+ const live = !!call.token && (call.phase === 'connecting' || call.phase === 'in-call');
26
+ (0, _react.useEffect)(() => {
27
+ if (!adapter) {
28
+ return;
29
+ }
30
+ return adapter.addActionListener(action => {
31
+ switch (action) {
32
+ case 'hangUp':
33
+ (0, _callActions.terminateActiveCall)('ended');
34
+ break;
35
+ case 'toggleMic':
36
+ void (0, _callSessionController.toggleCallMic)();
37
+ break;
38
+ case 'toggleCamera':
39
+ void (0, _callSessionController.toggleCallCamera)();
40
+ break;
41
+ case 'open':
42
+ // Back from the notification: show the call, not the strip.
43
+ (0, _callUiStore.setCallMinimized)(false);
44
+ break;
45
+ }
46
+ });
47
+ }, [adapter]);
48
+ const isVideo = call.kind === 'video';
49
+ const connectedAt = session.anchorAt;
50
+ const text = connectedAt !== null ? isVideo ? t('call.notification.ongoingVideo') : t('call.notification.ongoing') : !session.connected ? t('call.status.connecting') : t('call.status.waitingForPeer');
51
+ (0, _react.useEffect)(() => {
52
+ if (!adapter) {
53
+ return;
54
+ }
55
+ if (!live) {
56
+ if (shownRef.current) {
57
+ shownRef.current = false;
58
+ adapter.hide();
59
+ }
60
+ return;
61
+ }
62
+ shownRef.current = true;
63
+ adapter.show({
64
+ callId: call.callId || call.roomJid || 'call',
65
+ title: call.roomName || t('call.unknownCaller'),
66
+ text,
67
+ kind: call.kind,
68
+ connectedAt,
69
+ micOn: session.micOn,
70
+ cameraOn: isVideo && session.cameraOn,
71
+ labels: {
72
+ hangUp: t('call.action.hangUp'),
73
+ mute: t('call.notification.mute'),
74
+ unmute: t('call.notification.unmute'),
75
+ cameraOn: t('call.notification.cameraOn'),
76
+ cameraOff: t('call.notification.cameraOff')
77
+ }
78
+ });
79
+ }, [adapter, live, t, text, connectedAt, isVideo, call.callId, call.roomJid, call.roomName, call.kind, session.micOn, session.cameraOn]);
80
+ (0, _react.useEffect)(() => () => {
81
+ if (adapter && shownRef.current) {
82
+ shownRef.current = false;
83
+ adapter.hide();
84
+ }
85
+ }, [adapter]);
86
+ };
87
+ exports.useOngoingCallNotification = useOngoingCallNotification;
88
+ //# sourceMappingURL=useOngoingCallNotification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactRedux","_useT","_callActions","_callSessionController","_callUiStore","useOngoingCallNotification","adapter","t","useT","call","useSelector","state","session","useCallSession","shownRef","useRef","live","token","phase","useEffect","addActionListener","action","terminateActiveCall","toggleCallMic","toggleCallCamera","setCallMinimized","isVideo","kind","connectedAt","anchorAt","text","connected","current","hide","show","callId","roomJid","title","roomName","micOn","cameraOn","labels","hangUp","mute","unmute","cameraOff","exports"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/useOngoingCallNotification.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,0BAA0B,GACrCC,OAA4C,IACnC;EACT,MAAMC,CAAC,GAAG,IAAAC,UAAI,EAAC,CAAC;EAChB,MAAMC,IAAI,GAAG,IAAAC,uBAAW,EAAEC,KAAgB,IAAKA,KAAK,CAACF,IAAI,CAAC;EAC1D,MAAMG,OAAO,GAAG,IAAAC,qCAAc,EAAC,CAAC;EAChC,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,KAAK,CAAC;EAE9B,MAAMC,IAAI,GACR,CAAC,CAACP,IAAI,CAACQ,KAAK,KAAKR,IAAI,CAACS,KAAK,KAAK,YAAY,IAAIT,IAAI,CAACS,KAAK,KAAK,SAAS,CAAC;EAE3E,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAI,CAACb,OAAO,EAAE;MAAC;IAAO;IACtB,OAAOA,OAAO,CAACc,iBAAiB,CAAEC,MAAqC,IAA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