@ethora/chat-component-rn 26.10.9 → 26.10.11

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 (608) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +126 -1
  3. package/lib/commonjs/booking/index.js +44 -0
  4. package/lib/commonjs/booking/index.js.map +1 -0
  5. package/lib/commonjs/booking/pendingScheduledCall.js +275 -0
  6. package/lib/commonjs/booking/pendingScheduledCall.js.map +1 -0
  7. package/lib/commonjs/booking/scheduleForm.js +91 -0
  8. package/lib/commonjs/booking/scheduleForm.js.map +1 -0
  9. package/lib/commonjs/booking/scheduledCall.js +141 -0
  10. package/lib/commonjs/booking/scheduledCall.js.map +1 -0
  11. package/lib/commonjs/booking/scheduledCallActions.js +128 -0
  12. package/lib/commonjs/booking/scheduledCallActions.js.map +1 -0
  13. package/lib/commonjs/booking/scheduledCallLink.js +143 -0
  14. package/lib/commonjs/booking/scheduledCallLink.js.map +1 -0
  15. package/lib/commonjs/booking/scheduledCallStore.js +64 -0
  16. package/lib/commonjs/booking/scheduledCallStore.js.map +1 -0
  17. package/lib/commonjs/booking/startRoomCall.js +84 -0
  18. package/lib/commonjs/booking/startRoomCall.js.map +1 -0
  19. package/lib/commonjs/calls/callBusy.js +18 -0
  20. package/lib/commonjs/calls/callBusy.js.map +1 -0
  21. package/lib/commonjs/calls/callDisplay.js +73 -0
  22. package/lib/commonjs/calls/callDisplay.js.map +1 -0
  23. package/lib/commonjs/calls/callMode.js +175 -0
  24. package/lib/commonjs/calls/callMode.js.map +1 -0
  25. package/lib/commonjs/calls/declineReport.js +20 -0
  26. package/lib/commonjs/calls/declineReport.js.map +1 -0
  27. package/lib/commonjs/calls/p2p/P2PCallController.js +724 -0
  28. package/lib/commonjs/calls/p2p/P2PCallController.js.map +1 -0
  29. package/lib/commonjs/calls/p2p/icePolicy.js +107 -0
  30. package/lib/commonjs/calls/p2p/icePolicy.js.map +1 -0
  31. package/lib/commonjs/calls/p2p/negotiator.js +202 -0
  32. package/lib/commonjs/calls/p2p/negotiator.js.map +1 -0
  33. package/lib/commonjs/calls/p2p/p2pRuntime.js +147 -0
  34. package/lib/commonjs/calls/p2p/p2pRuntime.js.map +1 -0
  35. package/lib/commonjs/calls/p2p/signalInbox.js +98 -0
  36. package/lib/commonjs/calls/p2p/signalInbox.js.map +1 -0
  37. package/lib/commonjs/calls/p2p/signalStanza.js +141 -0
  38. package/lib/commonjs/calls/p2p/signalStanza.js.map +1 -0
  39. package/lib/commonjs/calls/p2p/webrtcRuntime.js +53 -0
  40. package/lib/commonjs/calls/p2p/webrtcRuntime.js.map +1 -0
  41. package/lib/commonjs/calls/senderTrust.js +43 -0
  42. package/lib/commonjs/calls/senderTrust.js.map +1 -0
  43. package/lib/commonjs/calls/startCall.js +51 -0
  44. package/lib/commonjs/calls/startCall.js.map +1 -0
  45. package/lib/commonjs/components/Booking/BookingIcons.js +55 -0
  46. package/lib/commonjs/components/Booking/BookingIcons.js.map +1 -0
  47. package/lib/commonjs/components/Booking/ScheduleCallButton.js +64 -0
  48. package/lib/commonjs/components/Booking/ScheduleCallButton.js.map +1 -0
  49. package/lib/commonjs/components/Booking/ScheduleCallSheet.js +351 -0
  50. package/lib/commonjs/components/Booking/ScheduleCallSheet.js.map +1 -0
  51. package/lib/commonjs/components/Booking/ScheduledCallCard.js +203 -0
  52. package/lib/commonjs/components/Booking/ScheduledCallCard.js.map +1 -0
  53. package/lib/commonjs/components/Booking/ScheduledCallHost.js +23 -0
  54. package/lib/commonjs/components/Booking/ScheduledCallHost.js.map +1 -0
  55. package/lib/commonjs/components/Booking/ScheduledCallMessage.js +55 -0
  56. package/lib/commonjs/components/Booking/ScheduledCallMessage.js.map +1 -0
  57. package/lib/commonjs/components/Booking/ScheduledCallPreJoin.js +235 -0
  58. package/lib/commonjs/components/Booking/ScheduledCallPreJoin.js.map +1 -0
  59. package/lib/commonjs/components/Booking/bookingShared.js +305 -0
  60. package/lib/commonjs/components/Booking/bookingShared.js.map +1 -0
  61. package/lib/commonjs/components/MainComponents/AlbumGrid.js +6 -2
  62. package/lib/commonjs/components/MainComponents/AlbumGrid.js.map +1 -1
  63. package/lib/commonjs/components/MainComponents/ChatHeader.js +18 -12
  64. package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
  65. package/lib/commonjs/components/MainComponents/LanguageSelectorButton.js +5 -2
  66. package/lib/commonjs/components/MainComponents/LanguageSelectorButton.js.map +1 -1
  67. package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js +6 -3
  68. package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js.map +1 -1
  69. package/lib/commonjs/components/MainComponents/MediaMessage.js +13 -0
  70. package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
  71. package/lib/commonjs/components/MainComponents/MessageContainer.js +13 -0
  72. package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
  73. package/lib/commonjs/components/MainComponents/ReduxWrapper.js +10 -0
  74. package/lib/commonjs/components/MainComponents/ReduxWrapper.js.map +1 -1
  75. package/lib/commonjs/components/MainComponents/RoomList.js +7 -16
  76. package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
  77. package/lib/commonjs/components/MessageBubble/Message.js +27 -1
  78. package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
  79. package/lib/commonjs/components/Modals/ChatProfileModal/ChatMediaGrid.js +159 -0
  80. package/lib/commonjs/components/Modals/ChatProfileModal/ChatMediaGrid.js.map +1 -0
  81. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +203 -134
  82. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  83. package/lib/commonjs/components/Modals/ChatProfileModal/LeaveChatModal.js +180 -0
  84. package/lib/commonjs/components/Modals/ChatProfileModal/LeaveChatModal.js.map +1 -0
  85. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +19 -15
  86. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -1
  87. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +100 -162
  88. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  89. package/lib/commonjs/components/Modals/FilePreviewModal/MediaViewer.js +824 -0
  90. package/lib/commonjs/components/Modals/FilePreviewModal/MediaViewer.js.map +1 -0
  91. package/lib/commonjs/components/Modals/FilePreviewModal/useSaveFile.js +179 -0
  92. package/lib/commonjs/components/Modals/FilePreviewModal/useSaveFile.js.map +1 -0
  93. package/lib/commonjs/components/Modals/MessageSearchModal/MessageSearchModal.js +22 -5
  94. package/lib/commonjs/components/Modals/MessageSearchModal/MessageSearchModal.js.map +1 -1
  95. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +15 -8
  96. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  97. package/lib/commonjs/components/Modals/UserSettingsModal/LanguageCard.js +1 -1
  98. package/lib/commonjs/components/Modals/UserSettingsModal/LanguageCard.js.map +1 -1
  99. package/lib/commonjs/components/VideoCalls/ActiveCallBar.js +3 -2
  100. package/lib/commonjs/components/VideoCalls/ActiveCallBar.js.map +1 -1
  101. package/lib/commonjs/components/VideoCalls/CallButtons.js +19 -11
  102. package/lib/commonjs/components/VideoCalls/CallButtons.js.map +1 -1
  103. package/lib/commonjs/components/VideoCalls/CallControlBar.js +119 -0
  104. package/lib/commonjs/components/VideoCalls/CallControlBar.js.map +1 -0
  105. package/lib/commonjs/components/VideoCalls/CallVideo.js +49 -0
  106. package/lib/commonjs/components/VideoCalls/CallVideo.js.map +1 -0
  107. package/lib/commonjs/components/VideoCalls/GroupCallView.js +281 -0
  108. package/lib/commonjs/components/VideoCalls/GroupCallView.js.map +1 -0
  109. package/lib/commonjs/components/VideoCalls/P2PCallRunner.js +151 -0
  110. package/lib/commonjs/components/VideoCalls/P2PCallRunner.js.map +1 -0
  111. package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js +38 -14
  112. package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js.map +1 -1
  113. package/lib/commonjs/components/VideoCalls/VideoCallSession.js +57 -128
  114. package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
  115. package/lib/commonjs/components/VideoCalls/callActions.js +3 -0
  116. package/lib/commonjs/components/VideoCalls/callActions.js.map +1 -1
  117. package/lib/commonjs/components/VideoCalls/callElapsed.js +38 -0
  118. package/lib/commonjs/components/VideoCalls/callElapsed.js.map +1 -0
  119. package/lib/commonjs/components/VideoCalls/callLive.js +15 -0
  120. package/lib/commonjs/components/VideoCalls/callLive.js.map +1 -0
  121. package/lib/commonjs/components/VideoCalls/callSessionController.js +81 -24
  122. package/lib/commonjs/components/VideoCalls/callSessionController.js.map +1 -1
  123. package/lib/commonjs/components/VideoCalls/callSessionTypes.js +41 -0
  124. package/lib/commonjs/components/VideoCalls/callSessionTypes.js.map +1 -0
  125. package/lib/commonjs/components/VideoCalls/groupLayout.js +43 -0
  126. package/lib/commonjs/components/VideoCalls/groupLayout.js.map +1 -0
  127. package/lib/commonjs/components/VideoCalls/p2pCallSession.js +272 -0
  128. package/lib/commonjs/components/VideoCalls/p2pCallSession.js.map +1 -0
  129. package/lib/commonjs/components/VideoCalls/useCallKeep.js +7 -2
  130. package/lib/commonjs/components/VideoCalls/useCallKeep.js.map +1 -1
  131. package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js +2 -1
  132. package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js.map +1 -1
  133. package/lib/commonjs/components/styled/MessageImage.js +4 -1
  134. package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
  135. package/lib/commonjs/components/styled/VideoMessage.js +5 -1
  136. package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
  137. package/lib/commonjs/context/MediaSourceContext.js +18 -0
  138. package/lib/commonjs/context/MediaSourceContext.js.map +1 -0
  139. package/lib/commonjs/context/xmppProvider.js +2 -1
  140. package/lib/commonjs/context/xmppProvider.js.map +1 -1
  141. package/lib/commonjs/helpers/callPush.js +3 -1
  142. package/lib/commonjs/helpers/callPush.js.map +1 -1
  143. package/lib/commonjs/helpers/constants/MODAL_COMPONENTS.js +3 -1
  144. package/lib/commonjs/helpers/constants/MODAL_COMPONENTS.js.map +1 -1
  145. package/lib/commonjs/helpers/constants/MODAL_TYPES.js +2 -0
  146. package/lib/commonjs/helpers/constants/MODAL_TYPES.js.map +1 -1
  147. package/lib/commonjs/helpers/incomingCallFromPush.js +63 -7
  148. package/lib/commonjs/helpers/incomingCallFromPush.js.map +1 -1
  149. package/lib/commonjs/helpers/publicChatsEntry.js +8 -6
  150. package/lib/commonjs/helpers/publicChatsEntry.js.map +1 -1
  151. package/lib/commonjs/helpers/pushPayload.js +5 -0
  152. package/lib/commonjs/helpers/pushPayload.js.map +1 -1
  153. package/lib/commonjs/helpers/reportRoom.js +76 -0
  154. package/lib/commonjs/helpers/reportRoom.js.map +1 -0
  155. package/lib/commonjs/helpers/roomMedia.js +118 -0
  156. package/lib/commonjs/helpers/roomMedia.js.map +1 -0
  157. package/lib/commonjs/i18n/strings.js +480 -0
  158. package/lib/commonjs/i18n/strings.js.map +1 -1
  159. package/lib/commonjs/main.js +93 -0
  160. package/lib/commonjs/main.js.map +1 -1
  161. package/lib/commonjs/networking/api-requests/callState.api.js +75 -0
  162. package/lib/commonjs/networking/api-requests/callState.api.js.map +1 -0
  163. package/lib/commonjs/networking/api-requests/push.api.js +29 -6
  164. package/lib/commonjs/networking/api-requests/push.api.js.map +1 -1
  165. package/lib/commonjs/networking/api-requests/rooms.api.js +17 -15
  166. package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
  167. package/lib/commonjs/networking/api-requests/scheduledCalls.api.js +141 -0
  168. package/lib/commonjs/networking/api-requests/scheduledCalls.api.js.map +1 -0
  169. package/lib/commonjs/networking/callTokenStanza.js +210 -50
  170. package/lib/commonjs/networking/callTokenStanza.js.map +1 -1
  171. package/lib/commonjs/roomStore/callSlice.js +59 -4
  172. package/lib/commonjs/roomStore/callSlice.js.map +1 -1
  173. package/lib/commonjs/services/appBadge.js +80 -0
  174. package/lib/commonjs/services/appBadge.js.map +1 -0
  175. package/lib/commonjs/services/languageSettings.js +47 -15
  176. package/lib/commonjs/services/languageSettings.js.map +1 -1
  177. package/lib/commonjs/services/pushRegistration.js +21 -5
  178. package/lib/commonjs/services/pushRegistration.js.map +1 -1
  179. package/lib/commonjs/version.js +1 -1
  180. package/lib/commonjs/version.js.map +1 -1
  181. package/lib/module/booking/index.js +5 -0
  182. package/lib/module/booking/index.js.map +1 -0
  183. package/lib/module/booking/pendingScheduledCall.js +261 -0
  184. package/lib/module/booking/pendingScheduledCall.js.map +1 -0
  185. package/lib/module/booking/scheduleForm.js +79 -0
  186. package/lib/module/booking/scheduleForm.js.map +1 -0
  187. package/lib/module/booking/scheduledCall.js +129 -0
  188. package/lib/module/booking/scheduledCall.js.map +1 -0
  189. package/lib/module/booking/scheduledCallActions.js +118 -0
  190. package/lib/module/booking/scheduledCallActions.js.map +1 -0
  191. package/lib/module/booking/scheduledCallLink.js +136 -0
  192. package/lib/module/booking/scheduledCallLink.js.map +1 -0
  193. package/lib/module/booking/scheduledCallStore.js +60 -0
  194. package/lib/module/booking/scheduledCallStore.js.map +1 -0
  195. package/lib/module/booking/startRoomCall.js +80 -0
  196. package/lib/module/booking/startRoomCall.js.map +1 -0
  197. package/lib/module/calls/callBusy.js +13 -0
  198. package/lib/module/calls/callBusy.js.map +1 -0
  199. package/lib/module/calls/callDisplay.js +65 -0
  200. package/lib/module/calls/callDisplay.js.map +1 -0
  201. package/lib/module/calls/callMode.js +168 -0
  202. package/lib/module/calls/callMode.js.map +1 -0
  203. package/lib/module/calls/declineReport.js +16 -0
  204. package/lib/module/calls/declineReport.js.map +1 -0
  205. package/lib/module/calls/p2p/P2PCallController.js +718 -0
  206. package/lib/module/calls/p2p/P2PCallController.js.map +1 -0
  207. package/lib/module/calls/p2p/icePolicy.js +102 -0
  208. package/lib/module/calls/p2p/icePolicy.js.map +1 -0
  209. package/lib/module/calls/p2p/negotiator.js +197 -0
  210. package/lib/module/calls/p2p/negotiator.js.map +1 -0
  211. package/lib/module/calls/p2p/p2pRuntime.js +137 -0
  212. package/lib/module/calls/p2p/p2pRuntime.js.map +1 -0
  213. package/lib/module/calls/p2p/signalInbox.js +93 -0
  214. package/lib/module/calls/p2p/signalInbox.js.map +1 -0
  215. package/lib/module/calls/p2p/signalStanza.js +135 -0
  216. package/lib/module/calls/p2p/signalStanza.js.map +1 -0
  217. package/lib/module/calls/p2p/webrtcRuntime.js +46 -0
  218. package/lib/module/calls/p2p/webrtcRuntime.js.map +1 -0
  219. package/lib/module/calls/senderTrust.js +38 -0
  220. package/lib/module/calls/senderTrust.js.map +1 -0
  221. package/lib/module/calls/startCall.js +47 -0
  222. package/lib/module/calls/startCall.js.map +1 -0
  223. package/lib/module/components/Booking/BookingIcons.js +48 -0
  224. package/lib/module/components/Booking/BookingIcons.js.map +1 -0
  225. package/lib/module/components/Booking/ScheduleCallButton.js +59 -0
  226. package/lib/module/components/Booking/ScheduleCallButton.js.map +1 -0
  227. package/lib/module/components/Booking/ScheduleCallSheet.js +345 -0
  228. package/lib/module/components/Booking/ScheduleCallSheet.js.map +1 -0
  229. package/lib/module/components/Booking/ScheduledCallCard.js +197 -0
  230. package/lib/module/components/Booking/ScheduledCallCard.js.map +1 -0
  231. package/lib/module/components/Booking/ScheduledCallHost.js +18 -0
  232. package/lib/module/components/Booking/ScheduledCallHost.js.map +1 -0
  233. package/lib/module/components/Booking/ScheduledCallMessage.js +48 -0
  234. package/lib/module/components/Booking/ScheduledCallMessage.js.map +1 -0
  235. package/lib/module/components/Booking/ScheduledCallPreJoin.js +229 -0
  236. package/lib/module/components/Booking/ScheduledCallPreJoin.js.map +1 -0
  237. package/lib/module/components/Booking/bookingShared.js +291 -0
  238. package/lib/module/components/Booking/bookingShared.js.map +1 -0
  239. package/lib/module/components/MainComponents/AlbumGrid.js +6 -2
  240. package/lib/module/components/MainComponents/AlbumGrid.js.map +1 -1
  241. package/lib/module/components/MainComponents/ChatHeader.js +20 -14
  242. package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
  243. package/lib/module/components/MainComponents/LanguageSelectorButton.js +5 -2
  244. package/lib/module/components/MainComponents/LanguageSelectorButton.js.map +1 -1
  245. package/lib/module/components/MainComponents/LanguageSelectorModal.js +7 -4
  246. package/lib/module/components/MainComponents/LanguageSelectorModal.js.map +1 -1
  247. package/lib/module/components/MainComponents/MediaMessage.js +13 -0
  248. package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
  249. package/lib/module/components/MainComponents/MessageContainer.js +13 -0
  250. package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
  251. package/lib/module/components/MainComponents/ReduxWrapper.js +10 -0
  252. package/lib/module/components/MainComponents/ReduxWrapper.js.map +1 -1
  253. package/lib/module/components/MainComponents/RoomList.js +7 -16
  254. package/lib/module/components/MainComponents/RoomList.js.map +1 -1
  255. package/lib/module/components/MessageBubble/Message.js +27 -1
  256. package/lib/module/components/MessageBubble/Message.js.map +1 -1
  257. package/lib/module/components/Modals/ChatProfileModal/ChatMediaGrid.js +154 -0
  258. package/lib/module/components/Modals/ChatProfileModal/ChatMediaGrid.js.map +1 -0
  259. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +204 -136
  260. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  261. package/lib/module/components/Modals/ChatProfileModal/LeaveChatModal.js +175 -0
  262. package/lib/module/components/Modals/ChatProfileModal/LeaveChatModal.js.map +1 -0
  263. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +21 -15
  264. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -1
  265. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +100 -163
  266. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  267. package/lib/module/components/Modals/FilePreviewModal/MediaViewer.js +819 -0
  268. package/lib/module/components/Modals/FilePreviewModal/MediaViewer.js.map +1 -0
  269. package/lib/module/components/Modals/FilePreviewModal/useSaveFile.js +172 -0
  270. package/lib/module/components/Modals/FilePreviewModal/useSaveFile.js.map +1 -0
  271. package/lib/module/components/Modals/MessageSearchModal/MessageSearchModal.js +20 -4
  272. package/lib/module/components/Modals/MessageSearchModal/MessageSearchModal.js.map +1 -1
  273. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +17 -10
  274. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  275. package/lib/module/components/Modals/UserSettingsModal/LanguageCard.js +1 -1
  276. package/lib/module/components/Modals/UserSettingsModal/LanguageCard.js.map +1 -1
  277. package/lib/module/components/VideoCalls/ActiveCallBar.js +3 -2
  278. package/lib/module/components/VideoCalls/ActiveCallBar.js.map +1 -1
  279. package/lib/module/components/VideoCalls/CallButtons.js +19 -11
  280. package/lib/module/components/VideoCalls/CallButtons.js.map +1 -1
  281. package/lib/module/components/VideoCalls/CallControlBar.js +113 -0
  282. package/lib/module/components/VideoCalls/CallControlBar.js.map +1 -0
  283. package/lib/module/components/VideoCalls/CallVideo.js +43 -0
  284. package/lib/module/components/VideoCalls/CallVideo.js.map +1 -0
  285. package/lib/module/components/VideoCalls/GroupCallView.js +275 -0
  286. package/lib/module/components/VideoCalls/GroupCallView.js.map +1 -0
  287. package/lib/module/components/VideoCalls/P2PCallRunner.js +147 -0
  288. package/lib/module/components/VideoCalls/P2PCallRunner.js.map +1 -0
  289. package/lib/module/components/VideoCalls/VideoCallOverlay.js +38 -14
  290. package/lib/module/components/VideoCalls/VideoCallOverlay.js.map +1 -1
  291. package/lib/module/components/VideoCalls/VideoCallSession.js +46 -127
  292. package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
  293. package/lib/module/components/VideoCalls/callActions.js +3 -0
  294. package/lib/module/components/VideoCalls/callActions.js.map +1 -1
  295. package/lib/module/components/VideoCalls/callElapsed.js +33 -0
  296. package/lib/module/components/VideoCalls/callElapsed.js.map +1 -0
  297. package/lib/module/components/VideoCalls/callLive.js +10 -0
  298. package/lib/module/components/VideoCalls/callLive.js.map +1 -0
  299. package/lib/module/components/VideoCalls/callSessionController.js +80 -24
  300. package/lib/module/components/VideoCalls/callSessionController.js.map +1 -1
  301. package/lib/module/components/VideoCalls/callSessionTypes.js +37 -0
  302. package/lib/module/components/VideoCalls/callSessionTypes.js.map +1 -0
  303. package/lib/module/components/VideoCalls/groupLayout.js +36 -0
  304. package/lib/module/components/VideoCalls/groupLayout.js.map +1 -0
  305. package/lib/module/components/VideoCalls/p2pCallSession.js +256 -0
  306. package/lib/module/components/VideoCalls/p2pCallSession.js.map +1 -0
  307. package/lib/module/components/VideoCalls/useCallKeep.js +8 -2
  308. package/lib/module/components/VideoCalls/useCallKeep.js.map +1 -1
  309. package/lib/module/components/VideoCalls/useOngoingCallNotification.js +2 -1
  310. package/lib/module/components/VideoCalls/useOngoingCallNotification.js.map +1 -1
  311. package/lib/module/components/styled/MessageImage.js +4 -1
  312. package/lib/module/components/styled/MessageImage.js.map +1 -1
  313. package/lib/module/components/styled/VideoMessage.js +5 -1
  314. package/lib/module/components/styled/VideoMessage.js.map +1 -1
  315. package/lib/module/context/MediaSourceContext.js +13 -0
  316. package/lib/module/context/MediaSourceContext.js.map +1 -0
  317. package/lib/module/context/xmppProvider.js +2 -1
  318. package/lib/module/context/xmppProvider.js.map +1 -1
  319. package/lib/module/helpers/callPush.js +3 -1
  320. package/lib/module/helpers/callPush.js.map +1 -1
  321. package/lib/module/helpers/constants/MODAL_COMPONENTS.js +2 -1
  322. package/lib/module/helpers/constants/MODAL_COMPONENTS.js.map +1 -1
  323. package/lib/module/helpers/constants/MODAL_TYPES.js +2 -0
  324. package/lib/module/helpers/constants/MODAL_TYPES.js.map +1 -1
  325. package/lib/module/helpers/incomingCallFromPush.js +63 -7
  326. package/lib/module/helpers/incomingCallFromPush.js.map +1 -1
  327. package/lib/module/helpers/publicChatsEntry.js +8 -6
  328. package/lib/module/helpers/publicChatsEntry.js.map +1 -1
  329. package/lib/module/helpers/pushPayload.js +5 -0
  330. package/lib/module/helpers/pushPayload.js.map +1 -1
  331. package/lib/module/helpers/reportRoom.js +70 -0
  332. package/lib/module/helpers/reportRoom.js.map +1 -0
  333. package/lib/module/helpers/roomMedia.js +112 -0
  334. package/lib/module/helpers/roomMedia.js.map +1 -0
  335. package/lib/module/i18n/strings.js +480 -0
  336. package/lib/module/i18n/strings.js.map +1 -1
  337. package/lib/module/main.js +5 -0
  338. package/lib/module/main.js.map +1 -1
  339. package/lib/module/networking/api-requests/callState.api.js +66 -0
  340. package/lib/module/networking/api-requests/callState.api.js.map +1 -0
  341. package/lib/module/networking/api-requests/push.api.js +29 -6
  342. package/lib/module/networking/api-requests/push.api.js.map +1 -1
  343. package/lib/module/networking/api-requests/rooms.api.js +17 -15
  344. package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
  345. package/lib/module/networking/api-requests/scheduledCalls.api.js +130 -0
  346. package/lib/module/networking/api-requests/scheduledCalls.api.js.map +1 -0
  347. package/lib/module/networking/callTokenStanza.js +210 -50
  348. package/lib/module/networking/callTokenStanza.js.map +1 -1
  349. package/lib/module/roomStore/callSlice.js +57 -3
  350. package/lib/module/roomStore/callSlice.js.map +1 -1
  351. package/lib/module/services/appBadge.js +74 -0
  352. package/lib/module/services/appBadge.js.map +1 -0
  353. package/lib/module/services/languageSettings.js +44 -13
  354. package/lib/module/services/languageSettings.js.map +1 -1
  355. package/lib/module/services/pushRegistration.js +21 -5
  356. package/lib/module/services/pushRegistration.js.map +1 -1
  357. package/lib/module/version.js +1 -1
  358. package/lib/module/version.js.map +1 -1
  359. package/lib/typescript/booking/index.d.ts +3 -0
  360. package/lib/typescript/booking/index.d.ts.map +1 -0
  361. package/lib/typescript/booking/pendingScheduledCall.d.ts +80 -0
  362. package/lib/typescript/booking/pendingScheduledCall.d.ts.map +1 -0
  363. package/lib/typescript/booking/scheduleForm.d.ts +28 -0
  364. package/lib/typescript/booking/scheduleForm.d.ts.map +1 -0
  365. package/lib/typescript/booking/scheduledCall.d.ts +52 -0
  366. package/lib/typescript/booking/scheduledCall.d.ts.map +1 -0
  367. package/lib/typescript/booking/scheduledCallActions.d.ts +22 -0
  368. package/lib/typescript/booking/scheduledCallActions.d.ts.map +1 -0
  369. package/lib/typescript/booking/scheduledCallLink.d.ts +37 -0
  370. package/lib/typescript/booking/scheduledCallLink.d.ts.map +1 -0
  371. package/lib/typescript/booking/scheduledCallStore.d.ts +47 -0
  372. package/lib/typescript/booking/scheduledCallStore.d.ts.map +1 -0
  373. package/lib/typescript/booking/startRoomCall.d.ts +12 -0
  374. package/lib/typescript/booking/startRoomCall.d.ts.map +1 -0
  375. package/lib/typescript/calls/callBusy.d.ts +9 -0
  376. package/lib/typescript/calls/callBusy.d.ts.map +1 -0
  377. package/lib/typescript/calls/callDisplay.d.ts +23 -0
  378. package/lib/typescript/calls/callDisplay.d.ts.map +1 -0
  379. package/lib/typescript/calls/callMode.d.ts +106 -0
  380. package/lib/typescript/calls/callMode.d.ts.map +1 -0
  381. package/lib/typescript/calls/declineReport.d.ts +11 -0
  382. package/lib/typescript/calls/declineReport.d.ts.map +1 -0
  383. package/lib/typescript/calls/p2p/P2PCallController.d.ts +150 -0
  384. package/lib/typescript/calls/p2p/P2PCallController.d.ts.map +1 -0
  385. package/lib/typescript/calls/p2p/icePolicy.d.ts +37 -0
  386. package/lib/typescript/calls/p2p/icePolicy.d.ts.map +1 -0
  387. package/lib/typescript/calls/p2p/negotiator.d.ts +57 -0
  388. package/lib/typescript/calls/p2p/negotiator.d.ts.map +1 -0
  389. package/lib/typescript/calls/p2p/p2pRuntime.d.ts +41 -0
  390. package/lib/typescript/calls/p2p/p2pRuntime.d.ts.map +1 -0
  391. package/lib/typescript/calls/p2p/signalInbox.d.ts +35 -0
  392. package/lib/typescript/calls/p2p/signalInbox.d.ts.map +1 -0
  393. package/lib/typescript/calls/p2p/signalStanza.d.ts +52 -0
  394. package/lib/typescript/calls/p2p/signalStanza.d.ts.map +1 -0
  395. package/lib/typescript/calls/p2p/webrtcRuntime.d.ts +32 -0
  396. package/lib/typescript/calls/p2p/webrtcRuntime.d.ts.map +1 -0
  397. package/lib/typescript/calls/senderTrust.d.ts +8 -0
  398. package/lib/typescript/calls/senderTrust.d.ts.map +1 -0
  399. package/lib/typescript/calls/startCall.d.ts +17 -0
  400. package/lib/typescript/calls/startCall.d.ts.map +1 -0
  401. package/lib/typescript/components/Booking/BookingIcons.d.ts +9 -0
  402. package/lib/typescript/components/Booking/BookingIcons.d.ts.map +1 -0
  403. package/lib/typescript/components/Booking/ScheduleCallButton.d.ts +11 -0
  404. package/lib/typescript/components/Booking/ScheduleCallButton.d.ts.map +1 -0
  405. package/lib/typescript/components/Booking/ScheduleCallSheet.d.ts +4 -0
  406. package/lib/typescript/components/Booking/ScheduleCallSheet.d.ts.map +1 -0
  407. package/lib/typescript/components/Booking/ScheduledCallCard.d.ts +14 -0
  408. package/lib/typescript/components/Booking/ScheduledCallCard.d.ts.map +1 -0
  409. package/lib/typescript/components/Booking/ScheduledCallHost.d.ts +10 -0
  410. package/lib/typescript/components/Booking/ScheduledCallHost.d.ts.map +1 -0
  411. package/lib/typescript/components/Booking/ScheduledCallMessage.d.ts +20 -0
  412. package/lib/typescript/components/Booking/ScheduledCallMessage.d.ts.map +1 -0
  413. package/lib/typescript/components/Booking/ScheduledCallPreJoin.d.ts +8 -0
  414. package/lib/typescript/components/Booking/ScheduledCallPreJoin.d.ts.map +1 -0
  415. package/lib/typescript/components/Booking/bookingShared.d.ts +199 -0
  416. package/lib/typescript/components/Booking/bookingShared.d.ts.map +1 -0
  417. package/lib/typescript/components/MainComponents/AlbumGrid.d.ts.map +1 -1
  418. package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
  419. package/lib/typescript/components/MainComponents/LanguageSelectorButton.d.ts +3 -1
  420. package/lib/typescript/components/MainComponents/LanguageSelectorButton.d.ts.map +1 -1
  421. package/lib/typescript/components/MainComponents/LanguageSelectorModal.d.ts.map +1 -1
  422. package/lib/typescript/components/MainComponents/MediaMessage.d.ts +3 -1
  423. package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
  424. package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
  425. package/lib/typescript/components/MainComponents/ReduxWrapper.d.ts.map +1 -1
  426. package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
  427. package/lib/typescript/components/MessageBubble/Message.d.ts.map +1 -1
  428. package/lib/typescript/components/Modals/ChatProfileModal/ChatMediaGrid.d.ts +16 -0
  429. package/lib/typescript/components/Modals/ChatProfileModal/ChatMediaGrid.d.ts.map +1 -0
  430. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
  431. package/lib/typescript/components/Modals/ChatProfileModal/LeaveChatModal.d.ts +18 -0
  432. package/lib/typescript/components/Modals/ChatProfileModal/LeaveChatModal.d.ts.map +1 -0
  433. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +1 -1
  434. package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts +16 -0
  435. package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
  436. package/lib/typescript/components/Modals/FilePreviewModal/MediaViewer.d.ts +27 -0
  437. package/lib/typescript/components/Modals/FilePreviewModal/MediaViewer.d.ts.map +1 -0
  438. package/lib/typescript/components/Modals/FilePreviewModal/useSaveFile.d.ts +9 -0
  439. package/lib/typescript/components/Modals/FilePreviewModal/useSaveFile.d.ts.map +1 -0
  440. package/lib/typescript/components/Modals/MessageSearchModal/MessageSearchModal.d.ts +8 -0
  441. package/lib/typescript/components/Modals/MessageSearchModal/MessageSearchModal.d.ts.map +1 -1
  442. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
  443. package/lib/typescript/components/Modals/UserSettingsModal/LanguageCard.d.ts.map +1 -1
  444. package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts.map +1 -1
  445. package/lib/typescript/components/VideoCalls/CallButtons.d.ts +2 -1
  446. package/lib/typescript/components/VideoCalls/CallButtons.d.ts.map +1 -1
  447. package/lib/typescript/components/VideoCalls/CallControlBar.d.ts +17 -0
  448. package/lib/typescript/components/VideoCalls/CallControlBar.d.ts.map +1 -0
  449. package/lib/typescript/components/VideoCalls/CallVideo.d.ts +23 -0
  450. package/lib/typescript/components/VideoCalls/CallVideo.d.ts.map +1 -0
  451. package/lib/typescript/components/VideoCalls/GroupCallView.d.ts +22 -0
  452. package/lib/typescript/components/VideoCalls/GroupCallView.d.ts.map +1 -0
  453. package/lib/typescript/components/VideoCalls/P2PCallRunner.d.ts +2 -0
  454. package/lib/typescript/components/VideoCalls/P2PCallRunner.d.ts.map +1 -0
  455. package/lib/typescript/components/VideoCalls/VideoCallOverlay.d.ts.map +1 -1
  456. package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts +10 -12
  457. package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
  458. package/lib/typescript/components/VideoCalls/callActions.d.ts.map +1 -1
  459. package/lib/typescript/components/VideoCalls/callElapsed.d.ts +8 -0
  460. package/lib/typescript/components/VideoCalls/callElapsed.d.ts.map +1 -0
  461. package/lib/typescript/components/VideoCalls/callLive.d.ts +9 -0
  462. package/lib/typescript/components/VideoCalls/callLive.d.ts.map +1 -0
  463. package/lib/typescript/components/VideoCalls/callSessionController.d.ts +10 -31
  464. package/lib/typescript/components/VideoCalls/callSessionController.d.ts.map +1 -1
  465. package/lib/typescript/components/VideoCalls/callSessionTypes.d.ts +60 -0
  466. package/lib/typescript/components/VideoCalls/callSessionTypes.d.ts.map +1 -0
  467. package/lib/typescript/components/VideoCalls/groupLayout.d.ts +23 -0
  468. package/lib/typescript/components/VideoCalls/groupLayout.d.ts.map +1 -0
  469. package/lib/typescript/components/VideoCalls/p2pCallSession.d.ts +31 -0
  470. package/lib/typescript/components/VideoCalls/p2pCallSession.d.ts.map +1 -0
  471. package/lib/typescript/components/VideoCalls/useCallKeep.d.ts.map +1 -1
  472. package/lib/typescript/components/VideoCalls/useOngoingCallNotification.d.ts.map +1 -1
  473. package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
  474. package/lib/typescript/components/styled/VideoMessage.d.ts.map +1 -1
  475. package/lib/typescript/context/MediaSourceContext.d.ts +4 -0
  476. package/lib/typescript/context/MediaSourceContext.d.ts.map +1 -0
  477. package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
  478. package/lib/typescript/helpers/callPush.d.ts +11 -1
  479. package/lib/typescript/helpers/callPush.d.ts.map +1 -1
  480. package/lib/typescript/helpers/constants/MODAL_COMPONENTS.d.ts.map +1 -1
  481. package/lib/typescript/helpers/constants/MODAL_TYPES.d.ts +2 -0
  482. package/lib/typescript/helpers/constants/MODAL_TYPES.d.ts.map +1 -1
  483. package/lib/typescript/helpers/incomingCallFromPush.d.ts.map +1 -1
  484. package/lib/typescript/helpers/publicChatsEntry.d.ts +7 -5
  485. package/lib/typescript/helpers/publicChatsEntry.d.ts.map +1 -1
  486. package/lib/typescript/helpers/pushPayload.d.ts +1 -1
  487. package/lib/typescript/helpers/pushPayload.d.ts.map +1 -1
  488. package/lib/typescript/helpers/reportRoom.d.ts +19 -0
  489. package/lib/typescript/helpers/reportRoom.d.ts.map +1 -0
  490. package/lib/typescript/helpers/roomMedia.d.ts +26 -0
  491. package/lib/typescript/helpers/roomMedia.d.ts.map +1 -0
  492. package/lib/typescript/i18n/strings.d.ts.map +1 -1
  493. package/lib/typescript/main.d.ts +6 -1
  494. package/lib/typescript/main.d.ts.map +1 -1
  495. package/lib/typescript/networking/api-requests/callState.api.d.ts +25 -0
  496. package/lib/typescript/networking/api-requests/callState.api.d.ts.map +1 -0
  497. package/lib/typescript/networking/api-requests/push.api.d.ts +9 -2
  498. package/lib/typescript/networking/api-requests/push.api.d.ts.map +1 -1
  499. package/lib/typescript/networking/api-requests/rooms.api.d.ts +8 -6
  500. package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
  501. package/lib/typescript/networking/api-requests/scheduledCalls.api.d.ts +86 -0
  502. package/lib/typescript/networking/api-requests/scheduledCalls.api.d.ts.map +1 -0
  503. package/lib/typescript/networking/callTokenStanza.d.ts.map +1 -1
  504. package/lib/typescript/roomStore/callSlice.d.ts +23 -1
  505. package/lib/typescript/roomStore/callSlice.d.ts.map +1 -1
  506. package/lib/typescript/services/appBadge.d.ts +3 -0
  507. package/lib/typescript/services/appBadge.d.ts.map +1 -0
  508. package/lib/typescript/services/languageSettings.d.ts +7 -0
  509. package/lib/typescript/services/languageSettings.d.ts.map +1 -1
  510. package/lib/typescript/services/pushRegistration.d.ts.map +1 -1
  511. package/lib/typescript/types/models/modal.model.d.ts +18 -0
  512. package/lib/typescript/types/models/modal.model.d.ts.map +1 -1
  513. package/lib/typescript/types/types.d.ts +85 -4
  514. package/lib/typescript/types/types.d.ts.map +1 -1
  515. package/lib/typescript/version.d.ts +1 -1
  516. package/lib/typescript/version.d.ts.map +1 -1
  517. package/package.json +9 -2
  518. package/src/booking/index.ts +10 -0
  519. package/src/booking/pendingScheduledCall.ts +272 -0
  520. package/src/booking/scheduleForm.ts +84 -0
  521. package/src/booking/scheduledCall.ts +163 -0
  522. package/src/booking/scheduledCallActions.ts +141 -0
  523. package/src/booking/scheduledCallLink.ts +145 -0
  524. package/src/booking/scheduledCallStore.ts +69 -0
  525. package/src/booking/startRoomCall.ts +103 -0
  526. package/src/calls/callBusy.ts +10 -0
  527. package/src/calls/callDisplay.ts +74 -0
  528. package/src/calls/callMode.ts +286 -0
  529. package/src/calls/declineReport.ts +16 -0
  530. package/src/calls/p2p/P2PCallController.ts +813 -0
  531. package/src/calls/p2p/icePolicy.ts +99 -0
  532. package/src/calls/p2p/negotiator.ts +186 -0
  533. package/src/calls/p2p/p2pRuntime.ts +164 -0
  534. package/src/calls/p2p/signalInbox.ts +117 -0
  535. package/src/calls/p2p/signalStanza.ts +205 -0
  536. package/src/calls/p2p/webrtcRuntime.ts +60 -0
  537. package/src/calls/senderTrust.ts +40 -0
  538. package/src/calls/startCall.ts +56 -0
  539. package/src/components/Booking/BookingIcons.tsx +44 -0
  540. package/src/components/Booking/ScheduleCallButton.tsx +66 -0
  541. package/src/components/Booking/ScheduleCallSheet.tsx +380 -0
  542. package/src/components/Booking/ScheduledCallCard.tsx +216 -0
  543. package/src/components/Booking/ScheduledCallHost.tsx +18 -0
  544. package/src/components/Booking/ScheduledCallMessage.tsx +62 -0
  545. package/src/components/Booking/ScheduledCallPreJoin.tsx +230 -0
  546. package/src/components/Booking/bookingShared.tsx +295 -0
  547. package/src/components/MainComponents/AlbumGrid.tsx +5 -1
  548. package/src/components/MainComponents/ChatHeader.tsx +18 -11
  549. package/src/components/MainComponents/LanguageSelectorButton.tsx +9 -2
  550. package/src/components/MainComponents/LanguageSelectorModal.tsx +10 -6
  551. package/src/components/MainComponents/MediaMessage.tsx +13 -2
  552. package/src/components/MainComponents/MessageContainer.tsx +15 -0
  553. package/src/components/MainComponents/ReduxWrapper.tsx +10 -0
  554. package/src/components/MainComponents/RoomList.tsx +8 -19
  555. package/src/components/MessageBubble/Message.tsx +24 -1
  556. package/src/components/Modals/ChatProfileModal/ChatMediaGrid.tsx +174 -0
  557. package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +119 -48
  558. package/src/components/Modals/ChatProfileModal/LeaveChatModal.tsx +191 -0
  559. package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +22 -22
  560. package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +115 -185
  561. package/src/components/Modals/FilePreviewModal/MediaViewer.tsx +880 -0
  562. package/src/components/Modals/FilePreviewModal/useSaveFile.ts +207 -0
  563. package/src/components/Modals/MessageSearchModal/MessageSearchModal.tsx +56 -30
  564. package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +28 -9
  565. package/src/components/Modals/UserSettingsModal/LanguageCard.tsx +9 -7
  566. package/src/components/VideoCalls/ActiveCallBar.tsx +6 -5
  567. package/src/components/VideoCalls/CallButtons.tsx +23 -12
  568. package/src/components/VideoCalls/CallControlBar.tsx +131 -0
  569. package/src/components/VideoCalls/CallVideo.tsx +59 -0
  570. package/src/components/VideoCalls/GroupCallView.tsx +324 -0
  571. package/src/components/VideoCalls/P2PCallRunner.tsx +192 -0
  572. package/src/components/VideoCalls/VideoCallOverlay.tsx +62 -17
  573. package/src/components/VideoCalls/VideoCallSession.tsx +55 -133
  574. package/src/components/VideoCalls/callActions.ts +3 -0
  575. package/src/components/VideoCalls/callElapsed.ts +27 -0
  576. package/src/components/VideoCalls/callLive.ts +13 -0
  577. package/src/components/VideoCalls/callSessionController.ts +130 -55
  578. package/src/components/VideoCalls/callSessionTypes.ts +80 -0
  579. package/src/components/VideoCalls/groupLayout.ts +48 -0
  580. package/src/components/VideoCalls/p2pCallSession.ts +291 -0
  581. package/src/components/VideoCalls/useCallKeep.ts +9 -2
  582. package/src/components/VideoCalls/useOngoingCallNotification.ts +2 -2
  583. package/src/components/styled/MessageImage.tsx +3 -1
  584. package/src/components/styled/VideoMessage.tsx +5 -1
  585. package/src/context/MediaSourceContext.tsx +14 -0
  586. package/src/context/xmppProvider.tsx +3 -0
  587. package/src/helpers/callPush.ts +13 -1
  588. package/src/helpers/constants/MODAL_COMPONENTS.tsx +4 -1
  589. package/src/helpers/constants/MODAL_TYPES.ts +2 -0
  590. package/src/helpers/incomingCallFromPush.ts +65 -7
  591. package/src/helpers/publicChatsEntry.ts +8 -7
  592. package/src/helpers/pushPayload.ts +9 -1
  593. package/src/helpers/reportRoom.ts +93 -0
  594. package/src/helpers/roomMedia.ts +126 -0
  595. package/src/i18n/strings.ts +480 -0
  596. package/src/main.ts +33 -0
  597. package/src/networking/api-requests/callState.api.ts +83 -0
  598. package/src/networking/api-requests/push.api.ts +28 -3
  599. package/src/networking/api-requests/rooms.api.ts +25 -15
  600. package/src/networking/api-requests/scheduledCalls.api.ts +232 -0
  601. package/src/networking/callTokenStanza.ts +247 -50
  602. package/src/roomStore/callSlice.ts +86 -2
  603. package/src/services/appBadge.ts +85 -0
  604. package/src/services/languageSettings.ts +43 -8
  605. package/src/services/pushRegistration.ts +34 -3
  606. package/src/types/models/modal.model.ts +16 -0
  607. package/src/types/types.ts +86 -4
  608. package/src/version.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -7,8 +7,22 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this pr
