@ethora/chat-component-rn 26.7.9 → 26.8.1

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 (652) hide show
  1. package/CHANGELOG.md +0 -93
  2. package/README.md +10 -33
  3. package/lib/commonjs/assets/icons.js +2 -7
  4. package/lib/commonjs/assets/icons.js.map +1 -1
  5. package/lib/commonjs/components/AuthForms/Login.js +4 -4
  6. package/lib/commonjs/components/AuthForms/Login.js.map +1 -1
  7. package/lib/commonjs/components/Header/HeaderRoomList.js +7 -26
  8. package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
  9. package/lib/commonjs/components/MainComponents/ChatHeader.js +3 -9
  10. package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
  11. package/lib/commonjs/components/MainComponents/ChatRoom.js +13 -101
  12. package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
  13. package/lib/commonjs/components/MainComponents/ChatWrapper.js +38 -34
  14. package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
  15. package/lib/commonjs/components/MainComponents/LoginWrapper.js +1 -2
  16. package/lib/commonjs/components/MainComponents/LoginWrapper.js.map +1 -1
  17. package/lib/commonjs/components/MainComponents/MediaMessage.js +9 -29
  18. package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
  19. package/lib/commonjs/components/MainComponents/MessageContainer.js +1 -5
  20. package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
  21. package/lib/commonjs/components/MainComponents/MessageList.js +5 -13
  22. package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
  23. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js +13 -14
  24. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  25. package/lib/commonjs/components/MainComponents/ReduxWrapper.js +24 -3
  26. package/lib/commonjs/components/MainComponents/ReduxWrapper.js.map +1 -1
  27. package/lib/commonjs/components/MainComponents/RoomList.js +35 -208
  28. package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
  29. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +98 -317
  30. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
  31. package/lib/commonjs/components/MessageBubble/MessageTranslate.js +16 -7
  32. package/lib/commonjs/components/MessageBubble/MessageTranslate.js.map +1 -1
  33. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +112 -320
  34. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  35. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +215 -556
  36. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  37. package/lib/commonjs/components/Modals/ChatProfileModal/DeleteChatModal.js +9 -7
  38. package/lib/commonjs/components/Modals/ChatProfileModal/DeleteChatModal.js.map +1 -1
  39. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +27 -69
  40. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  41. package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js +1 -2
  42. package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
  43. package/lib/commonjs/components/Modals/Modal/Modal.js +0 -8
  44. package/lib/commonjs/components/Modals/Modal/Modal.js.map +1 -1
  45. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js +1 -2
  46. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  47. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js +109 -205
  48. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  49. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js +0 -8
  50. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  51. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +2 -4
  52. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  53. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js +21 -7
  54. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  55. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +244 -507
  56. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  57. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +46 -74
  58. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  59. package/lib/commonjs/components/Modals/styledModalComponents.js +2 -9
  60. package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
  61. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +39 -23
  62. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
  63. package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js +3 -22
  64. package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
  65. package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js +3 -17
  66. package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
  67. package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js +3 -17
  68. package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
  69. package/lib/commonjs/components/VideoCalls/VideoCallSession.js +3 -6
  70. package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
  71. package/lib/commonjs/components/styled/AudioMessage.js +1 -2
  72. package/lib/commonjs/components/styled/AudioMessage.js.map +1 -1
  73. package/lib/commonjs/components/styled/DateLabel.js +10 -3
  74. package/lib/commonjs/components/styled/DateLabel.js.map +1 -1
  75. package/lib/commonjs/components/styled/MessageImage.js +9 -37
  76. package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
  77. package/lib/commonjs/components/styled/NewMessageLabel.js +3 -1
  78. package/lib/commonjs/components/styled/NewMessageLabel.js.map +1 -1
  79. package/lib/commonjs/components/styled/SendInput.js +17 -86
  80. package/lib/commonjs/components/styled/SendInput.js.map +1 -1
  81. package/lib/commonjs/components/styled/StyledComponents.js +3 -9
  82. package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
  83. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +4 -11
  84. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  85. package/lib/commonjs/components/styled/UnsupportedType.js +4 -14
  86. package/lib/commonjs/components/styled/UnsupportedType.js.map +1 -1
  87. package/lib/commonjs/components/styled/VideoMessage.js +61 -119
  88. package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
  89. package/lib/commonjs/context/xmppProvider.js +54 -128
  90. package/lib/commonjs/context/xmppProvider.js.map +1 -1
  91. package/lib/commonjs/helpers/createMessageFromXml.js +1 -19
  92. package/lib/commonjs/helpers/createMessageFromXml.js.map +1 -1
  93. package/lib/commonjs/helpers/ensureScopedChatCache.js +2 -2
  94. package/lib/commonjs/helpers/ensureScopedChatCache.js.map +1 -1
  95. package/lib/commonjs/helpers/getDataFromXml.js +24 -1
  96. package/lib/commonjs/helpers/getDataFromXml.js.map +1 -1
  97. package/lib/commonjs/helpers/historyPreloadScheduler.js +2 -65
  98. package/lib/commonjs/helpers/historyPreloadScheduler.js.map +1 -1
  99. package/lib/commonjs/helpers/initXmppRooms.js +8 -14
  100. package/lib/commonjs/helpers/initXmppRooms.js.map +1 -1
  101. package/lib/commonjs/helpers/insertMessageWithDelimiter.js +13 -0
  102. package/lib/commonjs/helpers/insertMessageWithDelimiter.js.map +1 -1
  103. package/lib/commonjs/helpers/isUnresolvedSenderId.js +6 -1
  104. package/lib/commonjs/helpers/isUnresolvedSenderId.js.map +1 -1
  105. package/lib/commonjs/helpers/mimeToExtension.js +14 -6
  106. package/lib/commonjs/helpers/mimeToExtension.js.map +1 -1
  107. package/lib/commonjs/helpers/resolveInitBeforeLoadUser.js +17 -130
  108. package/lib/commonjs/helpers/resolveInitBeforeLoadUser.js.map +1 -1
  109. package/lib/commonjs/helpers/resolveLangSource.js +38 -0
  110. package/lib/commonjs/helpers/resolveLangSource.js.map +1 -0
  111. package/lib/commonjs/helpers/xmppUsername.js +39 -0
  112. package/lib/commonjs/helpers/xmppUsername.js.map +1 -0
  113. package/lib/commonjs/hooks/useChatRoomFocus.js +8 -17
  114. package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
  115. package/lib/commonjs/hooks/useChatWrapperInit.js +14 -32
  116. package/lib/commonjs/hooks/useChatWrapperInit.js.map +1 -1
  117. package/lib/commonjs/hooks/useComposing.js +0 -27
  118. package/lib/commonjs/hooks/useComposing.js.map +1 -1
  119. package/lib/commonjs/hooks/useLogout.js +7 -15
  120. package/lib/commonjs/hooks/useLogout.js.map +1 -1
  121. package/lib/commonjs/hooks/usePendingNotification.js +11 -8
  122. package/lib/commonjs/hooks/usePendingNotification.js.map +1 -1
  123. package/lib/commonjs/hooks/useSendMessage.js +14 -50
  124. package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
  125. package/lib/commonjs/hooks/useUnreadMessagesCounter.js +1 -6
  126. package/lib/commonjs/hooks/useUnreadMessagesCounter.js.map +1 -1
  127. package/lib/commonjs/i18n/strings.js +133 -121
  128. package/lib/commonjs/i18n/strings.js.map +1 -1
  129. package/lib/commonjs/i18n/useT.js +1 -1
  130. package/lib/commonjs/main.js +0 -44
  131. package/lib/commonjs/main.js.map +1 -1
  132. package/lib/commonjs/networking/api-requests/auth.api.js +60 -134
  133. package/lib/commonjs/networking/api-requests/auth.api.js.map +1 -1
  134. package/lib/commonjs/networking/api-requests/roomMembers.api.js +1 -1
  135. package/lib/commonjs/networking/api-requests/roomMembers.api.js.map +1 -1
  136. package/lib/commonjs/networking/api-requests/rooms.api.js +9 -9
  137. package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
  138. package/lib/commonjs/networking/api-requests/user.api.js +9 -68
  139. package/lib/commonjs/networking/api-requests/user.api.js.map +1 -1
  140. package/lib/commonjs/networking/apiClient.js +112 -62
  141. package/lib/commonjs/networking/apiClient.js.map +1 -1
  142. package/lib/commonjs/networking/stanzaHandlers.js +51 -93
  143. package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
  144. package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js +8 -46
  145. package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
  146. package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js +1 -8
  147. package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
  148. package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js +1 -5
  149. package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
  150. package/lib/commonjs/networking/xmppClient.js +8 -124
  151. package/lib/commonjs/networking/xmppClient.js.map +1 -1
  152. package/lib/commonjs/roomStore/chatSettingsSlice.js +7 -26
  153. package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
  154. package/lib/commonjs/roomStore/index.js +2 -35
  155. package/lib/commonjs/roomStore/index.js.map +1 -1
  156. package/lib/commonjs/roomStore/persistence.js +39 -226
  157. package/lib/commonjs/roomStore/persistence.js.map +1 -1
  158. package/lib/commonjs/roomStore/roomsSlice.js +8 -87
  159. package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
  160. package/lib/commonjs/services/pushSubscriptionService.js +13 -15
  161. package/lib/commonjs/services/pushSubscriptionService.js.map +1 -1
  162. package/lib/commonjs/version.js +3 -1
  163. package/lib/commonjs/version.js.map +1 -1
  164. package/lib/module/assets/icons.js +1 -6
  165. package/lib/module/assets/icons.js.map +1 -1
  166. package/lib/module/components/AuthForms/Login.js +4 -4
  167. package/lib/module/components/AuthForms/Login.js.map +1 -1
  168. package/lib/module/components/Header/HeaderRoomList.js +7 -26
  169. package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
  170. package/lib/module/components/MainComponents/ChatHeader.js +3 -9
  171. package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
  172. package/lib/module/components/MainComponents/ChatRoom.js +14 -102
  173. package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
  174. package/lib/module/components/MainComponents/ChatWrapper.js +40 -36
  175. package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
  176. package/lib/module/components/MainComponents/LoginWrapper.js +1 -2
  177. package/lib/module/components/MainComponents/LoginWrapper.js.map +1 -1
  178. package/lib/module/components/MainComponents/MediaMessage.js +10 -30
  179. package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
  180. package/lib/module/components/MainComponents/MessageContainer.js +1 -5
  181. package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
  182. package/lib/module/components/MainComponents/MessageList.js +5 -13
  183. package/lib/module/components/MainComponents/MessageList.js.map +1 -1
  184. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js +13 -14
  185. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  186. package/lib/module/components/MainComponents/ReduxWrapper.js +26 -5
  187. package/lib/module/components/MainComponents/ReduxWrapper.js.map +1 -1
  188. package/lib/module/components/MainComponents/RoomList.js +35 -207
  189. package/lib/module/components/MainComponents/RoomList.js.map +1 -1
  190. package/lib/module/components/Menu/HeaderRoomListMenu.js +101 -319
  191. package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
  192. package/lib/module/components/MessageBubble/MessageTranslate.js +16 -7
  193. package/lib/module/components/MessageBubble/MessageTranslate.js.map +1 -1
  194. package/lib/module/components/Modals/AttachSheet/AttachSheet.js +115 -311
  195. package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  196. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +219 -559
  197. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  198. package/lib/module/components/Modals/ChatProfileModal/DeleteChatModal.js +9 -7
  199. package/lib/module/components/Modals/ChatProfileModal/DeleteChatModal.js.map +1 -1
  200. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +28 -70
  201. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  202. package/lib/module/components/Modals/FilePreviewModal/PdfView.js +1 -2
  203. package/lib/module/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
  204. package/lib/module/components/Modals/Modal/Modal.js +1 -9
  205. package/lib/module/components/Modals/Modal/Modal.js.map +1 -1
  206. package/lib/module/components/Modals/NewChatModal/ModalContent.js +1 -2
  207. package/lib/module/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  208. package/lib/module/components/Modals/NewChatModal/NewChatModal.js +111 -208
  209. package/lib/module/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  210. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js +0 -8
  211. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  212. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +2 -4
  213. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  214. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js +23 -9
  215. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  216. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +248 -509
  217. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  218. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +48 -76
  219. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  220. package/lib/module/components/Modals/styledModalComponents.js +2 -9
  221. package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
  222. package/lib/module/components/RoomComponents/ChatRoomItem.js +40 -24
  223. package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
  224. package/lib/module/components/RoomComponents/styled/LastMessageFile.js +3 -22
  225. package/lib/module/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
  226. package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js +3 -17
  227. package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
  228. package/lib/module/components/RoomComponents/styled/LastMessageVideo.js +3 -17
  229. package/lib/module/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
  230. package/lib/module/components/VideoCalls/VideoCallSession.js +3 -6
  231. package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
  232. package/lib/module/components/styled/AudioMessage.js +1 -2
  233. package/lib/module/components/styled/AudioMessage.js.map +1 -1
  234. package/lib/module/components/styled/DateLabel.js +10 -3
  235. package/lib/module/components/styled/DateLabel.js.map +1 -1
  236. package/lib/module/components/styled/MessageImage.js +9 -37
  237. package/lib/module/components/styled/MessageImage.js.map +1 -1
  238. package/lib/module/components/styled/NewMessageLabel.js +3 -1
  239. package/lib/module/components/styled/NewMessageLabel.js.map +1 -1
  240. package/lib/module/components/styled/SendInput.js +18 -87
  241. package/lib/module/components/styled/SendInput.js.map +1 -1
  242. package/lib/module/components/styled/StyledComponents.js +3 -9
  243. package/lib/module/components/styled/StyledComponents.js.map +1 -1
  244. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +4 -11
  245. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  246. package/lib/module/components/styled/UnsupportedType.js +4 -14
  247. package/lib/module/components/styled/UnsupportedType.js.map +1 -1
  248. package/lib/module/components/styled/VideoMessage.js +62 -120
  249. package/lib/module/components/styled/VideoMessage.js.map +1 -1
  250. package/lib/module/context/xmppProvider.js +55 -128
  251. package/lib/module/context/xmppProvider.js.map +1 -1
  252. package/lib/module/helpers/createMessageFromXml.js +1 -19
  253. package/lib/module/helpers/createMessageFromXml.js.map +1 -1
  254. package/lib/module/helpers/ensureScopedChatCache.js +2 -2
  255. package/lib/module/helpers/ensureScopedChatCache.js.map +1 -1
  256. package/lib/module/helpers/getDataFromXml.js +23 -1
  257. package/lib/module/helpers/getDataFromXml.js.map +1 -1
  258. package/lib/module/helpers/historyPreloadScheduler.js +3 -66
  259. package/lib/module/helpers/historyPreloadScheduler.js.map +1 -1
  260. package/lib/module/helpers/initXmppRooms.js +8 -14
  261. package/lib/module/helpers/initXmppRooms.js.map +1 -1
  262. package/lib/module/helpers/insertMessageWithDelimiter.js +13 -0
  263. package/lib/module/helpers/insertMessageWithDelimiter.js.map +1 -1
  264. package/lib/module/helpers/isUnresolvedSenderId.js +6 -1
  265. package/lib/module/helpers/isUnresolvedSenderId.js.map +1 -1
  266. package/lib/module/helpers/mimeToExtension.js +13 -6
  267. package/lib/module/helpers/mimeToExtension.js.map +1 -1
  268. package/lib/module/helpers/resolveInitBeforeLoadUser.js +16 -130
  269. package/lib/module/helpers/resolveInitBeforeLoadUser.js.map +1 -1
  270. package/lib/module/helpers/resolveLangSource.js +32 -0
  271. package/lib/module/helpers/resolveLangSource.js.map +1 -0
  272. package/lib/module/helpers/xmppUsername.js +35 -0
  273. package/lib/module/helpers/xmppUsername.js.map +1 -0
  274. package/lib/module/hooks/useChatRoomFocus.js +8 -17
  275. package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
  276. package/lib/module/hooks/useChatWrapperInit.js +14 -32
  277. package/lib/module/hooks/useChatWrapperInit.js.map +1 -1
  278. package/lib/module/hooks/useComposing.js +1 -28
  279. package/lib/module/hooks/useComposing.js.map +1 -1
  280. package/lib/module/hooks/useLogout.js +7 -15
  281. package/lib/module/hooks/useLogout.js.map +1 -1
  282. package/lib/module/hooks/usePendingNotification.js +11 -8
  283. package/lib/module/hooks/usePendingNotification.js.map +1 -1
  284. package/lib/module/hooks/useSendMessage.js +16 -52
  285. package/lib/module/hooks/useSendMessage.js.map +1 -1
  286. package/lib/module/hooks/useUnreadMessagesCounter.js +1 -6
  287. package/lib/module/hooks/useUnreadMessagesCounter.js.map +1 -1
  288. package/lib/module/i18n/strings.js +133 -121
  289. package/lib/module/i18n/strings.js.map +1 -1
  290. package/lib/module/i18n/useT.js +1 -1
  291. package/lib/module/main.js +2 -14
  292. package/lib/module/main.js.map +1 -1
  293. package/lib/module/networking/api-requests/auth.api.js +59 -131
  294. package/lib/module/networking/api-requests/auth.api.js.map +1 -1
  295. package/lib/module/networking/api-requests/roomMembers.api.js +1 -1
  296. package/lib/module/networking/api-requests/roomMembers.api.js.map +1 -1
  297. package/lib/module/networking/api-requests/rooms.api.js +9 -9
  298. package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
  299. package/lib/module/networking/api-requests/user.api.js +7 -64
  300. package/lib/module/networking/api-requests/user.api.js.map +1 -1
  301. package/lib/module/networking/apiClient.js +113 -61
  302. package/lib/module/networking/apiClient.js.map +1 -1
  303. package/lib/module/networking/stanzaHandlers.js +52 -94
  304. package/lib/module/networking/stanzaHandlers.js.map +1 -1
  305. package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js +8 -46
  306. package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
  307. package/lib/module/networking/xmpp/presenceInRoom.xmpp.js +1 -8
  308. package/lib/module/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
  309. package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js +1 -5
  310. package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
  311. package/lib/module/networking/xmppClient.js +8 -124
  312. package/lib/module/networking/xmppClient.js.map +1 -1
  313. package/lib/module/roomStore/chatSettingsSlice.js +7 -26
  314. package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
  315. package/lib/module/roomStore/index.js +4 -37
  316. package/lib/module/roomStore/index.js.map +1 -1
  317. package/lib/module/roomStore/persistence.js +38 -223
  318. package/lib/module/roomStore/persistence.js.map +1 -1
  319. package/lib/module/roomStore/roomsSlice.js +7 -86
  320. package/lib/module/roomStore/roomsSlice.js.map +1 -1
  321. package/lib/module/services/pushSubscriptionService.js +13 -15
  322. package/lib/module/services/pushSubscriptionService.js.map +1 -1
  323. package/lib/module/version.js +3 -1
  324. package/lib/module/version.js.map +1 -1
  325. package/lib/typescript/assets/icons.d.ts +0 -16
  326. package/lib/typescript/assets/icons.d.ts.map +1 -1
  327. package/lib/typescript/components/AuthForms/Login.d.ts.map +1 -1
  328. package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
  329. package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
  330. package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
  331. package/lib/typescript/components/MainComponents/ChatWrapper.d.ts.map +1 -1
  332. package/lib/typescript/components/MainComponents/LoginWrapper.d.ts.map +1 -1
  333. package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
  334. package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
  335. package/lib/typescript/components/MainComponents/MessageList.d.ts +1 -10
  336. package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
  337. package/lib/typescript/components/MainComponents/ProfileImagePlaceholder.d.ts.map +1 -1
  338. package/lib/typescript/components/MainComponents/ReduxWrapper.d.ts.map +1 -1
  339. package/lib/typescript/components/MainComponents/RoomList.d.ts +0 -7
  340. package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
  341. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts +0 -3
  342. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
  343. package/lib/typescript/components/MessageBubble/MessageTranslate.d.ts.map +1 -1
  344. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts +0 -9
  345. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts.map +1 -1
  346. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts +0 -10
  347. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
  348. package/lib/typescript/components/Modals/ChatProfileModal/DeleteChatModal.d.ts.map +1 -1
  349. package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
  350. package/lib/typescript/components/Modals/FilePreviewModal/PdfView.d.ts.map +1 -1
  351. package/lib/typescript/components/Modals/Modal/Modal.d.ts.map +1 -1
  352. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts +2 -4
  353. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts.map +1 -1
  354. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts +1 -1
  355. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts.map +1 -1
  356. package/lib/typescript/components/Modals/NewChatModal/UpdNewChatModal.d.ts.map +1 -1
  357. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts +1 -6
  358. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts.map +1 -1
  359. package/lib/typescript/components/Modals/UserProfileModal/EditUserModal.d.ts.map +1 -1
  360. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts +0 -16
  361. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
  362. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts +0 -1
  363. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts.map +1 -1
  364. package/lib/typescript/components/Modals/styledModalComponents.d.ts.map +1 -1
  365. package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
  366. package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts +1 -1
  367. package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts.map +1 -1
  368. package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts +1 -1
  369. package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts.map +1 -1
  370. package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts +1 -1
  371. package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts.map +1 -1
  372. package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
  373. package/lib/typescript/components/styled/AudioMessage.d.ts.map +1 -1
  374. package/lib/typescript/components/styled/DateLabel.d.ts.map +1 -1
  375. package/lib/typescript/components/styled/MessageImage.d.ts +0 -14
  376. package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
  377. package/lib/typescript/components/styled/NewMessageLabel.d.ts.map +1 -1
  378. package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
  379. package/lib/typescript/components/styled/StyledComponents.d.ts.map +1 -1
  380. package/lib/typescript/components/styled/StyledInputComponents/StyledInputComponents.d.ts.map +1 -1
  381. package/lib/typescript/components/styled/UnsupportedType.d.ts.map +1 -1
  382. package/lib/typescript/components/styled/VideoMessage.d.ts +0 -8
  383. package/lib/typescript/components/styled/VideoMessage.d.ts.map +1 -1
  384. package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
  385. package/lib/typescript/helpers/createMessageFromXml.d.ts.map +1 -1
  386. package/lib/typescript/helpers/getDataFromXml.d.ts.map +1 -1
  387. package/lib/typescript/helpers/historyPreloadScheduler.d.ts.map +1 -1
  388. package/lib/typescript/helpers/initXmppRooms.d.ts.map +1 -1
  389. package/lib/typescript/helpers/insertMessageWithDelimiter.d.ts.map +1 -1
  390. package/lib/typescript/helpers/isUnresolvedSenderId.d.ts.map +1 -1
  391. package/lib/typescript/helpers/mimeToExtension.d.ts +15 -0
  392. package/lib/typescript/helpers/mimeToExtension.d.ts.map +1 -1
  393. package/lib/typescript/helpers/resolveInitBeforeLoadUser.d.ts.map +1 -1
  394. package/lib/typescript/helpers/resolveLangSource.d.ts +30 -0
  395. package/lib/typescript/helpers/resolveLangSource.d.ts.map +1 -0
  396. package/lib/typescript/helpers/xmppUsername.d.ts +13 -0
  397. package/lib/typescript/helpers/xmppUsername.d.ts.map +1 -0
  398. package/lib/typescript/hooks/useChatRoomFocus.d.ts +1 -4
  399. package/lib/typescript/hooks/useChatRoomFocus.d.ts.map +1 -1
  400. package/lib/typescript/hooks/useChatWrapperInit.d.ts.map +1 -1
  401. package/lib/typescript/hooks/useComposing.d.ts.map +1 -1
  402. package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
  403. package/lib/typescript/hooks/usePendingNotification.d.ts.map +1 -1
  404. package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
  405. package/lib/typescript/hooks/useUnreadMessagesCounter.d.ts +0 -1
  406. package/lib/typescript/hooks/useUnreadMessagesCounter.d.ts.map +1 -1
  407. package/lib/typescript/i18n/strings.d.ts.map +1 -1
  408. package/lib/typescript/i18n/useT.d.ts +1 -1
  409. package/lib/typescript/main.d.ts +2 -9
  410. package/lib/typescript/main.d.ts.map +1 -1
  411. package/lib/typescript/networking/api-requests/auth.api.d.ts +1 -3
  412. package/lib/typescript/networking/api-requests/auth.api.d.ts.map +1 -1
  413. package/lib/typescript/networking/api-requests/user.api.d.ts +0 -27
  414. package/lib/typescript/networking/api-requests/user.api.d.ts.map +1 -1
  415. package/lib/typescript/networking/apiClient.d.ts +6 -12
  416. package/lib/typescript/networking/apiClient.d.ts.map +1 -1
  417. package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
  418. package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts +2 -10
  419. package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts.map +1 -1
  420. package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts.map +1 -1
  421. package/lib/typescript/networking/xmpp/subscribeToRoomMessages.xmpp.d.ts.map +1 -1
  422. package/lib/typescript/networking/xmppClient.d.ts +0 -14
  423. package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
  424. package/lib/typescript/roomStore/chatSettingsSlice.d.ts +0 -16
  425. package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
  426. package/lib/typescript/roomStore/index.d.ts.map +1 -1
  427. package/lib/typescript/roomStore/persistence.d.ts +1 -18
  428. package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
  429. package/lib/typescript/roomStore/roomsSlice.d.ts +1 -14
  430. package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
  431. package/lib/typescript/services/pushSubscriptionService.d.ts +1 -1
  432. package/lib/typescript/services/pushSubscriptionService.d.ts.map +1 -1
  433. package/lib/typescript/types/types.d.ts +5 -49
  434. package/lib/typescript/types/types.d.ts.map +1 -1
  435. package/lib/typescript/version.d.ts +1 -1
  436. package/lib/typescript/version.d.ts.map +1 -1
  437. package/package.json +29 -41
  438. package/src/assets/icons.tsx +9 -48
  439. package/src/components/AuthForms/Login.tsx +3 -3
  440. package/src/components/Header/HeaderRoomList.tsx +6 -24
  441. package/src/components/MainComponents/ChatHeader.tsx +3 -9
  442. package/src/components/MainComponents/ChatRoom.tsx +16 -111
  443. package/src/components/MainComponents/ChatWrapper.tsx +53 -36
  444. package/src/components/MainComponents/LoginWrapper.tsx +0 -1
  445. package/src/components/MainComponents/MediaMessage.tsx +8 -26
  446. package/src/components/MainComponents/MessageContainer.tsx +1 -5
  447. package/src/components/MainComponents/MessageList.tsx +4 -23
  448. package/src/components/MainComponents/ProfileImagePlaceholder.tsx +14 -21
  449. package/src/components/MainComponents/ReduxWrapper.tsx +18 -1
  450. package/src/components/MainComponents/RoomList.tsx +39 -236
  451. package/src/components/Menu/HeaderRoomListMenu.tsx +75 -328
  452. package/src/components/MessageBubble/MessageTranslate.tsx +17 -12
  453. package/src/components/Modals/AttachSheet/AttachSheet.tsx +99 -331
  454. package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +293 -611
  455. package/src/components/Modals/ChatProfileModal/DeleteChatModal.tsx +9 -7
  456. package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +38 -79
  457. package/src/components/Modals/FilePreviewModal/PdfView.tsx +1 -2
  458. package/src/components/Modals/Modal/Modal.tsx +0 -7
  459. package/src/components/Modals/NewChatModal/ModalContent.tsx +3 -6
  460. package/src/components/Modals/NewChatModal/NewChatModal.tsx +126 -223
  461. package/src/components/Modals/NewChatModal/UpdNewChatModal.tsx +1 -12
  462. package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +4 -14
  463. package/src/components/Modals/UserProfileModal/EditUserModal.tsx +25 -9
  464. package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +307 -617
  465. package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +58 -75
  466. package/src/components/Modals/styledModalComponents.tsx +2 -9
  467. package/src/components/RoomComponents/ChatRoomItem.tsx +50 -21
  468. package/src/components/RoomComponents/styled/LastMessageFile.tsx +4 -28
  469. package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +3 -18
  470. package/src/components/RoomComponents/styled/LastMessageVideo.tsx +3 -18
  471. package/src/components/VideoCalls/VideoCallSession.tsx +3 -8
  472. package/src/components/styled/AudioMessage.tsx +1 -2
  473. package/src/components/styled/DateLabel.tsx +10 -3
  474. package/src/components/styled/MessageImage.tsx +7 -53
  475. package/src/components/styled/NewMessageLabel.tsx +3 -1
  476. package/src/components/styled/SendInput.tsx +18 -91
  477. package/src/components/styled/StyledComponents.ts +3 -9
  478. package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +4 -11
  479. package/src/components/styled/UnsupportedType.tsx +4 -14
  480. package/src/components/styled/VideoMessage.tsx +54 -131
  481. package/src/context/xmppProvider.tsx +51 -134
  482. package/src/helpers/createMessageFromXml.ts +1 -20
  483. package/src/helpers/ensureScopedChatCache.ts +2 -2
  484. package/src/helpers/getDataFromXml.ts +25 -1
  485. package/src/helpers/historyPreloadScheduler.ts +3 -80
  486. package/src/helpers/initXmppRooms.tsx +10 -14
  487. package/src/helpers/insertMessageWithDelimiter.ts +13 -0
  488. package/src/helpers/isUnresolvedSenderId.ts +9 -1
  489. package/src/helpers/mimeToExtension.ts +22 -6
  490. package/src/helpers/resolveInitBeforeLoadUser.ts +18 -125
  491. package/src/helpers/resolveLangSource.ts +40 -0
  492. package/src/helpers/xmppUsername.ts +38 -0
  493. package/src/hooks/useChatRoomFocus.ts +5 -14
  494. package/src/hooks/useChatWrapperInit.ts +16 -32
  495. package/src/hooks/useComposing.tsx +1 -37
  496. package/src/hooks/useLogout.tsx +9 -15
  497. package/src/hooks/usePendingNotification.ts +11 -5
  498. package/src/hooks/useSendMessage.tsx +15 -60
  499. package/src/hooks/useUnreadMessagesCounter.ts +0 -11
  500. package/src/i18n/strings.ts +133 -121
  501. package/src/i18n/useT.ts +1 -1
  502. package/src/main.ts +2 -26
  503. package/src/networking/api-requests/auth.api.ts +48 -156
  504. package/src/networking/api-requests/roomMembers.api.ts +1 -1
  505. package/src/networking/api-requests/rooms.api.ts +9 -9
  506. package/src/networking/api-requests/user.api.ts +7 -79
  507. package/src/networking/apiClient.ts +123 -68
  508. package/src/networking/stanzaHandlers.ts +51 -92
  509. package/src/networking/xmpp/flushLastViewedToPrivateStore.ts +10 -71
  510. package/src/networking/xmpp/presenceInRoom.xmpp.ts +1 -6
  511. package/src/networking/xmpp/subscribeToRoomMessages.xmpp.ts +1 -12
  512. package/src/networking/xmppClient.ts +9 -141
  513. package/src/roomStore/chatSettingsSlice.ts +10 -34
  514. package/src/roomStore/index.ts +4 -40
  515. package/src/roomStore/persistence.ts +40 -234
  516. package/src/roomStore/roomsSlice.ts +7 -87
  517. package/src/services/pushSubscriptionService.ts +13 -18
  518. package/src/types/types.ts +5 -58
  519. package/src/version.ts +3 -1
  520. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +0 -226
  521. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +0 -1
  522. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js +0 -556
  523. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +0 -1
  524. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +0 -210
  525. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +0 -1
  526. package/lib/commonjs/helpers/getChatBackground.js +0 -23
  527. package/lib/commonjs/helpers/getChatBackground.js.map +0 -1
  528. package/lib/commonjs/helpers/getDisplayFileName.js +0 -79
  529. package/lib/commonjs/helpers/getDisplayFileName.js.map +0 -1
  530. package/lib/commonjs/helpers/getServerReadTimestamp.js +0 -125
  531. package/lib/commonjs/helpers/getServerReadTimestamp.js.map +0 -1
  532. package/lib/commonjs/helpers/isOwnMessage.js +0 -75
  533. package/lib/commonjs/helpers/isOwnMessage.js.map +0 -1
  534. package/lib/commonjs/helpers/mediaLibraryRuntime.js +0 -31
  535. package/lib/commonjs/helpers/mediaLibraryRuntime.js.map +0 -1
  536. package/lib/commonjs/helpers/persistCrypto.js +0 -122
  537. package/lib/commonjs/helpers/persistCrypto.js.map +0 -1
  538. package/lib/commonjs/helpers/pickImageAsset.js +0 -68
  539. package/lib/commonjs/helpers/pickImageAsset.js.map +0 -1
  540. package/lib/commonjs/helpers/pushPayload.js +0 -71
  541. package/lib/commonjs/helpers/pushPayload.js.map +0 -1
  542. package/lib/commonjs/helpers/secureFileUrl.js +0 -101
  543. package/lib/commonjs/helpers/secureFileUrl.js.map +0 -1
  544. package/lib/commonjs/helpers/secureKeyValue.js +0 -83
  545. package/lib/commonjs/helpers/secureKeyValue.js.map +0 -1
  546. package/lib/commonjs/helpers/secureStoreRuntime.js +0 -59
  547. package/lib/commonjs/helpers/secureStoreRuntime.js.map +0 -1
  548. package/lib/commonjs/helpers/secureUserStorage.js +0 -75
  549. package/lib/commonjs/helpers/secureUserStorage.js.map +0 -1
  550. package/lib/commonjs/helpers/shallowEqual.js +0 -36
  551. package/lib/commonjs/helpers/shallowEqual.js.map +0 -1
  552. package/lib/commonjs/helpers/sheetGestures.js +0 -32
  553. package/lib/commonjs/helpers/sheetGestures.js.map +0 -1
  554. package/lib/commonjs/hooks/useFileToken.js +0 -10
  555. package/lib/commonjs/hooks/useFileToken.js.map +0 -1
  556. package/lib/commonjs/networking/authRefresh.js +0 -332
  557. package/lib/commonjs/networking/authRefresh.js.map +0 -1
  558. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +0 -223
  559. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +0 -1
  560. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js +0 -548
  561. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +0 -1
  562. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +0 -205
  563. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +0 -1
  564. package/lib/module/helpers/getChatBackground.js +0 -18
  565. package/lib/module/helpers/getChatBackground.js.map +0 -1
  566. package/lib/module/helpers/getDisplayFileName.js +0 -73
  567. package/lib/module/helpers/getDisplayFileName.js.map +0 -1
  568. package/lib/module/helpers/getServerReadTimestamp.js +0 -120
  569. package/lib/module/helpers/getServerReadTimestamp.js.map +0 -1
  570. package/lib/module/helpers/isOwnMessage.js +0 -70
  571. package/lib/module/helpers/isOwnMessage.js.map +0 -1
  572. package/lib/module/helpers/mediaLibraryRuntime.js +0 -25
  573. package/lib/module/helpers/mediaLibraryRuntime.js.map +0 -1
  574. package/lib/module/helpers/persistCrypto.js +0 -115
  575. package/lib/module/helpers/persistCrypto.js.map +0 -1
  576. package/lib/module/helpers/pickImageAsset.js +0 -63
  577. package/lib/module/helpers/pickImageAsset.js.map +0 -1
  578. package/lib/module/helpers/pushPayload.js +0 -63
  579. package/lib/module/helpers/pushPayload.js.map +0 -1
  580. package/lib/module/helpers/secureFileUrl.js +0 -91
  581. package/lib/module/helpers/secureFileUrl.js.map +0 -1
  582. package/lib/module/helpers/secureKeyValue.js +0 -75
  583. package/lib/module/helpers/secureKeyValue.js.map +0 -1
  584. package/lib/module/helpers/secureStoreRuntime.js +0 -52
  585. package/lib/module/helpers/secureStoreRuntime.js.map +0 -1
  586. package/lib/module/helpers/secureUserStorage.js +0 -72
  587. package/lib/module/helpers/secureUserStorage.js.map +0 -1
  588. package/lib/module/helpers/shallowEqual.js +0 -31
  589. package/lib/module/helpers/shallowEqual.js.map +0 -1
  590. package/lib/module/helpers/sheetGestures.js +0 -26
  591. package/lib/module/helpers/sheetGestures.js.map +0 -1
  592. package/lib/module/hooks/useFileToken.js +0 -5
  593. package/lib/module/hooks/useFileToken.js.map +0 -1
  594. package/lib/module/networking/authRefresh.js +0 -321
  595. package/lib/module/networking/authRefresh.js.map +0 -1
  596. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts +0 -9
  597. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +0 -1
  598. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts +0 -75
  599. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts.map +0 -1
  600. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts +0 -25
  601. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts.map +0 -1
  602. package/lib/typescript/helpers/getChatBackground.d.ts +0 -15
  603. package/lib/typescript/helpers/getChatBackground.d.ts.map +0 -1
  604. package/lib/typescript/helpers/getDisplayFileName.d.ts +0 -49
  605. package/lib/typescript/helpers/getDisplayFileName.d.ts.map +0 -1
  606. package/lib/typescript/helpers/getServerReadTimestamp.d.ts +0 -69
  607. package/lib/typescript/helpers/getServerReadTimestamp.d.ts.map +0 -1
  608. package/lib/typescript/helpers/isOwnMessage.d.ts +0 -36
  609. package/lib/typescript/helpers/isOwnMessage.d.ts.map +0 -1
  610. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts +0 -3
  611. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts.map +0 -1
  612. package/lib/typescript/helpers/persistCrypto.d.ts +0 -13
  613. package/lib/typescript/helpers/persistCrypto.d.ts.map +0 -1
  614. package/lib/typescript/helpers/pickImageAsset.d.ts +0 -27
  615. package/lib/typescript/helpers/pickImageAsset.d.ts.map +0 -1
  616. package/lib/typescript/helpers/pushPayload.d.ts +0 -7
  617. package/lib/typescript/helpers/pushPayload.d.ts.map +0 -1
  618. package/lib/typescript/helpers/secureFileUrl.d.ts +0 -7
  619. package/lib/typescript/helpers/secureFileUrl.d.ts.map +0 -1
  620. package/lib/typescript/helpers/secureKeyValue.d.ts +0 -13
  621. package/lib/typescript/helpers/secureKeyValue.d.ts.map +0 -1
  622. package/lib/typescript/helpers/secureStoreRuntime.d.ts +0 -29
  623. package/lib/typescript/helpers/secureStoreRuntime.d.ts.map +0 -1
  624. package/lib/typescript/helpers/secureUserStorage.d.ts +0 -23
  625. package/lib/typescript/helpers/secureUserStorage.d.ts.map +0 -1
  626. package/lib/typescript/helpers/shallowEqual.d.ts +0 -11
  627. package/lib/typescript/helpers/shallowEqual.d.ts.map +0 -1
  628. package/lib/typescript/helpers/sheetGestures.d.ts +0 -20
  629. package/lib/typescript/helpers/sheetGestures.d.ts.map +0 -1
  630. package/lib/typescript/hooks/useFileToken.d.ts +0 -2
  631. package/lib/typescript/hooks/useFileToken.d.ts.map +0 -1
  632. package/lib/typescript/networking/authRefresh.d.ts +0 -95
  633. package/lib/typescript/networking/authRefresh.d.ts.map +0 -1
  634. package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +0 -244
  635. package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +0 -615
  636. package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +0 -217
  637. package/src/helpers/getChatBackground.ts +0 -18
  638. package/src/helpers/getDisplayFileName.ts +0 -87
  639. package/src/helpers/getServerReadTimestamp.ts +0 -120
  640. package/src/helpers/isOwnMessage.ts +0 -90
  641. package/src/helpers/mediaLibraryRuntime.ts +0 -25
  642. package/src/helpers/persistCrypto.ts +0 -127
  643. package/src/helpers/pickImageAsset.ts +0 -68
  644. package/src/helpers/pushPayload.ts +0 -62
  645. package/src/helpers/secureFileUrl.ts +0 -103
  646. package/src/helpers/secureKeyValue.ts +0 -80
  647. package/src/helpers/secureStoreRuntime.ts +0 -62
  648. package/src/helpers/secureUserStorage.ts +0 -80
  649. package/src/helpers/shallowEqual.ts +0 -33
  650. package/src/helpers/sheetGestures.ts +0 -25
  651. package/src/hooks/useFileToken.ts +0 -7
  652. package/src/networking/authRefresh.ts +0 -451
