@ethora/chat-component-rn 26.7.5 → 26.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +31 -8
  3. package/lib/commonjs/assets/icons.js +7 -2
  4. package/lib/commonjs/assets/icons.js.map +1 -1
  5. package/lib/commonjs/components/Header/HeaderRoomList.js +26 -7
  6. package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
  7. package/lib/commonjs/components/MainComponents/ChatHeader.js +5 -2
  8. package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
  9. package/lib/commonjs/components/MainComponents/ChatRoom.js +36 -14
  10. package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
  11. package/lib/commonjs/components/MainComponents/MessageList.js +7 -23
  12. package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
  13. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js +14 -13
  14. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  15. package/lib/commonjs/components/MainComponents/RoomList.js +208 -35
  16. package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
  17. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +317 -98
  18. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
  19. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +320 -110
  20. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  21. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +552 -213
  22. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  23. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +226 -0
  24. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
  25. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +6 -2
  26. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  27. package/lib/commonjs/components/Modals/Modal/Modal.js +8 -0
  28. package/lib/commonjs/components/Modals/Modal/Modal.js.map +1 -1
  29. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js +2 -1
  30. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  31. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js +202 -104
  32. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  33. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
  34. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  35. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js +556 -0
  36. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
  37. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +210 -0
  38. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
  39. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
  40. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  41. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js +7 -21
  42. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  43. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +507 -244
  44. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  45. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +74 -46
  46. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  47. package/lib/commonjs/components/Modals/styledModalComponents.js +9 -2
  48. package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
  49. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +17 -7
  50. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
  51. package/lib/commonjs/components/styled/SendInput.js +80 -11
  52. package/lib/commonjs/components/styled/SendInput.js.map +1 -1
  53. package/lib/commonjs/components/styled/StyledComponents.js +9 -3
  54. package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
  55. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
  56. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  57. package/lib/commonjs/context/xmppProvider.js +23 -38
  58. package/lib/commonjs/context/xmppProvider.js.map +1 -1
  59. package/lib/commonjs/helpers/getChatBackground.js +23 -0
  60. package/lib/commonjs/helpers/getChatBackground.js.map +1 -0
  61. package/lib/commonjs/helpers/mediaLibraryRuntime.js +31 -0
  62. package/lib/commonjs/helpers/mediaLibraryRuntime.js.map +1 -0
  63. package/lib/commonjs/helpers/pickImageAsset.js +68 -0
  64. package/lib/commonjs/helpers/pickImageAsset.js.map +1 -0
  65. package/lib/commonjs/helpers/sheetGestures.js +32 -0
  66. package/lib/commonjs/helpers/sheetGestures.js.map +1 -0
  67. package/lib/commonjs/helpers/updateMessagesTillLast.js +12 -40
  68. package/lib/commonjs/helpers/updateMessagesTillLast.js.map +1 -1
  69. package/lib/commonjs/hooks/useChatRoomFocus.js +3 -9
  70. package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
  71. package/lib/commonjs/hooks/useLogout.js +0 -5
  72. package/lib/commonjs/hooks/useLogout.js.map +1 -1
  73. package/lib/commonjs/hooks/useSendMessage.js +23 -50
  74. package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
  75. package/lib/commonjs/i18n/strings.js +121 -1
  76. package/lib/commonjs/i18n/strings.js.map +1 -1
  77. package/lib/commonjs/main.js +6 -0
  78. package/lib/commonjs/main.js.map +1 -1
  79. package/lib/commonjs/networking/api-requests/user.api.js +59 -0
  80. package/lib/commonjs/networking/api-requests/user.api.js.map +1 -1
  81. package/lib/commonjs/networking/authRefresh.js +12 -2
  82. package/lib/commonjs/networking/authRefresh.js.map +1 -1
  83. package/lib/commonjs/networking/outboundQueue.js +0 -18
  84. package/lib/commonjs/networking/outboundQueue.js.map +1 -1
  85. package/lib/commonjs/networking/stanzaHandlers.js +1 -10
  86. package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
  87. package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js +8 -1
  88. package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
  89. package/lib/commonjs/networking/xmppClient.js +7 -107
  90. package/lib/commonjs/networking/xmppClient.js.map +1 -1
  91. package/lib/commonjs/roomStore/chatSettingsSlice.js +3 -1
  92. package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
  93. package/lib/commonjs/roomStore/roomsSlice.js +3 -22
  94. package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
  95. package/lib/module/assets/icons.js +6 -1
  96. package/lib/module/assets/icons.js.map +1 -1
  97. package/lib/module/components/Header/HeaderRoomList.js +26 -7
  98. package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
  99. package/lib/module/components/MainComponents/ChatHeader.js +5 -2
  100. package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
  101. package/lib/module/components/MainComponents/ChatRoom.js +36 -14
  102. package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
  103. package/lib/module/components/MainComponents/MessageList.js +8 -24
  104. package/lib/module/components/MainComponents/MessageList.js.map +1 -1
  105. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js +14 -13
  106. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  107. package/lib/module/components/MainComponents/RoomList.js +207 -35
  108. package/lib/module/components/MainComponents/RoomList.js.map +1 -1
  109. package/lib/module/components/Menu/HeaderRoomListMenu.js +319 -101
  110. package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
  111. package/lib/module/components/Modals/AttachSheet/AttachSheet.js +311 -113
  112. package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  113. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +555 -217
  114. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  115. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +223 -0
  116. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
  117. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +6 -2
  118. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  119. package/lib/module/components/Modals/Modal/Modal.js +9 -1
  120. package/lib/module/components/Modals/Modal/Modal.js.map +1 -1
  121. package/lib/module/components/Modals/NewChatModal/ModalContent.js +2 -1
  122. package/lib/module/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  123. package/lib/module/components/Modals/NewChatModal/NewChatModal.js +205 -106
  124. package/lib/module/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  125. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
  126. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  127. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js +548 -0
  128. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
  129. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +205 -0
  130. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
  131. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
  132. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  133. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js +9 -23
  134. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  135. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +509 -248
  136. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  137. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +76 -48
  138. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  139. package/lib/module/components/Modals/styledModalComponents.js +9 -2
  140. package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
  141. package/lib/module/components/RoomComponents/ChatRoomItem.js +17 -7
  142. package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
  143. package/lib/module/components/styled/SendInput.js +81 -12
  144. package/lib/module/components/styled/SendInput.js.map +1 -1
  145. package/lib/module/components/styled/StyledComponents.js +9 -3
  146. package/lib/module/components/styled/StyledComponents.js.map +1 -1
  147. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
  148. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  149. package/lib/module/context/xmppProvider.js +23 -38
  150. package/lib/module/context/xmppProvider.js.map +1 -1
  151. package/lib/module/helpers/getChatBackground.js +18 -0
  152. package/lib/module/helpers/getChatBackground.js.map +1 -0
  153. package/lib/module/helpers/mediaLibraryRuntime.js +25 -0
  154. package/lib/module/helpers/mediaLibraryRuntime.js.map +1 -0
  155. package/lib/module/helpers/pickImageAsset.js +63 -0
  156. package/lib/module/helpers/pickImageAsset.js.map +1 -0
  157. package/lib/module/helpers/sheetGestures.js +26 -0
  158. package/lib/module/helpers/sheetGestures.js.map +1 -0
  159. package/lib/module/helpers/updateMessagesTillLast.js +13 -41
  160. package/lib/module/helpers/updateMessagesTillLast.js.map +1 -1
  161. package/lib/module/hooks/useChatRoomFocus.js +3 -9
  162. package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
  163. package/lib/module/hooks/useLogout.js +0 -5
  164. package/lib/module/hooks/useLogout.js.map +1 -1
  165. package/lib/module/hooks/useSendMessage.js +24 -51
  166. package/lib/module/hooks/useSendMessage.js.map +1 -1
  167. package/lib/module/i18n/strings.js +121 -1
  168. package/lib/module/i18n/strings.js.map +1 -1
  169. package/lib/module/main.js +1 -1
  170. package/lib/module/main.js.map +1 -1
  171. package/lib/module/networking/api-requests/user.api.js +56 -0
  172. package/lib/module/networking/api-requests/user.api.js.map +1 -1
  173. package/lib/module/networking/authRefresh.js +12 -2
  174. package/lib/module/networking/authRefresh.js.map +1 -1
  175. package/lib/module/networking/outboundQueue.js +0 -17
  176. package/lib/module/networking/outboundQueue.js.map +1 -1
  177. package/lib/module/networking/stanzaHandlers.js +1 -10
  178. package/lib/module/networking/stanzaHandlers.js.map +1 -1
  179. package/lib/module/networking/xmpp/presenceInRoom.xmpp.js +8 -1
  180. package/lib/module/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
  181. package/lib/module/networking/xmppClient.js +7 -107
  182. package/lib/module/networking/xmppClient.js.map +1 -1
  183. package/lib/module/roomStore/chatSettingsSlice.js +3 -1
  184. package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
  185. package/lib/module/roomStore/roomsSlice.js +2 -20
  186. package/lib/module/roomStore/roomsSlice.js.map +1 -1
  187. package/lib/typescript/assets/icons.d.ts +16 -0
  188. package/lib/typescript/assets/icons.d.ts.map +1 -1
  189. package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
  190. package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
  191. package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
  192. package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
  193. package/lib/typescript/components/MainComponents/ProfileImagePlaceholder.d.ts.map +1 -1
  194. package/lib/typescript/components/MainComponents/RoomList.d.ts +7 -0
  195. package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
  196. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts +3 -0
  197. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
  198. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts +9 -0
  199. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts.map +1 -1
  200. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts +10 -0
  201. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
  202. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts +9 -0
  203. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +1 -0
  204. package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
  205. package/lib/typescript/components/Modals/Modal/Modal.d.ts.map +1 -1
  206. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts +4 -2
  207. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts.map +1 -1
  208. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts +1 -1
  209. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts.map +1 -1
  210. package/lib/typescript/components/Modals/NewChatModal/UpdNewChatModal.d.ts.map +1 -1
  211. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts +75 -0
  212. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts.map +1 -0
  213. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts +25 -0
  214. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts.map +1 -0
  215. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts +6 -1
  216. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts.map +1 -1
  217. package/lib/typescript/components/Modals/UserProfileModal/EditUserModal.d.ts.map +1 -1
  218. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts +16 -0
  219. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
  220. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts +1 -0
  221. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts.map +1 -1
  222. package/lib/typescript/components/Modals/styledModalComponents.d.ts.map +1 -1
  223. package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
  224. package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
  225. package/lib/typescript/components/styled/StyledComponents.d.ts.map +1 -1
  226. package/lib/typescript/components/styled/StyledInputComponents/StyledInputComponents.d.ts.map +1 -1
  227. package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
  228. package/lib/typescript/helpers/getChatBackground.d.ts +15 -0
  229. package/lib/typescript/helpers/getChatBackground.d.ts.map +1 -0
  230. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts +3 -0
  231. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts.map +1 -0
  232. package/lib/typescript/helpers/pickImageAsset.d.ts +27 -0
  233. package/lib/typescript/helpers/pickImageAsset.d.ts.map +1 -0
  234. package/lib/typescript/helpers/sheetGestures.d.ts +20 -0
  235. package/lib/typescript/helpers/sheetGestures.d.ts.map +1 -0
  236. package/lib/typescript/helpers/updateMessagesTillLast.d.ts.map +1 -1
  237. package/lib/typescript/hooks/useChatRoomFocus.d.ts.map +1 -1
  238. package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
  239. package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
  240. package/lib/typescript/i18n/strings.d.ts.map +1 -1
  241. package/lib/typescript/main.d.ts +1 -1
  242. package/lib/typescript/main.d.ts.map +1 -1
  243. package/lib/typescript/networking/api-requests/user.api.d.ts +27 -0
  244. package/lib/typescript/networking/api-requests/user.api.d.ts.map +1 -1
  245. package/lib/typescript/networking/authRefresh.d.ts +4 -1
  246. package/lib/typescript/networking/authRefresh.d.ts.map +1 -1
  247. package/lib/typescript/networking/outboundQueue.d.ts +0 -16
  248. package/lib/typescript/networking/outboundQueue.d.ts.map +1 -1
  249. package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
  250. package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts.map +1 -1
  251. package/lib/typescript/networking/xmppClient.d.ts +1 -33
  252. package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
  253. package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
  254. package/lib/typescript/roomStore/roomsSlice.d.ts +1 -18
  255. package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
  256. package/lib/typescript/types/models/room.model.d.ts +0 -15
  257. package/lib/typescript/types/models/room.model.d.ts.map +1 -1
  258. package/lib/typescript/types/types.d.ts +30 -20
  259. package/lib/typescript/types/types.d.ts.map +1 -1
  260. package/package.json +6 -1
  261. package/src/assets/icons.tsx +48 -9
  262. package/src/components/Header/HeaderRoomList.tsx +24 -6
  263. package/src/components/MainComponents/ChatHeader.tsx +5 -2
  264. package/src/components/MainComponents/ChatRoom.tsx +38 -20
  265. package/src/components/MainComponents/MessageList.tsx +8 -24
  266. package/src/components/MainComponents/ProfileImagePlaceholder.tsx +21 -14
  267. package/src/components/MainComponents/RoomList.tsx +236 -39
  268. package/src/components/Menu/HeaderRoomListMenu.tsx +328 -75
  269. package/src/components/Modals/AttachSheet/AttachSheet.tsx +331 -97
  270. package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +598 -279
  271. package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +244 -0
  272. package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +4 -2
  273. package/src/components/Modals/Modal/Modal.tsx +7 -0
  274. package/src/components/Modals/NewChatModal/ModalContent.tsx +6 -3
  275. package/src/components/Modals/NewChatModal/NewChatModal.tsx +219 -117
  276. package/src/components/Modals/NewChatModal/UpdNewChatModal.tsx +12 -1
  277. package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +615 -0
  278. package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +217 -0
  279. package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +14 -4
  280. package/src/components/Modals/UserProfileModal/EditUserModal.tsx +9 -25
  281. package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +617 -307
  282. package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +75 -58
  283. package/src/components/Modals/styledModalComponents.tsx +9 -2
  284. package/src/components/RoomComponents/ChatRoomItem.tsx +14 -7
  285. package/src/components/styled/SendInput.tsx +83 -12
  286. package/src/components/styled/StyledComponents.ts +9 -3
  287. package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +11 -4
  288. package/src/context/xmppProvider.tsx +27 -46
  289. package/src/helpers/getChatBackground.ts +18 -0
  290. package/src/helpers/mediaLibraryRuntime.ts +25 -0
  291. package/src/helpers/pickImageAsset.ts +68 -0
  292. package/src/helpers/sheetGestures.ts +25 -0
  293. package/src/helpers/updateMessagesTillLast.tsx +17 -42
  294. package/src/hooks/useChatRoomFocus.ts +3 -11
  295. package/src/hooks/useLogout.tsx +0 -7
  296. package/src/hooks/useSendMessage.tsx +24 -60
  297. package/src/i18n/strings.ts +121 -1
  298. package/src/main.ts +1 -1
  299. package/src/networking/api-requests/user.api.ts +71 -0
  300. package/src/networking/authRefresh.ts +25 -4
  301. package/src/networking/outboundQueue.ts +0 -29
  302. package/src/networking/stanzaHandlers.ts +1 -9
  303. package/src/networking/xmpp/presenceInRoom.xmpp.ts +6 -1
  304. package/src/networking/xmppClient.ts +7 -118
  305. package/src/roomStore/chatSettingsSlice.ts +3 -1
  306. package/src/roomStore/roomsSlice.ts +2 -20
  307. package/src/types/models/room.model.ts +0 -15
  308. package/src/types/types.ts +32 -20