7
7
 
8
8
  ### Added
9
9
 
10
+ - **Languages from the install's get-config.** New `config.translates.languages`: pass `translateLanguages` from `GET /v1/apps/get-config` as-is (e.g. `["en-CA", "fr-CA", "es-US"]`). The globe picker, the profile's Language tab and the Settings chat-language list offer those languages instead of the built-in list; the interface-language list offers the ones the component has captions for. An empty array (no translation server) hides the chat-language lists and the globe. Omitted, the built-in list stays. `settings.languages.chatLanguages` / `appLanguages` still win.
11
+
12
+ - **Push language.** The push token is registered with `language` (`config.translates.readerLocale`, else `config.i18n.locale`, else the language picked in the chat; the full tag is sent, the server reduces fr-CA / es-US to fr / es). When it changes the token is re-registered by itself (a plain re-POST, no release first), so hosts never call `registerPushToken` again for it. A backend that predates the field gets the registration again without it. The legacy gateway (`pushNotifications.apiUrl`) gets no language.
13
+
14
+ - **App icon badge follows the unread count in the foreground.** The server sets the badge only with a push, so an opened app kept the last push's number. While the app is active the badge is now the unread total (0 once everything is read), set again on every return to the foreground. Needs `expo-notifications`; `config.pushNotifications.syncAppBadge: false` leaves the badge to the host.
15
+
10
16
  - **The sender's avatar in chat pushes.** A push that carries the sender's avatar (`image`; the push service sends it unless the app switched it off with `PUT /v1/push/sender-avatar/:appId`) shows it the way messengers do: the avatar next to the text, the app icon as the small badge. iOS: the notification service extension downloads it and turns the push into a communication notification (`INSendMessageIntent` with the sender as `INPerson`), for plain and sealed pushes; sealed pushes now also get their attachment preview. The config plugin adds the Communication Notifications capability and `INSendMessageIntent` to `NSUserActivityTypes` (`communicationNotifications: false` leaves them out); with manual signing the App ID needs the capability. Android: `registerSealedPushTask({ onMessageShown })` hands every shown sealed push with an avatar (`ShownMessagePush`) to the host, which redraws the notification natively (expo-notifications has no per-notification avatar). A push without an avatar, or one whose avatar does not load, shows as before.