@@ -1,8 +1,6 @@
1
1
  import AsyncStorage from '@react-native-async-storage/async-storage';
2
2
  import { Middleware } from '@reduxjs/toolkit';
3
3
  import { IMessage, IRoom, User } from '../types/types';
4
- import { encryptForPersist, decryptFromPersist } from '../helpers/persistCrypto';
5
- import type { FailedMessagePayload } from './roomHeapSlice';
6
4
 
7
5
  // -------------------------------------------------------------------
8
6
  // Lightweight RN persistence layer. Mirrors what redux-persist gives
@@ -13,33 +11,17 @@ import type { FailedMessagePayload } from './roomHeapSlice';
13
11
  // - cap each room's messages to the most recent MESSAGE_LIMIT (100)
14
12
  // - debounced writes (200ms) on relevant action types
15
13
  //
16
- // AES-256-CBC at rest (see `helpers/persistCrypto.ts`): the JSON blob
17
- // under each key below is encrypted before it reaches AsyncStorage, with
18
- // the symmetric key held in the platform Keychain/Keystore. `user` here
19
- // is already secret-free (see `sanitizeUser`) — the encryption is for
20
- // the message bodies in `rooms`, which aren't.
14
+ // Not encrypted. We rely on AsyncStorage's per-app sandbox.
21
15
  // -------------------------------------------------------------------