@@ -211,13 +211,6 @@ export class XmppClient {
211
211
  this.devServer = xmppSettings?.devServer;
212
212
  }
213
213
  this.disableLastRead = this.xmppSettings?.disableLastRead === true;
214
- // `xmppPingOnSendEnabled` was declared in the public settings type but
215
- // never read. It now controls the SEND-path liveness probe only; the
216
- // periodic watchdog and the NetInfo check always run, so turning this
217
- // off cannot leave a zombie socket undetected — it only removes the
218
- // extra probe a send would otherwise trigger. Defaults to on
219
- // (previous behaviour), just throttled and confirmation-gated now.
220
- this.pingOnSendEnabled = this.xmppSettings?.xmppPingOnSendEnabled !== false;
221
214
 
222
215
  const qos = this.xmppSettings?.historyQoS;
223
216
  if (qos) {
@@ -501,10 +494,6 @@ export class XmppClient {
501
494
  this.status = 'online';
502
495
  this.presencesReady = true;
503
496
  this.reconnectAttempts = 0;
504
- // Fresh stream: forget any probe failures from the dead one, and
505
- // don't let the throttle suppress the first probe on it.
506
- this.failedProbeStreak = 0;
507
- this.lastStreamProbeAt = 0;
508
497
  try {
509
498
  devPushLog(
510
499
  'xmpp',
@@ -666,54 +655,8 @@ export class XmppClient {
666
655
  }
667
656
 
668
657
  private streamAliveProbe: Promise<boolean> | null = null;
669
- /** Wall-clock of the last probe, for throttling. */
670
- private lastStreamProbeAt = 0;
671
- /** Consecutive failed probes; a reconnect needs confirmation, not one miss. */
672
- private failedProbeStreak = 0;
673
-
674
- // --- liveness-probe tuning -------------------------------------------
675
- // The probe exists to catch a ZOMBIE socket: the WebSocket still reads
676
- // `online` but nothing traverses it (iOS suspending a backgrounded
677
- // socket, the JS debugger pausing the runtime). Without it the client
678
- // sits "online" forever and every send silently vanishes.
679
- //
680
- // The original settings were far too trigger-happy: a 4s budget for a
681
- // ping round-trip, fired after EVERY send, with a single timeout
682
- // immediately calling `forceReconnect()` — a full teardown, rebuild,
683
- // MUC re-join and private-store refetch. On a slow or congested mobile
684
- // link a perfectly healthy but quiet stream would miss that 4s window
685
- // and get torn down mid-conversation, repeatedly. (That reconnect is
686
- // also what used to replay the outbound queue and duplicate a message
687
- // that had already been delivered — customer-reported #31.)
688
- //
689
- // Tuned to: a realistic timeout, a throttle so bursts of sends can't
690
- // each start a probe, and a required second failure before we tear a
691
- // connection down. Zombie sockets fail every probe, so they are still
692
- // caught — just after confirmation rather than on one unlucky RTT.
693
- /** Per-probe budget. 4s was under a slow-network ping RTT. */
694
- private streamProbeTimeoutMs = 10_000;
695
- /** Minimum gap between probes, so a burst of sends probes at most once. */
696
- private minStreamProbeIntervalMs = 15_000;
697
- /** Delay before the confirmation probe that a teardown requires. */
698
- private streamProbeConfirmDelayMs = 2_000;
699
- /** Failures needed before `forceReconnect()`. */
700
- private streamProbeFailuresForReconnect = 2;
701
- /** Host opt-out for the send-path probe (`xmppPingOnSendEnabled`). */
702
- private pingOnSendEnabled = true;
703
658
 
704
- /**
705
- * Send-path liveness check. Throttled and skippable by config — unlike
706
- * the watchdog, this fires from user activity and must not turn a chatty
707
- * room into a probe storm.
708
- */
709
- ensureStreamAliveAfterSend(): void {
710
- if (!this.pingOnSendEnabled) {return;}
711
- this.ensureStreamAlive({ reason: 'send' }).catch(() => {});
712
- }
713
-
714
- verifyStreamAlive(
715
- timeoutMs: number = this.streamProbeTimeoutMs
716
- ): Promise<boolean> {
659
+ verifyStreamAlive(timeoutMs: number = 4000): Promise<boolean> {
717
660
  if (this.status !== 'online' || !this.client) {
718
661
  return Promise.resolve(false);
719
662
  }
@@ -745,70 +688,16 @@ export class XmppClient {
745
688
  return this.streamAliveProbe;
746
689
  }
747
690
 
748
- /**
749
- * Check that the stream is really carrying traffic, and tear it down only
750
- * if that is confirmed false.
751
- *
752
- * `force` skips the throttle — used by the periodic watchdog and the
753
- * NetInfo "we're reachable again" signal, which are already rare and
754
- * genuinely want to know right now. Send-path callers leave it off so a
755
- * burst of messages triggers at most one probe.
756
- */
757
- async ensureStreamAlive(opts?: {
758
- force?: boolean;
759
- reason?: string;
760
- }): Promise<void> {
691
+ async ensureStreamAlive(timeoutMs: number = 4000): Promise<void> {
761
692
  if (this.suppressReconnect || this.status !== 'online') {return;}
762
-
763
- const now = Date.now();
764
- if (
765
- !opts?.force &&
766
- now - this.lastStreamProbeAt < this.minStreamProbeIntervalMs
767
- ) {
768
- // Probed recently — a healthy answer is still fresh, and a dead
769
- // socket will be caught by the next watchdog tick anyway.
770
- return;
771
- }
772
- this.lastStreamProbeAt = now;
773
-
774
- const alive = await this.verifyStreamAlive();
775
-
776
- // Re-check state: a reconnect may have started while we waited.
777
- if (this.status !== 'online' || this.suppressReconnect) {return;}
778
-
779
- if (alive) {
780
- this.failedProbeStreak = 0;
781
- return;
782
- }
783
-
784
- this.failedProbeStreak += 1;
785
- if (this.failedProbeStreak < this.streamProbeFailuresForReconnect) {
786
- // One missed probe is not proof of a dead socket — a congested link
787
- // or a busy server can blow the budget on a stream that is fine.
788
- // Confirm with a second probe shortly, instead of tearing down a
789
- // working connection on a single unlucky round trip.
693
+ const alive = await this.verifyStreamAlive(timeoutMs);
694
+ // Re-check state: a reconnect may have started meanwhile.
695
+ if (!alive && this.status === 'online' && !this.suppressReconnect) {
790
696
  try {
791
- devPushLog(
792
- 'xmpp',
793
- `stream probe missed (${this.failedProbeStreak}/${this.streamProbeFailuresForReconnect}) — confirming before reconnect`
794
- );
697
+ devPushLog('xmpp', 'stream is zombie (ping unanswered) → forceReconnect');
795
698
  } catch {}
796
- setTimeout(() => {
797
- this.ensureStreamAlive({ force: true, reason: 'probe-confirm' }).catch(
798
- () => {}
799
- );
800
- }, this.streamProbeConfirmDelayMs);
801
- return;
699
+ this.forceReconnect();
802
700
  }
803
-
804
- this.failedProbeStreak = 0;
805
- try {
806
- devPushLog(
807
- 'xmpp',
808
- 'stream is zombie (probe unanswered twice) → forceReconnect'
809
- );
810
- } catch {}
811
- this.forceReconnect();
812
701
  }
813
702
 
814
703
  async reconnect() {
@@ -33,7 +33,9 @@ export interface ChatState {
33
33
 
34
34
  export const unpackAndTransform = (input?: User): User => {
35
35
  return {
36
- description: '',
36
+ // Was hardcoded to '' — every setUser dropped the user's own bio, so
37
+ // the profile's About section could never show one.
38
+ description: input?.description || '',
37
39
  token: input?.token || '',
38
40
  profileImage: input?.profileImage || '',
39
41
  _id: input?._id || '',
@@ -317,6 +317,8 @@ const reducers = {
317
317
  : [];
318
318
  state.rooms[roomData.jid] = {
319
319
  ...roomData,
320
+ icon: roomData.icon !== undefined ? roomData.icon : existing?.icon,
321
+ roomBg: roomData.roomBg !== undefined ? roomData.roomBg : existing?.roomBg,
320
322
  messages:
321
323
  existingMessages.length > 0 ? existingMessages : incomingMessages,
322
324
  lastViewedTimestamp: lastViewed,
@@ -543,25 +545,6 @@ const reducers = {
543
545
  ) => {
544
546
  state.isUnreadSyncing = action.payload;
545
547
  },
546
- /**
547
- * Records how far the user has actually read in a room: the timestamp
548
- * of the newest message they had reached when they scrolled away from
549
- * the bottom, or `null` while they are at the bottom.
550
- *
551
- * Written only by MessageList as the user scrolls. Deliberately does
552
- * NOT touch `unreadMessages` or `lastViewedTimestamp` — it only tells
553
- * the various "mark this room read" paths what value to stamp instead
554
- * of `Date.now()`. Customer-reported #33.
555
- */
556
- setReadBoundary: (
557
- state: WritableDraft<RoomMessagesState>,
558
- action: PayloadAction<{ chatJID: string; boundaryTs: number | null }>
559
- ) => {
560
- const { chatJID, boundaryTs } = action.payload;
561
- if (state.rooms[chatJID]) {
562
- state.rooms[chatJID].readBoundaryTs = boundaryTs;
563
- }
564
- },
565
548
  setLastViewedTimestamp: (
566
549
  state: WritableDraft<RoomMessagesState>,
567
550
  action: PayloadAction<{ chatJID: string; timestamp: number }>
@@ -918,7 +901,6 @@ export const {
918
901
  setIsLoading,
919
902
  setUnreadSyncing,
920
903
  setLastViewedTimestamp,
921
- setReadBoundary,
922
904
  applyPrivateStoreMarkers,
923
905
  setRoomNoMessages,
924
906
  setCurrentRoom,
@@ -50,21 +50,6 @@ export interface IRoom {
50
50
  composingList?: string[];
51
51
  lastViewedTimestamp?: number;
52
52
  unreadMessages?: number;
53
- /**
54
- * Timestamp of the newest message the user had actually reached when
55
- * they scrolled away from the bottom of this room, or null/undefined
56
- * while they are at the bottom (everything on screen is read).
57
- *
58
- * Lives in the store rather than in ChatRoom's local state because
59
- * several code paths outside the component mark a room read — the
60
- * AppState background handler, the `isVisible` consumer signal, the
61
- * visible-room auto-advance, `useChatRoomFocus` — and all of them must
62
- * stamp what the user actually saw instead of `Date.now()`. Stamping
63
- * "now" while they are scrolled up silently destroys unread messages,
64
- * and because those paths also flush to the server-side private store
65
- * the loss survives an app restart. Customer-reported #33.
66
- */
67
- readBoundaryTs?: number | null;
68
53
  noMessages?: boolean;
69
54
  role?: string;
70
55
 
@@ -33,21 +33,6 @@ export interface IRoom {
33
33
  composingList?: string[];
34
34
  lastViewedTimestamp?: number;
35
35
  unreadMessages?: number;
36
- /**
37
- * Timestamp of the newest message the user had actually reached when
38
- * they scrolled away from the bottom of this room; null/undefined while
39
- * they are at the bottom (everything on screen is read).
40
- *
41
- * Written only by MessageList as the user scrolls. Every path that marks
42
- * a room read must prefer this over `Date.now()` — the AppState
43
- * background handler, the `isVisible` consumer signal, the visible-room
44
- * auto-advance, `useChatRoomFocus` and logout all flush to the
45
- * server-side private store, so stamping "now" while the user is
46
- * scrolled up destroys unread messages permanently (survives an app
47
- * restart, because the bad marker comes back from the server).
48
- * Customer-reported #33.
49
- */
50
- readBoundaryTs?: number | null;
51
36
  noMessages?: boolean;
52
37
  role?: string;
53
38
  createdAt?: string | number | Date;
@@ -325,13 +310,16 @@ export interface TypographyConfig {
325
310
  };
326
311
  /** Attach (photo/document picker) bottom sheet. */
327
312
  attachSheet?: {
328
- /** "Attach" header label. Default 13 / "600". */
313
+ /** "Photos & Videos" section header. Default 17 / "700". */
329
314
  title?: ChatTextStyle;
330
- /** Row labels (Camera / Gallery / Document). Default 16 / "500". */
315
+ /** "View Library" link next to the section header. Default 15 / "500". */
316
+ viewLibrary?: ChatTextStyle;
317
+ /** Row labels ("Upload a File"). Default 16 / "500". */
331
318
  rowLabel?: ChatTextStyle;
332
- /** Grey hint under each row. Default 12. */
319
+ /** @deprecated Rows no longer render a hint line. */
333
320
  rowHint?: ChatTextStyle;
334
- /** Cancel button. Default 16 / "600". */
321
+ /** @deprecated The sheet has no Cancel button — it closes by tapping
322
+ * the backdrop, dragging it down, or the hardware back gesture. */
335
323
  cancelButton?: ChatTextStyle;
336
324
  };
337
325
 
@@ -409,6 +397,16 @@ export interface IConfig {
409
397
  * value takes effect.
410
398
  */
411
399
  height?: number;
400
+ /**
401
+ * Extend the header cards (room list + chat) under the status bar:
402
+ * each pads its top by the safe-area inset and paints it white, so
403
+ * the card and the status-bar band are one surface. Use this instead
404
+ * of wrapping `<Chat>` in a top-edge SafeAreaView: a host-side white
405
+ * band above the card shows a hairline seam where the card's
406
+ * shadow/elevation starts. Off by default (hosts that already pad the
407
+ * top keep their layout).
408
+ */
409
+ safeAreaTop?: boolean;
412
410
  };
413
411
  disableHeader?: boolean;
414
412
  disableMedia?: boolean;
@@ -437,7 +435,7 @@ export interface IConfig {
437
435
  hideMemberSendMessageAction?: boolean; // hides only "Message"
438
436
  hideMemberCopyIdAction?: boolean; // hides only "Copy User Id"
439
437
  chatHeaderAdditional?: { enabled: boolean; element: any };
440
- headerMenu?: () => void;
438
+ headerMenu?: (() => void) | boolean;
441
439
  headerChatMenu?: () => void;
442
440
  chatHeaderSettings?: {
443
441
  hide?: boolean;
@@ -469,6 +467,20 @@ export interface IConfig {
469
467
  loginFunction: () => Promise<User | null>;
470
468
  };
471
469
  defaultLogin?: boolean;
470
+ logout?: {
471
+ enabled: boolean;
472
+ label?: string;
473
+ confirm?:
474
+ | boolean
475
+ | {
476
+ title?: string;
477
+ message?: string;
478
+ confirmText?: string;
479
+ cancelText?: string;
480
+ };
481
+ onBeforeLogout?: () => Promise<boolean | void> | boolean | void;
482
+ onAfterLogout?: () => Promise<void> | void;
483
+ };
472
484
  refreshTokens?: {
473
485
  enabled: boolean;
474
486
  /**