11
17
 
18
+ - **Peer to peer 1:1 calls and group calls (port of the web SDK's p2p / group calls).** A 1:1 call now runs over our own WebRTC peer connection when the server says so (`mode=p2p` on the create response and the `call-token`): offer, answer, ICE candidates and hang up travel as direct XMPP messages (`<data type="call-p2p">`), TURN/STUN servers come from the backend (`GET /v1/calls/ice-servers`, also refreshed before an ICE restart), the clients report `ringing` / `decline` / `connected` / `end` to `POST /v1/chats/call/state/*` (a p2p call has no LiveKit webhook), and a dropped network restarts ICE (grace period, one restart per outage, a small cap per call, then a clean failure). The server picks the transport per call, so an install without P2P keeps calling over LiveKit exactly as before. It uses `@livekit/react-native-webrtc`'s `RTCPeerConnection` / `mediaDevices` (loaded lazily like the LiveKit packages; no `react-native-webrtc`, which would duplicate the native classes). The new modules are parallel to the web SDK's `src/calls/` (`callMode`, `callDisplay`, `senderTrust`, `startCall`, `p2p/{icePolicy, negotiator, signalStanza, signalInbox, P2PCallController, p2pRuntime}`) so later syncs are a copy; the React Native side is `webrtcRuntime`, `p2pCallSession` (the controller seen through the call session snapshot), `P2PCallRunner` and `CallVideo` (LiveKit `VideoTrack` or the fork's `RTCView`). One call screen, the minimized strip, CallKit and the ongoing-call notification serve both transports.
19
+ - **Rings like every other call.** The VoIP push of a p2p call (`mode=p2p`, empty `callToken`) rings through the same path and under the same `callKitUuid(callId)`; Answer and Decline on the CallKit / ConnectionService screen work for p2p too, a decline is reported to the server, and iOS audio activation reaches WebRTC's audio session even in a build without LiveKit's JS. A phone already in a call declines a second p2p call to its caller instead of leaving them ringing, and two people dialling each other at once settle on the smaller callId on both ends. The caller keeps re-sending its offer for the whole ring window (4, 10, 18 and 26 s) so a callee that is still cold-starting from the push still receives it.
20
+ - **Group calls.** Members-only group rooms get the call buttons (`videoCalls.allowedRoomTypes` now defaults to `['private', 'group']`; `['private']` keeps calls 1:1; public rooms never call) and run over LiveKit. The call screen is a grid of everyone in the room (us first, the speaker outlined, a mic-off badge on anyone muted, at most nine cameras drawn at a time, speakers first), the call goes on while anyone is in the room, and one member declining does not end it for the others. The ring names the room and the caller ("Ann is calling in Design team"); a group push (`group=true`) rings the same way.
21
+ - **Safer call-tokens.** `livekitUrl` (the server's own LiveKit URL, which wins over `videoCalls.livekitUrl`), the ICE list and the caller's name/id are honoured only on a `call-token` that comes from the app's system account (the sender JID is stamped by ejabberd), so a forged token cannot steer media to another server. A raw chat name is never shown as a caller; with no name the ring says "Incoming call".
22
+ - Fixes on the way: a `call-state` signal that names a different call than the one on screen (a late server log of the previous call in the same room) no longer ends the current call, and a group member's decline relayed by the server no longer ends the call for the others. New strings (`call.*` group, p2p and status keys) in en, fr, es, pt, ht and zh. Tests: `p2p.*`, `calls.*`, `callTokenStanza.modes`, `callState.api`, `callSlice.route`, `p2pCallRunner`, `p2pCallSession`, `p2pCallPush`, `p2pCallKit`, `groupCallView`, `groupLayout`, `callSessionController.group`, `callButtons`, `videoCallOverlay.modes`.
23
+
24
+ - **Scheduled calls and deep links.** With `videoCalls.enabled` the room header gets a Schedule a call button (title, date and time, duration, video or audio) and the room shows an invite card for every scheduled call (`<data type="scheduledCall">`): one card per call, the latest status wins (scheduled, updated, cancelled), states upcoming, join window (from 15 minutes before the start to the end), ended and cancelled, **Add to Google / Outlook / .ics** buttons that open the server's links, **Join** through the room's ordinary call start on a tap (no media before it), and Edit / Cancel call for the creator and room moderators. New exports `parseScheduledCallLink(url)` (`https://<host>/call/<slug>` for known hosts and `<scheme>://call/<slug>`), `openScheduledCall(slug)`, `handleScheduledCallUrl(url)`, `handleScheduledCallPush(data)`, `configureScheduledCallLinks({ hosts, schemes })` and the `getScheduledCall` / `listScheduledCalls` / `createScheduledCall` / `updateScheduledCall` / `cancelScheduledCall` API helpers, plus `config.scheduledCalls` (`enabled`, `onOpenError`, `hosts`, `schemes`). A link that arrives before sign-in or before `<Chat>` is ready is held (memory and AsyncStorage, 30 minutes) and opened once both are true: slug resolved, room opened, pre-join sheet shown, with "not a member", "not found" and "cancelled" screens. A reminder push (`type: 'scheduledCallReminder'`) given to `handlePushPayload` opens the same flow (new outcome `'scheduledCall'`). The example app registers its URL scheme, iOS associated domain and Android `/call/*` intent filter and forwards incoming URLs. `booking.*` strings in en, fr, es, pt, ht and zh. Needs the matching backend (`/v1/chats/calls/scheduled`). README, "Scheduled calls and deep links".
25
+
12
26
  - **Incoming calls from VoIP pushes (iOS) and from a host's call notification (Android).** A host whose PushKit code reports a VoIP push to CallKit itself (iOS requires that before any JS runs) uses the new `callKitUuid(callId)` for the CallKit UUID; the SDK reports the same call under the same UUID, so the VoIP push and the XMPP invite never ring twice (`CallUUIDAlreadyExists` is now taken as "already on screen"). `handlePushPayload` / `handleCallPush` hold a call push that comes before `<Chat>` configured the store and ring it once it has (a held push expires with the 60 s LiveKit token), and address the room through the conference domain when the room list is not loaded yet. Answer and Decline made on the CallKit screen before JS listened are replayed from callkeep's buffered events (`didLoadWithEvents`) and applied when the call reaches the store; a declined call tells the caller once the socket is up. A call push that cannot ring (calls off, no token, no room, busy) ends its CallKit call. New `answerCallFromPush` / `declineCallFromPush` for a host's own incoming-call notification, `registerSealedPushTask({ onCallPush })` for showing one from the Android background task (not called in the foreground), and exported `isCallPush` / `parseCallPush`. An incoming call now stops ringing after 45 s, and a `call-token` stanza for a call already known from its push no longer throws an answered call back to the ring screen.
13
27
 
14
28
  - **Pushes for reactions.** Adding an emoji to someone else's message asks the server for a push to that message's author: `sendMessageReactionStanza` takes `ReactionStanzaData` (`push`, `messageAuthor`, `messageText`, the sender's avatar and the attachment attributes) and puts it on the stanza's `<data>`; the text is cut to 120 characters and left out of encrypted rooms, and nothing is asked for a removed emoji or one's own message. The push service shows it as `<name> reacted ❤️ to "…"`, silent, next to (not instead of) the chat's new-message push; a tap opens the chat. Android: `registerSealedPushTask({ reactionChannelId })` posts a sealed reaction push on that (silent) channel with its own identifier per chat; the sealed envelope and content carry `type: 'reaction'` (the content also the emoji as `reaction`). Needs the matching ejabberd `mod_offline_post` and push service.
@@ -49,6 +63,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this pr
49
63
 
50
64
  ### Changed
51
65
 
66
+ - `npm run build` no longer runs `expo prebuild` first. The npm hook was named `prebuild`; the script is now `prebuild:native` (`npm run prebuild:native`).
52
67
  - `pushNotifications.onClick` / `onNotificationPress` are marked deprecated: they were never called. The tapped notification's data goes to `handlePushPayload`, which opens the room. The push section of `instructions.md` now shows the whole host side in one place and states the rule the SDK cannot enforce: sign-out must go through the SDK (`useLogout()` / the built-in item), or the device stays registered.
53
68
 
54
69
  - **The interface language reaches every caption.** The room-list menu (New Chat / Profile / Settings / Sign out, and the sign-out confirmation), the room menu, the thread screen, the delete-message dialog, the Visibility and Manage Data screens, "sending..." / "edited" / the failed-send retry under a bubble and the toasts' titles were hard-coded in English and ignored the app language; they now come from the string tables (`menu.*`, `thread.*`, `message.sending` / `message.failedRetry`, `modal.deleteMessage.*`, `toast.copied` / `toast.copyFailed` / `toast.saveSuccessful` / `toast.failedToCreateRoom` in every locale). A host's `logout.label` / `logout.confirm` copy still wins; without it the SDK's own, in the UI language, is shown - hosts that passed English copy only to have a label can drop it. Spanish "Chats" is now "Conversaciones".
@@ -83,6 +98,8 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this pr
83
98
 
84
99
  - **A call no longer hangs on after the other side drops it.** The `call-state` handler read the state, `callId` and `room` from the `<message>` instead of its `<data>`, so the peer's `cancelled` / `declined` / `ended` signal and the server's call log never ended the call; the server's `call-state-declined` is now handled too, and a late signal of an earlier call in the same room no longer ends the current one. A call declined on the CallKit / system screen tells the caller once the socket is up instead of losing the signal while it reconnects.
85
100
 
101
+ - **Reporting a chat reaches the server.** The report form sent its UI ids (`violence`, `childAbuse`, `personalDetails`, `illegalDrugs`) as the category and no text when the details were empty, so `POST /v1/chats/reports/:chatName` rejected most reports with 422. Each category is now mapped onto the value the server accepts (Child Abuse, which the server has no value for, goes as `other` with its name in the text), the text is never empty, and the toasts say whether the report was sent. The mapping lives in `helpers/reportRoom.ts`, shared in shape with the web SDK.
102
+
86
103
  - **Removed reaction in a room with no loaded messages crashed the history parse, and archive-replayed reactions overwrote the room preview.** Both fixed.
87
104
 
88
105
  - **Prototype pollution guard and users cache cap.** Dynamic keys in the store are guarded against `__proto__` style keys, and the users cache is merged and capped at 5000 entries.
package/README.md CHANGED
@@ -17,11 +17,14 @@ React Native chat UI + chat core for iOS and Android, powered by the Ethora plat
17
17
  - [Pinning a single room](#pinning-a-single-room)
18
18
  - [Unread tracking in tab-based hosts](#unread-tracking-in-tab-based-hosts)
19
19
  - [Logging out](#logging-out)
20
+ - [Languages and push language](#languages-and-push-language)
20
21
  - [Customization flags worth knowing](#customization-flags-worth-knowing)
21
22
  - [Server events](#server-events)
23
+ - [Audio and video calls](#audio-and-video-calls)
22
24
  - [Startup behaviour](#startup-behaviour)
23
25
  - [Message reactions](#message-reactions)
24
26
  - [Replies & threads](#replies--threads)
27
+ - [Scheduled calls and deep links](#scheduled-calls-and-deep-links)
25
28
  - [Keyboard handling](#keyboard-handling)
26
29
  - [Header height & font sizing](#header-height--font-sizing)
27
30
  - [Dark theme](#dark-theme)
@@ -345,6 +348,41 @@ config = {
345
348
 
346
349
  The user's interface language wins over `config.i18n.locale`, which stays the default for a user who never chose. `hideAppearance` and `hidePushToggle` hide the built-in cards.
347
350
 
351
+ ## Languages and push language
352
+
353
+ The languages offered to the user come from your install: pass `translateLanguages` from `GET /v1/apps/get-config` as `translates.languages`. The SDK does not call get-config itself (it needs your `domainName`), so read it where your app already does, or fetch it once:
354
+
355
+ ```tsx
356
+ const [translateLanguages, setTranslateLanguages] = useState<string[]>();
357
+
358
+ useEffect(() => {
359
+ fetch(`https://api.chat.ethora.com/v1/apps/get-config?domainName=${DOMAIN_NAME}`)
360
+ .then((r) => r.json())
361
+ .then((json) => setTranslateLanguages(json?.result?.translateLanguages ?? []))
362
+ .catch(() => undefined); // keeps the built-in list
363
+ }, []);
364
+
365
+ <Chat
366
+ config={{
367
+ ...baseConfig,
368
+ translates: {
369
+ enabled: true,
370
+ mode: 'auto',
371
+ languages: translateLanguages, // e.g. ["en-CA", "fr-CA", "es-US"]
372
+ // Optional, when your own app picks the reader's language:
373
+ // readerLocale: userLocale,
374
+ },
375
+ // Optional: the interface language of the chat.
376
+ // i18n: { locale: userLocale },
377
+ }}
378
+ />
379
+ ```
380
+
381
+ - The list drives the globe picker, the profile's Language tab and the Settings chat-language list; the interface-language list takes the languages the SDK has captions for (en, fr, es, pt, ht, zh).
382
+ - `[]` means the install has no translation server: the language lists and the globe are hidden. Leaving `languages` out keeps the built-in en-CA / es-US / fr-CA.
383
+ - **Push language** needs no code: the push token is registered with `language` = `translates.readerLocale`, else `i18n.locale`, else what the user picked in the chat, and is registered again by itself whenever that changes.
384
+ - **App icon badge:** in the foreground it follows the unread total (0 once everything is read), since the server sets it only with a push. Needs `expo-notifications`; `pushNotifications.syncAppBadge: false` turns it off.
385
+
348
386
  ## Customization flags worth knowing
349
387
 
350
388
  | Flag | What it does |
@@ -375,6 +413,35 @@ The user's interface language wins over `config.i18n.locale`, which stays the de
375
413
 
376
414
  The server can push `ethora-event` headlines (namespace `urn:ethora:events:1`) to refresh a client without a reload. Two types are handled: `user-profile-updated` (refreshes that user's cached profile and name) and `chat-meta-updated` (schedules a refresh of that room's metadata, for rooms the client already holds). A headline is accepted only from a trusted sender: a bare server JID (no resource) on the session's own XMPP domain, delivered as a headline. Room occupants, other users, and other domains are ignored. Set `trustedEventSenders` to pin the exact sender(s) instead of accepting any bare JID of the domain.
377
415
 
416
+ ## Audio and video calls
417
+
418
+ Calls are opt-in (`config.videoCalls.enabled: true`). They use native modules, so the host needs a dev build or a prebuilt binary (not Expo Go) with the optional peers `@livekit/react-native` and `@livekit/react-native-webrtc`, the microphone/camera permissions and the audio background modes.
419
+
420
+ | Where | Carried by |
421
+ | --- | --- |
422
+ | 1:1 (private) chat | Our own WebRTC peer to peer connection, with TURN/STUN from the backend (`GET /v1/calls/ice-servers`) and the offer/answer signalled over XMPP. The server decides per call: it answers `p2p` when it has P2P enabled and falls back to `livekit` otherwise, so an install without a TURN relay keeps calling over LiveKit exactly as before. |
423
+ | Members-only group chat | LiveKit, always. The call screen is a grid of everyone in the room with the person who is speaking outlined; one member declining does not end the call for the others, and the call ends when you hang up (or the room drops). Public rooms do not call. |
424
+
425
+ ```tsx
426
+ <Chat
427
+ config={{
428
+ videoCalls: {
429
+ enabled: true,
430
+ livekitUrl: 'wss://livekit.example.com', // still required: it enables the call buttons
431
+ enableAudioCalls: true, // audio button next to the video one
432
+ allowedRoomTypes: ['private', 'group'], // the default; ['private'] keeps calls 1:1
433
+ },
434
+ }}
435
+ />
436
+ ```
437
+
438
+ - **One WebRTC.** Peer to peer calls use the WebRTC classes of `@livekit/react-native-webrtc` (LiveKit's fork). Do not add `react-native-webrtc` next to it: two copies of the native classes do not link. A build without the fork cannot take a p2p call; it declines it, so the caller is not left ringing.
439
+ - **Encryption.** A p2p call is encrypted between the two phones by DTLS-SRTP; the LiveKit insertable-streams E2EE layer applies to LiveKit calls only.
440
+ - **Ringing.** Every kind of call rings through the same path: an XMPP `call-token` while the app is connected, a VoIP push (`mode=p2p` with an empty `callToken` for a p2p call, `group=true` for a group call) when it is not, and CallKit (iOS) / ConnectionService (Android) via the optional `react-native-callkeep`. Answer and Decline on the system screen work for p2p calls too; a decline is reported to the server (`POST /v1/chats/call/state/decline/:callId`) because a p2p call has no LiveKit webhook to tell it. `handlePushPayload` / `handleCallPush` take the push payload as before.
441
+ - **Who is calling.** `livekitUrl` and the ICE servers on a `call-token`, and the caller's name, are honoured only when the stanza comes from the app's system account. A raw chat name is never shown as a caller: the ring screen shows the caller's name, else a neutral "Incoming call".
442
+ - **Reconnecting.** If the network drops mid-call, the p2p connection restarts ICE with fresh TURN credentials and the call shows "Reconnecting..."; it ends after a few failed restarts.
443
+ - **Server side.** P2P needs a backend with `CALLS_P2P_ENABLED` and a TURN relay; group calls need a backend that accepts them (an older backend refuses with an error on the call screen). Everything else falls back to LiveKit 1:1.
444
+
378
445
  ## Startup behaviour
379
446
 
380
447
  The room list renders as soon as `GET /v1/chats/my` returns; it does not wait for MUC joins. With `initBeforeLoad`, `XmppProvider` reports ready right after `/chats/my`. Joins then run as a background sweep (open room first, then by recent activity, `historyQoS.joinConcurrency` at a time, up to 3 retries for rooms that did not join). Sending, fetching history and opening a room each join that room on demand, and the offline send queue drains after the first wave. Background history preload is staged by default (see `historyPreload`).
@@ -465,6 +532,64 @@ Message flags a custom message component can read: `unencrypted`, `undecryptable
465
532
 
466
533
  Requires an XMPP server that lets members read each other's OMEMO PEP nodes (`access_model: open`).
467
534
 
535
+ ## Scheduled calls and deep links
536
+
537
+ With `config.videoCalls.enabled`, the room header gets a **Schedule a call** button (in the room types `videoCalls.allowedRoomTypes` allows, private and group by default). The sheet takes a title, a date and time, a duration (15 to 120 minutes) and, with `enableAudioCalls`, video or audio. The server posts an **invite card** into the room for every member: title, local date and time, duration, **Add to Google Calendar / Outlook / .ics** buttons (the server's own links, opened with `Linking.openURL`) and **Join**. The card is one per call: an edit or a cancel updates it in place, and the older messages of the same call draw nothing. Join is enabled from 15 minutes before the start until the call ends; before that the card says when it opens, afterwards it is greyed, and a cancelled call is struck through. Join is the room's ordinary call start (a private room starts or answers its call, a group room starts or joins the room call) and it only runs on that tap: no media starts when a card or a link is opened. The person who scheduled the call, and a room moderator, also see **Edit** and **Cancel call**.
538
+
539
+ Every invite carries a link, `https://<web host>/call/<slug>`, which the calendar event, the invite e-mail and the reminder push (10 minutes before the start) all use. To make it open your app:
540
+
541
+ ```tsx
542
+ import { useEffect } from 'react';
543
+ import { Linking } from 'react-native';
544
+ import { Chat, configureScheduledCallLinks, handleScheduledCallUrl } from '@ethora/chat-component-rn';
545
+
546
+ // Once, at startup (before <Chat> mounts): which links belong to this app.
547
+ configureScheduledCallLinks({
548
+ hosts: ['app.chat.ethora.com'], // the web domain of your Ethora app; this default is always accepted
549
+ schemes: ['myapp'], // your URL scheme, for myapp://call/<slug>
550
+ });
551
+
552
+ export default function App() {
553
+ useEffect(() => {
554
+ Linking.getInitialURL().then((url) => url && handleScheduledCallUrl(url));
555
+ const sub = Linking.addEventListener('url', ({ url }) => handleScheduledCallUrl(url));
556
+ return () => sub.remove();
557
+ }, []);
558
+ // ...
559
+ return <Chat config={config} />;
560
+ }
561
+ ```
562
+
563
+ - `parseScheduledCallLink(url)` returns the slug for `https://<known host>/call/<slug>` and `<scheme>://call/<slug>`, otherwise `null`. Known hosts: `app.chat.ethora.com`, the ones passed to `configureScheduledCallLinks`, and `config.scheduledCalls.hosts`. With no scheme configured any custom scheme is accepted; once `schemes` is set only those are.
564
+ - `openScheduledCall(slug)` opens a call by slug and `handleScheduledCallUrl(url)` does the parse and the open in one step (it returns `false` for any other URL, so your own routing can carry on).
565
+ - **A link that comes too early is kept.** If it arrives before the user is signed in, or before `<Chat>` is configured and connected (a cold start from a tapped link, or the login screen in between), the slug is held, in memory and in AsyncStorage for 30 minutes, and opened as soon as both are true. Opening resolves the slug with the API, opens the room, and shows the **pre-join** sheet with a Join button. A call that was cancelled, an unknown one, and a room you are not a member of each get their own message instead.
566
+ - **Reminder push.** The push `data` has `type: 'scheduledCallReminder'` and a `slug`. Passing a tapped notification's data to `handlePushPayload(data)` (see Pushes) opens the same flow and returns `'scheduledCall'`; `handleScheduledCallPush(data)` does only that.
567
+
568
+ Making the OS hand the links to your app is host configuration. For an Expo app, in `app.json`:
569
+
570
+ ```json
571
+ {
572
+ "expo": {
573
+ "scheme": "myapp",
574
+ "ios": { "associatedDomains": ["applinks:app.chat.ethora.com"] },
575
+ "android": {
576
+ "intentFilters": [
577
+ {
578
+ "action": "VIEW",
579
+ "autoVerify": true,
580
+ "data": [{ "scheme": "https", "host": "app.chat.ethora.com", "pathPrefix": "/call/" }],
581
+ "category": ["BROWSABLE", "DEFAULT"]
582
+ }
583
+ ]
584
+ }
585
+ }
586
+ }
587
+ ```
588
+
589
+ The web host must serve `/.well-known/apple-app-site-association` (your Apple team id and bundle id, path `/call/*`) and `/.well-known/assetlinks.json` (your Android package and SHA-256 fingerprints) for the universal links to open the app; the Ethora web app serves both from its runtime config. Until they do, `myapp://call/<slug>` still works. This repo's example app is wired this way (`app.json`, `App.tsx`).
590
+
591
+ The server picks the links (`GET /v1/chats/calls/scheduled/:slug` returns them); the SDK never builds a calendar URL itself. `getScheduledCall`, `listScheduledCalls`, `createScheduledCall`, `updateScheduledCall` and `cancelScheduledCall` are exported for hosts that build their own UI. `config.scheduledCalls.enabled: false` hides the Schedule button and the Join buttons, and `config.scheduledCalls.onOpenError({ slug, reason })` is told when a link could not be opened (`'not-found' | 'not-a-member' | 'cancelled' | 'network'`). The strings are the `booking.*` keys of `config.i18n.strings`. The invite is sent in the clear even in an end-to-end encrypted room, like other system messages.
592
+
468
593
  ## Session loss
469
594
 
470
595
  When the server rejects the XMPP password (SASL `not-authorized`) the SDK refreshes credentials and reconnects. If that cannot produce a working password — the refresh request fails, returns no new password, or the new one is rejected too — twice in a row, the session is ended exactly like **Sign out** (`performLogout`, then `logout.onAfterLogout`), so the host can route to its login screen. A network outage never triggers this: without a reachable server there is no rejection, and the client keeps reconnecting with backoff.
@@ -674,7 +799,7 @@ just don't commit a `yarn.lock` back into the repo.
674
799
 
675
800
  ### `expo prebuild` and the `dependencies` guard
676
801
 
677
- `npm run prebuild|ios|android` each chain through to `expo prebuild`
802
+ `npm run prebuild:native|ios|android` each chain through to `expo prebuild`
678
803
  on first run, and `expo prebuild` likes to hoist `expo`, `react`,
679
804
  and `react-native` from `devDependencies` into `dependencies`.
680
805
  That's wrong for a published library — consumers of
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "DEFAULT_SCHEDULED_CALL_HOSTS", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _scheduledCallLink.DEFAULT_SCHEDULED_CALL_HOSTS;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "configureScheduledCallLinks", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _scheduledCallLink.configureScheduledCallLinks;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "handleScheduledCallPush", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _pendingScheduledCall.handleScheduledCallPush;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "handleScheduledCallUrl", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _pendingScheduledCall.handleScheduledCallUrl;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "openScheduledCall", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _pendingScheduledCall.openScheduledCall;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "parseScheduledCallLink", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _scheduledCallLink.parseScheduledCallLink;
40
+ }
41
+ });
42
+ var _scheduledCallLink = require("./scheduledCallLink");
43
+ var _pendingScheduledCall = require("./pendingScheduledCall");
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_scheduledCallLink","require","_pendingScheduledCall"],"sourceRoot":"../../../src","sources":["booking/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAKA,IAAAC,qBAAA,GAAAD,OAAA","ignoreList":[]}
@@ -0,0 +1,275 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.scheduledCallSlugFromPush = exports.resolveAndOpenScheduledCall = exports.openScheduledCall = exports.isScheduledCallReminderPush = exports.isScheduledCallReady = exports.installScheduledCallHook = exports.handleScheduledCallUrl = exports.handleScheduledCallPush = exports.createPendingScheduledCallQueue = exports.asyncPendingStorage = exports.__resetPendingScheduledCallForTests = exports.SCHEDULED_CALL_REMINDER_PUSH_TYPE = exports.PENDING_SCHEDULED_CALL_TTL_MS = exports.PENDING_SCHEDULED_CALL_KEY = void 0;
7
+ var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/async-storage"));
8
+ var _roomStore = require("../roomStore");
9
+ var _pushPayload = require("../helpers/pushPayload");
10
+ var _normalizeRoomJid = require("../helpers/normalizeRoomJid");
11
+ var _scheduledCalls = require("../networking/api-requests/scheduledCalls.api");
12
+ var _scheduledCallLink = require("./scheduledCallLink");
13
+ var _scheduledCall = require("./scheduledCall");
14
+ var _scheduledCallStore = require("./scheduledCallStore");
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ /**
17
+ * Opening a scheduled call from a link or a reminder push.
18
+ *
19
+ * A link can arrive while the app is still starting: before the user is
20
+ * signed in, or before `<Chat>` has configured the store and connected. The
21
+ * slug is then held (in memory, and in AsyncStorage so a cold start that
22
+ * is interrupted by the sign-in screen keeps it) and opened once both are
23
+ * true. Opening = resolve the slug through the API, open its room, show the
24
+ * pre-join sheet. No media starts before the user taps Join.
25
+ */
26
+
27
+ const PENDING_SCHEDULED_CALL_KEY = exports.PENDING_SCHEDULED_CALL_KEY = 'ethora_pending_scheduled_call';
28
+ /** A link older than this is dropped instead of ambushing the user later. */
29
+ const PENDING_SCHEDULED_CALL_TTL_MS = exports.PENDING_SCHEDULED_CALL_TTL_MS = 30 * 60 * 1000;
30
+ const asyncPendingStorage = exports.asyncPendingStorage = {
31
+ async read() {
32
+ try {
33
+ const raw = await _asyncStorage.default.getItem(PENDING_SCHEDULED_CALL_KEY);
34
+ if (!raw) {
35
+ return null;
36
+ }
37
+ const parsed = JSON.parse(raw);
38
+ return typeof parsed?.slug === 'string' && Number.isFinite(parsed?.at) ? {
39
+ slug: parsed.slug,
40
+ at: parsed.at
41
+ } : null;
42
+ } catch {
43
+ return null;
44
+ }
45
+ },
46
+ async write(value) {
47
+ try {
48
+ await _asyncStorage.default.setItem(PENDING_SCHEDULED_CALL_KEY, JSON.stringify(value));
49
+ } catch {
50
+ // Memory still holds it.
51
+ }
52
+ },
53
+ async clear() {
54
+ try {
55
+ await _asyncStorage.default.removeItem(PENDING_SCHEDULED_CALL_KEY);
56
+ } catch {
57
+ // Nothing to do.
58
+ }
59
+ }
60
+ };
61
+ /**
62
+ * The hold-until-ready logic, free of the store so it can be tested. One
63
+ * slot: a newer link replaces an older one (the user tapped it last).
64
+ */
65
+ const createPendingScheduledCallQueue = deps => {
66
+ const now = deps.now || Date.now;
67
+ const ttl = deps.ttlMs ?? PENDING_SCHEDULED_CALL_TTL_MS;
68
+ let held = null;
69
+ let restored = false;
70
+ const fresh = entry => !!entry && now() - entry.at <= ttl;
71
+ const flush = () => {
72
+ if (!held) {
73
+ return false;
74
+ }
75
+ if (!fresh(held)) {
76
+ held = null;
77
+ void deps.storage.clear();
78
+ return false;
79
+ }
80
+ if (!deps.isReady()) {
81
+ return false;
82
+ }
83
+ const {
84
+ slug
85
+ } = held;
86
+ held = null;
87
+ void deps.storage.clear();
88
+ deps.open(slug);
89
+ return true;
90
+ };
91
+ return {
92
+ /** A link arrived: open it now, or hold it. Returns what happened. */
93
+ submit(slug) {
94
+ held = {
95
+ slug,
96
+ at: now()
97
+ };
98
+ if (flush()) {
99
+ return 'opened';
100
+ }
101
+ void deps.storage.write(held);
102
+ return 'held';
103
+ },
104
+ /** Something that can make us ready changed. */
105
+ poke() {
106
+ return flush();
107
+ },
108
+ /** Pick up a link persisted by an earlier run of the app. */
109
+ async restore() {
110
+ if (restored) {
111
+ return;
112
+ }
113
+ restored = true;
114
+ const saved = await deps.storage.read();
115
+ // A link that arrived while we were reading is newer: keep it.
116
+ if (!held && saved && fresh(saved)) {
117
+ held = saved;
118
+ } else if (!fresh(saved)) {
119
+ void deps.storage.clear();
120
+ }
121
+ flush();
122
+ },
123
+ peek: () => held,
124
+ reset() {
125
+ held = null;
126
+ restored = false;
127
+ }
128
+ };
129
+ };
130
+ exports.createPendingScheduledCallQueue = createPendingScheduledCallQueue;
131
+ const isScheduledCallReady = () => {
132
+ const settings = _roomStore.store.getState().chatSettingStore;
133
+ return !!settings.user?.token && settings.config !== undefined && (settings.connection === 'online' || settings.connection === 'syncing');
134
+ };
135
+ exports.isScheduledCallReady = isScheduledCallReady;
136
+ const reportOpenError = (slug, reason) => {
137
+ try {
138
+ _roomStore.store.getState().chatSettingStore.config?.scheduledCalls?.onOpenError?.({
139
+ slug,
140
+ reason
141
+ });
142
+ } catch {
143
+ // A host callback must not break the flow.
144
+ }
145
+ };
146
+
147
+ /** Resolve the slug, open its room, show the pre-join sheet. */
148
+ const resolveAndOpenScheduledCall = async slug => {
149
+ _scheduledCallStore.scheduledCallUi.showPreJoin({
150
+ phase: 'loading',
151
+ slug
152
+ });
153
+ let detail;
154
+ try {
155
+ detail = await (0, _scheduledCalls.getScheduledCall)(slug);
156
+ } catch (error) {
157
+ const code = (0, _scheduledCalls.isScheduledCallApiError)(error) ? error.code : 'unknown';
158
+ const reason = code === 'not-a-member' ? 'not-a-member' : code === 'not-found' ? 'not-found' : 'network';
159
+ _scheduledCallStore.scheduledCallUi.showPreJoin({
160
+ phase: 'error',
161
+ slug,
162
+ reason
163
+ });
164
+ reportOpenError(slug, reason);
165
+ return;
166
+ }
167
+ if (detail.scheduledCall.status === 'cancelled') {
168
+ _scheduledCallStore.scheduledCallUi.showPreJoin({
169
+ phase: 'error',
170
+ slug,
171
+ reason: 'cancelled',
172
+ title: detail.scheduledCall.title
173
+ });
174
+ reportOpenError(slug, 'cancelled');
175
+ return;
176
+ }
177
+ const conference = _roomStore.store.getState().chatSettingStore.config?.xmppSettings?.conference;
178
+ const jid = detail.chat?.jid || (0, _normalizeRoomJid.normalizeRoomJid)(detail.chat?.name || (0, _scheduledCall.chatNameOfRoom)(detail.scheduledCall.chatName), conference);
179
+ if (jid) {
180
+ (0, _pushPayload.openRoomFromPush)(jid);
181
+ }
182
+ _scheduledCallStore.scheduledCallUi.showPreJoin({
183
+ phase: 'ready',
184
+ slug,
185
+ detail
186
+ });
187
+ };
188
+ exports.resolveAndOpenScheduledCall = resolveAndOpenScheduledCall;
189
+ const queue = createPendingScheduledCallQueue({
190
+ isReady: isScheduledCallReady,
191
+ open: slug => {
192
+ void resolveAndOpenScheduledCall(slug);
193
+ },
194
+ storage: asyncPendingStorage
195
+ });
196
+ let unsubscribe = null;
197
+
198
+ /**
199
+ * Watches the store so a held link opens the moment sign-in and the chat
200
+ * are both there. Idempotent; `<Chat>` arms it on import and
201
+ * `openScheduledCall` arms it too, so a link that beats `<Chat>` is not lost.
202
+ */
203
+ const installScheduledCallHook = () => {
204
+ if (unsubscribe) {
205
+ return;
206
+ }
207
+ unsubscribe = _roomStore.store.subscribe(() => {
208
+ if (queue.peek()) {
209
+ queue.poke();
210
+ }
211
+ });
212
+ void queue.restore();
213
+ };
214
+
215
+ /**
216
+ * Open a scheduled call by slug: now when the user is signed in and the
217
+ * chat is up, otherwise as soon as both are true. Returns `'opening'` when
218
+ * it started right away and `'pending'` when it is held.
219
+ */
220
+ exports.installScheduledCallHook = installScheduledCallHook;
221
+ const openScheduledCall = slug => {
222
+ installScheduledCallHook();
223
+ return queue.submit(slug) === 'opened' ? 'opening' : 'pending';
224
+ };
225
+
226
+ /**
227
+ * Hand any URL to the SDK: a scheduled-call link is opened (or held) and
228
+ * `true` is returned; anything else returns `false` untouched.
229
+ */
230
+ exports.openScheduledCall = openScheduledCall;
231
+ const handleScheduledCallUrl = url => {
232
+ const slug = (0, _scheduledCallLink.parseScheduledCallLink)(url);
233
+ if (!slug) {
234
+ return false;
235
+ }
236
+ openScheduledCall(slug);
237
+ return true;
238
+ };
239
+
240
+ /** The reminder push the backend sends 10 minutes before a call. */
241
+ exports.handleScheduledCallUrl = handleScheduledCallUrl;
242
+ const SCHEDULED_CALL_REMINDER_PUSH_TYPE = exports.SCHEDULED_CALL_REMINDER_PUSH_TYPE = 'scheduledCallReminder';
243
+ const isScheduledCallReminderPush = data => String(data?.type || '') === SCHEDULED_CALL_REMINDER_PUSH_TYPE;
244
+
245
+ /** Slug of a reminder push: `slug`, else parsed out of `joinUrl`. */
246
+ exports.isScheduledCallReminderPush = isScheduledCallReminderPush;
247
+ const scheduledCallSlugFromPush = data => {
248
+ if (!isScheduledCallReminderPush(data)) {
249
+ return null;
250
+ }
251
+ const slug = String(data?.slug || '').trim();
252
+ if (/^[A-Za-z0-9_-]{16,128}$/.test(slug)) {
253
+ return slug;
254
+ }
255
+ return (0, _scheduledCallLink.parseScheduledCallLink)(String(data?.joinUrl || ''));
256
+ };
257
+
258
+ /** A tap on the reminder push opens the same flow as the join link. */
259
+ exports.scheduledCallSlugFromPush = scheduledCallSlugFromPush;
260
+ const handleScheduledCallPush = data => {
261
+ const slug = scheduledCallSlugFromPush(data);
262
+ if (!slug) {
263
+ return false;
264
+ }
265
+ openScheduledCall(slug);
266
+ return true;
267
+ };
268
+ exports.handleScheduledCallPush = handleScheduledCallPush;
269
+ const __resetPendingScheduledCallForTests = () => {
270
+ queue.reset();
271
+ unsubscribe?.();
272
+ unsubscribe = null;
273
+ };
274
+ exports.__resetPendingScheduledCallForTests = __resetPendingScheduledCallForTests;
275
+ //# sourceMappingURL=pendingScheduledCall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_asyncStorage","_interopRequireDefault","require","_roomStore","_pushPayload","_normalizeRoomJid","_scheduledCalls","_scheduledCallLink","_scheduledCall","_scheduledCallStore","e","__esModule","default","PENDING_SCHEDULED_CALL_KEY","exports","PENDING_SCHEDULED_CALL_TTL_MS","asyncPendingStorage","read","raw","AsyncStorage","getItem","parsed","JSON","parse","slug","Number","isFinite","at","write","value","setItem","stringify","clear","removeItem","createPendingScheduledCallQueue","deps","now","Date","ttl","ttlMs","held","restored","fresh","entry","flush","storage","isReady","open","submit","poke","restore","saved","peek","reset","isScheduledCallReady","settings","store","getState","chatSettingStore","user","token","config","undefined","connection","reportOpenError","reason","scheduledCalls","onOpenError","resolveAndOpenScheduledCall","scheduledCallUi","showPreJoin","phase","detail","getScheduledCall","error","code","isScheduledCallApiError","scheduledCall","status","title","conference","xmppSettings","jid","chat","normalizeRoomJid","name","chatNameOfRoom","chatName","openRoomFromPush","queue","unsubscribe","installScheduledCallHook","subscribe","openScheduledCall","handleScheduledCallUrl","url","parseScheduledCallLink","SCHEDULED_CALL_REMINDER_PUSH_TYPE","isScheduledCallReminderPush","data","String","type","scheduledCallSlugFromPush","trim","test","joinUrl","handleScheduledCallPush","__resetPendingScheduledCallForTests"],"sourceRoot":"../../../src","sources":["booking/pendingScheduledCall.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AAIA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAAuD,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,MAAMG,0BAA0B,GAAAC,OAAA,CAAAD,0BAAA,GAAG,+BAA+B;AACzE;AACO,MAAME,6BAA6B,GAAAD,OAAA,CAAAC,6BAAA,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;AAQpD,MAAMC,mBAAmC,GAAAF,OAAA,CAAAE,mBAAA,GAAG;EACjD,MAAMC,IAAIA,CAAA,EAAG;IACX,IAAI;MACF,MAAMC,GAAG,GAAG,MAAMC,qBAAY,CAACC,OAAO,CAACP,0BAA0B,CAAC;MAClE,IAAI,CAACK,GAAG,EAAE;QAAC,OAAO,IAAI;MAAC;MACvB,MAAMG,MAAM,GAAGC,IAAI,CAACC,KAAK,CAACL,GAAG,C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