22
16
 
23
17
  const KEY_CHAT = '@ethora/persist:chatSettingStore';
24
18
  const KEY_ROOMS = '@ethora/persist:rooms';
25
- // bug #39: a failed send needs to survive a relaunch as "failed / tap
26
- // to retry", not silently render as delivered. `roomHeapStore.failedMessages`
27
- // is the map the bubble reads (`isFailed = failedMessages[id]`, see
28
- // Message.tsx / useMessageHeapState): it lives in a separate, previously
29
- // non-persisted slice from `rooms`, so it gets its own key here.
30
- const KEY_HEAP = '@ethora/persist:roomHeap';
31
19
 
32
20
  // Per-room message cap on disk. Mirror this value in `roomsSlice`'s
33
21
  // in-memory cap (see `enforceMessageCap`) so the runtime and persisted
34
22
  // shapes stay aligned.
35
23
  export const MESSAGE_LIMIT = 100;
36
24
 
37
- // Defensive cap on the number of failed-message payloads written to
38
- // disk. In practice this map only grows while the user is actively
39
- // sending offline, but a runaway sender (or a bug that never clears an
40
- // entry) must not turn this key into an unbounded write.
41
- export const MAX_PERSISTED_FAILED_MESSAGES = 200;
42
-
43
25
  interface PersistedChatState {
44
26
  user: User;
45
27
  }
@@ -49,14 +31,6 @@ interface PersistedRoomsState {
49
31
  // intentionally NOT persisted: activeRoomJID, editAction, isLoading
50
32
  }
51
33
 
52
- interface PersistedHeapState {
53
- failedMessages: Record<string, FailedMessagePayload>;
54
- // intentionally NOT persisted: messageHeap, a process-lifetime
55
- // "in flight" buffer (see roomHeapSlice.ts); anything still in it when
56
- // the app dies is handled by the boot-time pending->failed scan below,
57
- // not by replaying the heap itself.
58
- }
59
-
60
34
  const sanitizeUser = (user?: User): User | null => {
61
35
  if (!user) {return null;}
62
36
  // Drop secrets we don't want at rest — destructure to omit, then
@@ -101,14 +75,23 @@ const PERSISTED_MESSAGE_FIELDS: (keyof IMessage)[] = [
101
75
  'originalName',
102
76
  'size',
103
77
  'langSource',
78
+ // `translations` MUST be here. A previous version of this list dropped
79
+ // it, on the theory that it mirrored the web SDK's persist contract —
80
+ // it doesn't: web's redux-persist config (web/src/roomStore/index.ts)
81
+ // has no per-field message whitelist at all, it persists whatever is in
82
+ // `room.messages` (capped to the last 50) and that includes
83
+ // `translations` verbatim. Field-picking is an RN-only mechanism, so
84
+ // "same as web" was never true for this key.
85
+ //
86
+ // Dropping it meant every cold start painted the cached transcript in
87
+ // the ORIGINAL language and only flipped to the translation once MAM
88
+ // re-sent the history a few seconds later (onMessageHistory re-parses
89
+ // <translations> off the wire) — visible on every launch, for every
90
+ // translated message, since the cache never had a translation to show
91
+ // in the first place. Persisting it here is what lets the very first
92
+ // paint already be translated, the way the live path already is.
93
+ 'translations',
104
94
  'callLog',
105
- // bug #39: without this, a message that was still in flight (no
106
- // server echo yet) at kill time comes back from disk indistinguishable
107
- // from a normal delivered message, so the bubble renders it as sent.
108
- // Persisting `pending` lets the boot-time scan (see
109
- // computeBootTimeFailures below) find exactly the messages that never
110
- // got confirmed and flip them to failed instead.
111
- 'pending',
112
95
  ];
113
96
 
114
97
  // The sender identity that rides along on every message over the wire
@@ -208,154 +191,6 @@ const sanitizeRooms = (
208
191
  return out;
209
192
  };
210
193
 
211
- // Only the fields retryMessage actually needs to replay the send (see
212
- // FailedMessagePayload / useSendMessage.retryMessage). In particular, the
213
- // media `data` blob is trimmed to `uri/type/name/size` (the picker never
214
- // hands us auth material, but this stays defensive against a future
215
- // picker change smuggling extra fields, or a huge inline payload, into
216
- // `data`).
217
- const sanitizeMediaData = (
218
- data: any
219
- ): { uri?: string; type?: string; name?: string; size?: number } => {
220
- if (!data || typeof data !== 'object') {return {};}
221
- const out: { uri?: string; type?: string; name?: string; size?: number } = {};
222
- if (typeof data.uri === 'string') {out.uri = data.uri;}
223
- if (typeof data.type === 'string') {out.type = data.type;}
224
- if (typeof data.name === 'string') {out.name = data.name;}
225
- if (typeof data.size === 'number') {out.size = data.size;}
226
- return out;
227
- };
228
-
229
- const sanitizeFailedMessagePayload = (
230
- payload: FailedMessagePayload
231
- ): FailedMessagePayload | null => {
232
- if (!payload || typeof payload !== 'object') {return null;}
233
- if (!payload.id || typeof payload.id !== 'string') {return null;}
234
- if (!payload.roomJID || typeof payload.roomJID !== 'string') {return null;}
235
- if (payload.kind === 'media') {
236
- return {
237
- kind: 'media',
238
- id: payload.id,
239
- roomJID: payload.roomJID,
240
- data: sanitizeMediaData(payload.data),
241
- type: typeof payload.type === 'string' ? payload.type : '',
242
- isReply: payload.isReply,
243
- isChecked: payload.isChecked,
244
- mainMessage: payload.mainMessage,
245
- };
246
- }
247
- if (payload.kind === 'text') {
248
- return {
249
- kind: 'text',
250
- id: payload.id,
251
- roomJID: payload.roomJID,
252
- body: typeof payload.body === 'string' ? payload.body : '',
253
- isReply: payload.isReply,
254
- isChecked: payload.isChecked,
255
- mainMessage: payload.mainMessage,
256
- };
257
- }
258
- return null;
259
- };
260
-
261
- const sanitizeFailedMessages = (
262
- failedMessages: Record<string, FailedMessagePayload> | undefined
263
- ): Record<string, FailedMessagePayload> => {
264
- if (!failedMessages || typeof failedMessages !== 'object') {return {};}
265
- const out: Record<string, FailedMessagePayload> = {};
266
- let count = 0;
267
- for (const [id, payload] of Object.entries(failedMessages)) {
268
- if (count >= MAX_PERSISTED_FAILED_MESSAGES) {break;}
269
- const clean = sanitizeFailedMessagePayload(payload);
270
- if (clean) {
271
- out[id] = clean;
272
- count++;
273
- }
274
- }
275
- return out;
276
- };
277
-
278
- // -------------------------------------------------------------------
279
- // Boot-time pending -> failed conversion (bug #39).
280
- //
281
- // `messageHeap` (the "still sending" buffer) is intentionally NOT
282
- // persisted: it's a process-lifetime thing. That means on a cold start
283
- // there is no such thing as "still sending": a persisted message that
284
- // carries `pending: true` never got a server echo NOR got the chance to
285
- // trip the in-session watchdog (see PENDING_WATCHDOG_MS in
286
- // useSendMessage.tsx) before the process died. It must render as failed
287
- // with a working retry, not as delivered and not as stuck "sending...".
288
- //
289
- // Reconstructs the same FailedMessagePayload shape the live send path
290
- // builds in useSendMessage (markMessageFailed calls), from the fields we
291
- // persist per message.
292
- // -------------------------------------------------------------------
293
-
294
- export function reconstructFailedMessagePayload(
295
- message: IMessage,
296
- roomJID: string
297
- ): FailedMessagePayload | null {
298
- if (!message?.id || !roomJID) {return null;}
299
- const isReply = !!message.isReply;
300
- const isChecked = message.showInChannel === 'true';
301
- const mainMessage = message.mainMessage;
302
- if (message.isMediafile === 'true') {
303
- return {
304
- kind: 'media',
305
- id: message.id,
306
- roomJID,
307
- data: sanitizeMediaData({
308
- uri: message.location,
309
- name: message.fileName,
310
- type: message.mimetype,
311
- size:
312
- message.size !== undefined && message.size !== null
313
- ? Number(message.size)
314
- : undefined,
315
- }),
316
- type: message.mimetype || '',
317
- isReply,
318
- isChecked,
319
- mainMessage,
320
- };
321
- }
322
- return {
323
- kind: 'text',
324
- id: message.id,
325
- roomJID,
326
- body: message.body || '',
327
- isReply,
328
- isChecked,
329
- mainMessage,
330
- };
331
- }
332
-
333
- /**
334
- * Scan every persisted room for messages still `pending: true` that
335
- * DON'T already have a restored failure entry (those are handled by the
336
- * caller separately, from the persisted `failedMessages` map), and
337
- * synthesize a retry-able FailedMessagePayload for each. Pure function:
338
- * the caller (roomStore/index.ts) is responsible for dispatching
339
- * `markMessageFailed` for the results.
340
- */
341
- export function computeBootTimeFailures(
342
- rooms: Record<string, IRoom> | null | undefined,
343
- alreadyFailed: Record<string, FailedMessagePayload> | null | undefined
344
- ): FailedMessagePayload[] {
345
- if (!rooms || typeof rooms !== 'object') {return [];}
346
- const out: FailedMessagePayload[] = [];
347
- for (const [jid, room] of Object.entries(rooms)) {
348
- const messages = Array.isArray(room?.messages) ? room.messages : [];
349
- for (const message of messages) {
350
- if (!message || !message.pending) {continue;}
351
- if (alreadyFailed && alreadyFailed[message.id]) {continue;}
352
- const payload = reconstructFailedMessagePayload(message, jid);
353
- if (payload) {out.push(payload);}
354
- }
355
- }
356
- return out;
357
- }
358
-
359
194
  let writeTimer: ReturnType<typeof setTimeout> | null = null;
360
195
 
361
196
  /**
@@ -370,7 +205,6 @@ export const persistenceMiddleware: Middleware = (storeAPI) => (next) => (
370
205
  const type: string = action?.type || '';
371
206
  if (
372
207
  !type.startsWith('roomMessages/') &&
373
- !type.startsWith('roomHeapStore/') &&
374
208
  !type.startsWith('chat/setUser') &&
375
209
  !type.startsWith('chat/updateUser') &&
376
210
  !type.startsWith('chat/refreshTokens') &&
@@ -381,34 +215,21 @@ export const persistenceMiddleware: Middleware = (storeAPI) => (next) => (
381
215
 
382
216
  if (writeTimer) {clearTimeout(writeTimer);}
383
217
  writeTimer = setTimeout(() => {
384
- (async () => {
385
- try {
386
- const state = storeAPI.getState();
387
- const chatPayload: PersistedChatState = {
388
- user: sanitizeUser(state.chatSettingStore?.user) as User,
389
- };
390
- const roomsPayload: PersistedRoomsState = {
391
- rooms: sanitizeRooms(state.rooms?.rooms || {}),
392
- };
393
- const heapPayload: PersistedHeapState = {
394
- failedMessages: sanitizeFailedMessages(
395
- state.roomHeapSlice?.failedMessages
396
- ),
397
- };
398
- const [chatCipher, roomsCipher, heapCipher] = await Promise.all([
399
- encryptForPersist(JSON.stringify(chatPayload)),
400
- encryptForPersist(JSON.stringify(roomsPayload)),
401
- encryptForPersist(JSON.stringify(heapPayload)),
402
- ]);
403
- await AsyncStorage.multiSet([
404
- [KEY_CHAT, chatCipher],
405
- [KEY_ROOMS, roomsCipher],
406
- [KEY_HEAP, heapCipher],
407
- ]);
408
- } catch (e) {
409
- console.warn('persist write failed', e);
410
- }
411
- })();
218
+ try {
219
+ const state = storeAPI.getState();
220
+ const chatPayload: PersistedChatState = {
221
+ user: sanitizeUser(state.chatSettingStore?.user) as User,
222
+ };
223
+ const roomsPayload: PersistedRoomsState = {
224
+ rooms: sanitizeRooms(state.rooms?.rooms || {}),
225
+ };
226
+ AsyncStorage.multiSet([
227
+ [KEY_CHAT, JSON.stringify(chatPayload)],
228
+ [KEY_ROOMS, JSON.stringify(roomsPayload)],
229
+ ]).catch((e) => console.warn('persist write failed', e));
230
+ } catch (e) {
231
+ console.warn('persist serialize failed', e);
232
+ }
412
233
  }, 200);
413
234
 
414
235
  return result;
@@ -422,44 +243,29 @@ export const persistenceMiddleware: Middleware = (storeAPI) => (next) => (
422
243
  export async function readPersistedState(): Promise<{
423
244
  chat: PersistedChatState | null;
424
245
  rooms: PersistedRoomsState | null;
425
- heap: PersistedHeapState | null;
426
246
  }> {
427
247
  try {
428
- const [chatRaw, roomsRaw, heapRaw] = await AsyncStorage.multiGet([
248
+ const [chatRaw, roomsRaw] = await AsyncStorage.multiGet([
429
249
  KEY_CHAT,
430
250
  KEY_ROOMS,
431
- KEY_HEAP,
432
251
  ]);
433
- const [chatPlain, roomsPlain, heapPlain] = await Promise.all([
434
- chatRaw[1] ? decryptFromPersist(chatRaw[1]) : Promise.resolve(null),
435
- roomsRaw[1] ? decryptFromPersist(roomsRaw[1]) : Promise.resolve(null),
436
- heapRaw[1] ? decryptFromPersist(heapRaw[1]) : Promise.resolve(null),
437
- ]);
438
- // `decryptFromPersist` returns null both for "nothing stored" and
439
- // for "stored value isn't a valid envelope for the current key" —
440
- // notably a plaintext blob left over from a pre-encryption install.
441
- // Either way there is nothing safe to parse, so the caller treats it
442
- // as a cold start and re-hydrates from the server.
443
- const chat = chatPlain ? (JSON.parse(chatPlain) as PersistedChatState) : null;
444
- const rooms = roomsPlain
445
- ? (JSON.parse(roomsPlain) as PersistedRoomsState)
446
- : null;
447
- const heap = heapPlain
448
- ? (JSON.parse(heapPlain) as PersistedHeapState)
252
+ const chat = chatRaw[1] ? (JSON.parse(chatRaw[1]) as PersistedChatState) : null;
253
+ const rooms = roomsRaw[1]
254
+ ? (JSON.parse(roomsRaw[1]) as PersistedRoomsState)
449
255
  : null;
450
- return { chat, rooms, heap };
256
+ return { chat, rooms };
451
257
  } catch (e) {
452
258
  console.warn('persist read failed', e);
453
- return { chat: null, rooms: null, heap: null };
259
+ return { chat: null, rooms: null };
454
260
  }
455
261
  }
456
262
 
457
263
  export async function clearPersistedState(): Promise<void> {
458
264
  try {
459
- await AsyncStorage.multiRemove([KEY_CHAT, KEY_ROOMS, KEY_HEAP]);
265
+ await AsyncStorage.multiRemove([KEY_CHAT, KEY_ROOMS]);
460
266
  } catch (e) {
461
267
  console.warn('persist clear failed', e);
462
268
  }
463
269
  }
464
270
 
465
- export const PERSIST_KEYS = { KEY_CHAT, KEY_ROOMS, KEY_HEAP };
271
+ export const PERSIST_KEYS = { KEY_CHAT, KEY_ROOMS };
@@ -13,7 +13,7 @@ import type XmppClient from '../networking/xmppClient';
13
13
  // older history added via unshift/splice is exempt, so the user can
14
14
  // page backward arbitrarily far without instantly losing what they
15
15
  // just fetched. After cap eviction we drop from the head (oldest).
16
- export const RUNTIME_MESSAGE_LIMIT = 100;
16
+ const RUNTIME_MESSAGE_LIMIT = 100;
17
17
 
18
18
  // Body strings the server uses for call signaling broadcasts (call-token,
19
19
  // call-state ringing/ended, etc). These should never reach the chat
@@ -142,6 +142,7 @@ function mergeHistoryIntoCache(
142
142
  const ex = stripCallSignals(existing);
143
143
  const fe = stripCallSignals(fetched);
144
144
 
145
+ const pending = ex.filter((m) => m?.pending);
145
146
  const realExisting = ex.filter(
146
147
  (m) => m && !m.pending && m.id !== 'delimiter-new'
147
148
  );
@@ -150,29 +151,6 @@ function mergeHistoryIntoCache(
150
151
  // Nothing usable came back → keep the cache exactly as it was.
151
152
  if (realFetched.length === 0) {return ex;}
152
153
 
153
- // Optimistic sends are preserved across a history merge - EXCEPT the
154
- // ones the fetched page proves the server already has. That happens
155
- // whenever a send reached the server but its echo did not reach us
156
- // before the process died: the optimistic bubble is restored from disk
157
- // still `pending: true` (and, since bug #39, flagged failed at boot),
158
- // while MAM hands back the very same message under its ARCHIVE id.
159
- // Keying only on `id` never matched those two, so the room ended up
160
- // showing the message twice - once for real and once as a bubble stuck
161
- // on "sending…"/"Failed" that nothing could ever clear. The archived
162
- // copy carries our original stanza id as `xmppId` (getDataFromXml), so
163
- // match on that too and drop the local ghost.
164
- const fetchedKeys = new Set<string>();
165
- for (const m of realFetched) {
166
- if (m?.id != null) {fetchedKeys.add(String(m.id));}
167
- if ((m as any)?.xmppId) {fetchedKeys.add(String((m as any).xmppId));}
168
- }
169
- const pending = ex.filter(
170
- (m) =>
171
- m?.pending &&
172
- !fetchedKeys.has(String(m.id)) &&
173
- !(m.xmppId && fetchedKeys.has(String(m.xmppId)))
174
- );
175
-
176
154
  const byMs = (a: IMessage, b: IMessage) =>
177
155
  msgSortableMs(a) - msgSortableMs(b);
178
156
  const capTail = (arr: IMessage[]) =>
@@ -339,8 +317,6 @@ const reducers = {
339
317
  : [];
340
318
  state.rooms[roomData.jid] = {
341
319
  ...roomData,
342
- icon: roomData.icon !== undefined ? roomData.icon : existing?.icon,
343
- roomBg: roomData.roomBg !== undefined ? roomData.roomBg : existing?.roomBg,
344
320
  messages:
345
321
  existingMessages.length > 0 ? existingMessages : incomingMessages,
346
322
  lastViewedTimestamp: lastViewed,
@@ -602,19 +578,7 @@ const reducers = {
602
578
  *
603
579
  * Monotonic: a marker only ever moves a baseline FORWARD, so a stale
604
580
  * server value can't resurrect already-read messages and a more-recent
605
- * local read (tab blur stamping the server read timestamp) always wins.
606
- *
607
- * Bug #38 self-heal: forward-only is correct for a SANE existing
608
- * value, but a device whose clock was ahead may have already stamped
609
- * a marker in the future (either persisted locally from a previous
610
- * session, or fetched from the server before this fix existed). To
611
- * "only ever move forward" from a corrupt future value is to never
612
- * move at all - the room would stay stuck at `unreadMessages: 0`
613
- * forever. When the room is loaded, detect a marker that sits well
614
- * past the newest message we actually know it has and waive the
615
- * forward-only check for that one comparison, so the incoming
616
- * (already-clamped, see xmppClient.getChatsPrivateStoreRequestStanza)
617
- * value can correct it even though it's numerically smaller.
581
+ * local read (tab blur stamping Date.now()) always wins.
618
582
  */
619
583
  applyPrivateStoreMarkers: (
620
584
  state: WritableDraft<RoomMessagesState>,
@@ -626,34 +590,15 @@ const reducers = {
626
590
  for (const jid of Object.keys(markers)) {
627
591
  const ts = Number(markers[jid]);
628
592
  if (!jid || !Number.isFinite(ts) || ts <= 0) {continue;}
629
-
630
- const room = state.rooms[jid];
631
- const newestKnownMs = room ? newestAckedMessageMs(room.messages) : 0;
632
- // Mirrors isCorruptFutureReadMarker in helpers/getServerReadTimestamp.ts
633
- // (duplicated to avoid a roomStore <-> helpers import cycle):
634
- // BOTH signals are required. "Further ahead than the newest
635
- // message this room has locally" happens all the time on a room
636
- // whose history hasn't synced yet, and healing on that alone
637
- // would drop a legitimate marker another device wrote after
638
- // reading newer messages. A real read marker can never be ahead
639
- // of real time, so that second signal is what distinguishes a
640
- // stale cache from a wrong clock.
641
- const nowMs = Date.now();
642
- const looksCorrupt = (existing: number) =>
643
- newestKnownMs > 0 &&
644
- existing > newestKnownMs + FUTURE_MARKER_TOLERANCE_MS &&
645
- existing > nowMs + FUTURE_MARKER_TOLERANCE_MS;
646
-
647
593
  // Remember the marker so rooms that load LATER (via addRoom)
648
594
  // inherit it even though they don't exist in the store yet.
649
- const cachedMarker = state.privateStoreMarkers[jid] || 0;
650
- if (ts > cachedMarker || looksCorrupt(cachedMarker)) {
595
+ if (ts > (state.privateStoreMarkers[jid] || 0)) {
651
596
  state.privateStoreMarkers[jid] = ts;
652
597
  }
653
598
  // Upgrade an already-loaded room's baseline + recompute its badge.
654
- // Forward-only, unless the room's CURRENT baseline is itself the
655
- // corrupt value being corrected.
656
- if (room && (ts > (room.lastViewedTimestamp || 0) || looksCorrupt(room.lastViewedTimestamp || 0))) {
599
+ // Only ever forward, so a later local read isn't clobbered.
600
+ const room = state.rooms[jid];
601
+ if (room && ts > (room.lastViewedTimestamp || 0)) {
657
602
  room.lastViewedTimestamp = ts;
658
603
  room.unreadMessages = countNewerMessages(room.messages, ts);
659
604
  }
@@ -925,31 +870,6 @@ const isOwn = (
925
870
  return false;
926
871
  };
927
872
 
928
- // Bug #38 tolerance: a stored read marker more than this far past the
929
- // newest message a room actually has is not "the user is a little
930
- // ahead" - it's a leftover from a device whose clock was wrong when it
931
- // stamped the marker. Kept in sync with (but duplicated from, to avoid
932
- // a roomStore ↔ helpers import cycle) FUTURE_READ_MARKER_TOLERANCE_MS
933
- // in helpers/getServerReadTimestamp.ts.
934
- const FUTURE_MARKER_TOLERANCE_MS = 5 * 60 * 1000;
935
-
936
- // Newest message in `messages` this room actually has proof the server
937
- // accepted - used only to sanity-check an already-stored read marker
938
- // against reality (see applyPrivateStoreMarkers's self-heal). Excludes
939
- // pending/optimistic sends via the `pending` flag alone: unlike
940
- // getServerReadTimestamp, this runs inside a reducer and can't reach
941
- // across to the roomHeapSlice slice, but `pending` already identifies
942
- // every optimistic send that matters for this comparison.
943
- const newestAckedMessageMs = (messages: IMessage[] | undefined): number => {
944
- let newest = 0;
945
- for (const m of messages || []) {
946
- if (!m || m.id === 'delimiter-new' || m.pending) {continue;}
947
- const ms = msgSortableMs(m);
948
- if (ms > newest) {newest = ms;}
949
- }
950
- return newest;
951
- };
952
-
953
873
  const countNewerMessages = (
954
874
  messages: IMessage[],
955
875
  timestamp: number,
@@ -81,9 +81,7 @@ export class PushSubscriptionService {
81
81
  this.subscribedRooms.add(roomJID);
82
82
  await this.saveSubscribedRoomsToStorage();
83
83
  }
84
- if (!result) {
85
- console.warn('[PushService] MucSub subscribe refused for', roomJID);
86
- }
84
+ console.log('Successfully Subscribed to room', roomJID);
87
85
  return result;
88
86
  } catch (error) {
89
87
  console.error(`[PushService] Failed to subscribe to room ${roomJID}:`, error);
@@ -94,33 +92,30 @@ export class PushSubscriptionService {
94
92
  async subscribeToRooms(
95
93
  client: Client,
96
94
  roomJIDs: string[],
97
- userNick?: string,
98
- concurrency = 8
95
+ userNick?: string
99
96
  ): Promise<void> {
100
97
  let successful = 0;
101
98
  let failed = 0;
102
99
 
103
- await this.loadSubscribedRoomsFromStorage();
104
- const pending = roomJIDs.filter((jid) => !this.subscribedRooms.has(jid));
105
- if (!pending.length) {
106
- return;
107
- }
100
+ console.log('test roomJIDs', roomJIDs);
108
101
 
109
- for (let i = 0; i < pending.length; i += concurrency) {
110
- const batch = pending.slice(i, i + concurrency);
111
- const results = await Promise.allSettled(
112
- batch.map((roomJID) => this.subscribeToRoom(client, roomJID, userNick))
113
- );
114
- for (const r of results) {
115
- if (r.status === 'fulfilled' && r.value) {
102
+ for (const roomJID of roomJIDs) {
103
+ try {
104
+ const result = await this.subscribeToRoom(client, roomJID, userNick);
105
+ console.log('test roomJID-1', result);
106
+ if (result) {
116
107
  successful++;
117
108
  } else {
118
109
  failed++;
119
110
  }
111
+ await new Promise(resolve => setTimeout(resolve, 100));
112
+ } catch (error) {
113
+ failed++;
114
+ console.error(`Failed to subscribe to room ${roomJID}:`, error);
120
115
  }
121
116
  }
122
117
 
123
- console.log(`[PushService] MucSub: ${successful} rooms subscribed, ${failed} failed`);
118
+ console.log(`Subscribed to ${successful} rooms, ${failed} failed`);
124
119
  }
125
120
 
126
121
  async reset(): Promise<void> {
@@ -105,7 +105,6 @@ export interface User {
105
105
  ];
106
106
  appId: string;
107
107
  xmppPassword: string;
108
- fileToken?: string;
109
108
 
110
109
  homeScreen?: string;
111
110
  registrationChannelType?: string;
@@ -151,7 +150,6 @@ export interface xmppSettingsInterface {
151
150
  disableLastRead?: boolean;
152
151
  xmppPingOnSendEnabled?: boolean;
153
152
  historyQoS?: HistoryQoSConfig;
154
- keepAliveInBackground?: boolean;
155
153
  }
156
154
 
157
155
  export interface InAppNotificationConfig {
@@ -311,16 +309,13 @@ export interface TypographyConfig {
311
309
  };
312
310
  /** Attach (photo/document picker) bottom sheet. */
313
311
  attachSheet?: {
314
- /** "Photos & Videos" section header. Default 17 / "700". */
312
+ /** "Attach" header label. Default 13 / "600". */
315
313
  title?: ChatTextStyle;
316
- /** "View Library" link next to the section header. Default 15 / "500". */
317
- viewLibrary?: ChatTextStyle;
318
- /** Row labels ("Upload a File"). Default 16 / "500". */
314
+ /** Row labels (Camera / Gallery / Document). Default 16 / "500". */
319
315
  rowLabel?: ChatTextStyle;
320
- /** @deprecated Rows no longer render a hint line. */
316
+ /** Grey hint under each row. Default 12. */
321
317
  rowHint?: ChatTextStyle;
322
- /** @deprecated The sheet has no Cancel button — it closes by tapping
323
- * the backdrop, dragging it down, or the hardware back gesture. */
318
+ /** Cancel button. Default 16 / "600". */
324
319
  cancelButton?: ChatTextStyle;
325
320
  };
326
321
 
@@ -398,16 +393,6 @@ export interface IConfig {
398
393
  * value takes effect.
399
394
  */
400
395
  height?: number;
401
- /**
402
- * Extend the header cards (room list + chat) under the status bar:
403
- * each pads its top by the safe-area inset and paints it white, so
404
- * the card and the status-bar band are one surface. Use this instead
405
- * of wrapping `<Chat>` in a top-edge SafeAreaView: a host-side white
406
- * band above the card shows a hairline seam where the card's
407
- * shadow/elevation starts. Off by default (hosts that already pad the
408
- * top keep their layout).
409
- */
410
- safeAreaTop?: boolean;
411
396
  };
412
397
  disableHeader?: boolean;
413
398
  disableMedia?: boolean;
@@ -436,7 +421,7 @@ export interface IConfig {
436
421
  hideMemberSendMessageAction?: boolean; // hides only "Message"
437
422
  hideMemberCopyIdAction?: boolean; // hides only "Copy User Id"
438
423
  chatHeaderAdditional?: { enabled: boolean; element: any };
439
- headerMenu?: (() => void) | boolean;
424
+ headerMenu?: () => void;
440
425
  headerChatMenu?: () => void;
441
426
  chatHeaderSettings?: {
442
427
  hide?: boolean;
@@ -468,41 +453,11 @@ export interface IConfig {
468
453
  loginFunction: () => Promise<User | null>;
469
454
  };
470
455
  defaultLogin?: boolean;
471
- logout?: {
472
- enabled: boolean;
473
- label?: string;
474
- confirm?:
475
- | boolean
476
- | {
477
- title?: string;
478
- message?: string;
479
- confirmText?: string;
480
- cancelText?: string;
481
- };
482
- onBeforeLogout?: () => Promise<boolean | void> | boolean | void;
483
- onAfterLogout?: () => Promise<void> | void;
484
- };
485
456
  refreshTokens?: {
486
457
  enabled: boolean;
487
- /**
488
- * Host-owned rotation. When set, the SDK calls this INSTEAD of
489
- * `/users/login/refresh` — always, including during bootstrap — and
490
- * never rotates the Ethora refresh token itself. Serialised through
491
- * the same lock as the built-in path.
492
- *
493
- * Return `refreshToken` whenever the host's flow actually rotates an
494
- * Ethora refresh token: the backend now treats a re-presented one as
495
- * theft, so omitting it leaves a burned token in storage that ends
496
- * the session the next time it is used. It stays optional because
497
- * some hosts re-mint an access token from a different authority
498
- * (SuperTokens, an owner-session endpoint) and hold no Ethora
499
- * refresh token at all.
500
- */
501
458
  refreshFunction?: () => Promise<{
502
459
  accessToken: string;
503
460
  refreshToken?: string;
504
- fileToken?: string;
505
- xmppPassword?: string;
506
461
  } | null>;
507
462
  };
508
463
 
@@ -585,14 +540,6 @@ export interface IConfig {
585
540
  // `disableKeyboardAvoidingView` is set. Needs on-device tuning of any
586
541
  // `keyboardVerticalOffset`.
587
542
  keyboardStickyInput?: boolean;
588
- // The message list's FlatList uses keyboardDismissMode="interactive" by
589
- // default, so a drag can be used to pull the keyboard closed. Because
590
- // the list is `inverted`, an ordinary scroll gesture through history can
591
- // also be read as a dismiss drag, closing the keyboard mid-scroll. Set
592
- // this to keep the keyboard open regardless of how the list is scrolled
593
- // — dismissal then only happens when the user deliberately closes it
594
- // (tapping outside, back button, etc). Customer-reported #36.
595
- keepKeyboardOpenOnScroll?: boolean;
596
543
 
597
544
  // ----- interactions / messages -----
598
545
  disableInteractions?: boolean;