stream-chat-react-native-core 5.31.2-beta.2 → 5.32.0-beta.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 (220) hide show
  1. package/lib/commonjs/components/Channel/Channel.js +21 -20
  2. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  3. package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
  4. package/lib/commonjs/components/Message/Message.js +9 -19
  5. package/lib/commonjs/components/Message/Message.js.map +1 -1
  6. package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +1 -2
  7. package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  8. package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +54 -37
  9. package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
  10. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +6 -11
  11. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  12. package/lib/commonjs/components/Message/hooks/useProcessReactions.js +90 -0
  13. package/lib/commonjs/components/Message/hooks/useProcessReactions.js.map +1 -0
  14. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +3 -12
  15. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
  16. package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +47 -143
  17. package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
  18. package/lib/commonjs/components/MessageOverlay/OverlayReactionsItem.js +166 -0
  19. package/lib/commonjs/components/MessageOverlay/OverlayReactionsItem.js.map +1 -0
  20. package/lib/commonjs/components/MessageOverlay/hooks/useFetchReactions.js +144 -0
  21. package/lib/commonjs/components/MessageOverlay/hooks/useFetchReactions.js.map +1 -0
  22. package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
  23. package/lib/commonjs/contexts/themeContext/utils/theme.js +0 -1
  24. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  25. package/lib/commonjs/i18n/es.json +13 -13
  26. package/lib/commonjs/i18n/fr.json +13 -13
  27. package/lib/commonjs/i18n/he.json +13 -13
  28. package/lib/commonjs/i18n/hi.json +13 -13
  29. package/lib/commonjs/i18n/it.json +13 -13
  30. package/lib/commonjs/i18n/ja.json +13 -13
  31. package/lib/commonjs/i18n/ko.json +13 -13
  32. package/lib/commonjs/i18n/nl.json +13 -13
  33. package/lib/commonjs/i18n/pt-BR.json +13 -13
  34. package/lib/commonjs/i18n/ru.json +13 -13
  35. package/lib/commonjs/i18n/tr.json +13 -13
  36. package/lib/commonjs/mock-builders/generator/message.js +2 -0
  37. package/lib/commonjs/mock-builders/generator/message.js.map +1 -1
  38. package/lib/commonjs/store/QuickSqliteClient.js +1 -1
  39. package/lib/commonjs/store/apis/getReactions.js +17 -0
  40. package/lib/commonjs/store/apis/getReactions.js.map +1 -0
  41. package/lib/commonjs/store/apis/getReactionsforFilterSort.js +30 -0
  42. package/lib/commonjs/store/apis/getReactionsforFilterSort.js.map +1 -0
  43. package/lib/commonjs/store/apis/insertReaction.js +8 -1
  44. package/lib/commonjs/store/apis/insertReaction.js.map +1 -1
  45. package/lib/commonjs/store/apis/queries/selectReactionsForMessages.js +1 -1
  46. package/lib/commonjs/store/apis/queries/selectReactionsForMessages.js.map +1 -1
  47. package/lib/commonjs/store/apis/updateReaction.js +6 -6
  48. package/lib/commonjs/store/apis/updateReaction.js.map +1 -1
  49. package/lib/commonjs/store/mappers/mapMessageToStorable.js +5 -3
  50. package/lib/commonjs/store/mappers/mapMessageToStorable.js.map +1 -1
  51. package/lib/commonjs/store/mappers/mapStorableToMessage.js +5 -3
  52. package/lib/commonjs/store/mappers/mapStorableToMessage.js.map +1 -1
  53. package/lib/commonjs/store/schema.js +2 -1
  54. package/lib/commonjs/store/schema.js.map +1 -1
  55. package/lib/commonjs/utils/addReactionToLocalState.js +25 -13
  56. package/lib/commonjs/utils/addReactionToLocalState.js.map +1 -1
  57. package/lib/commonjs/utils/removeReactionFromLocalState.js +11 -3
  58. package/lib/commonjs/utils/removeReactionFromLocalState.js.map +1 -1
  59. package/lib/commonjs/utils/removeReservedFields.js +1 -1
  60. package/lib/commonjs/utils/removeReservedFields.js.map +1 -1
  61. package/lib/commonjs/utils/utils.js +19 -5
  62. package/lib/commonjs/utils/utils.js.map +1 -1
  63. package/lib/commonjs/version.json +1 -1
  64. package/lib/module/components/Channel/Channel.js +21 -20
  65. package/lib/module/components/Channel/Channel.js.map +1 -1
  66. package/lib/module/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
  67. package/lib/module/components/Message/Message.js +9 -19
  68. package/lib/module/components/Message/Message.js.map +1 -1
  69. package/lib/module/components/Message/MessageSimple/MessageFooter.js +1 -2
  70. package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  71. package/lib/module/components/Message/MessageSimple/ReactionList.js +54 -37
  72. package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
  73. package/lib/module/components/Message/hooks/useCreateMessageContext.js +6 -11
  74. package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  75. package/lib/module/components/Message/hooks/useProcessReactions.js +90 -0
  76. package/lib/module/components/Message/hooks/useProcessReactions.js.map +1 -0
  77. package/lib/module/components/MessageOverlay/MessageOverlay.js +3 -12
  78. package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
  79. package/lib/module/components/MessageOverlay/OverlayReactions.js +47 -143
  80. package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
  81. package/lib/module/components/MessageOverlay/OverlayReactionsItem.js +166 -0
  82. package/lib/module/components/MessageOverlay/OverlayReactionsItem.js.map +1 -0
  83. package/lib/module/components/MessageOverlay/hooks/useFetchReactions.js +144 -0
  84. package/lib/module/components/MessageOverlay/hooks/useFetchReactions.js.map +1 -0
  85. package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
  86. package/lib/module/contexts/themeContext/utils/theme.js +0 -1
  87. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  88. package/lib/module/i18n/es.json +13 -13
  89. package/lib/module/i18n/fr.json +13 -13
  90. package/lib/module/i18n/he.json +13 -13
  91. package/lib/module/i18n/hi.json +13 -13
  92. package/lib/module/i18n/it.json +13 -13
  93. package/lib/module/i18n/ja.json +13 -13
  94. package/lib/module/i18n/ko.json +13 -13
  95. package/lib/module/i18n/nl.json +13 -13
  96. package/lib/module/i18n/pt-BR.json +13 -13
  97. package/lib/module/i18n/ru.json +13 -13
  98. package/lib/module/i18n/tr.json +13 -13
  99. package/lib/module/mock-builders/generator/message.js +2 -0
  100. package/lib/module/mock-builders/generator/message.js.map +1 -1
  101. package/lib/module/store/QuickSqliteClient.js +1 -1
  102. package/lib/module/store/apis/getReactions.js +17 -0
  103. package/lib/module/store/apis/getReactions.js.map +1 -0
  104. package/lib/module/store/apis/getReactionsforFilterSort.js +30 -0
  105. package/lib/module/store/apis/getReactionsforFilterSort.js.map +1 -0
  106. package/lib/module/store/apis/insertReaction.js +8 -1
  107. package/lib/module/store/apis/insertReaction.js.map +1 -1
  108. package/lib/module/store/apis/queries/selectReactionsForMessages.js +1 -1
  109. package/lib/module/store/apis/queries/selectReactionsForMessages.js.map +1 -1
  110. package/lib/module/store/apis/updateReaction.js +6 -6
  111. package/lib/module/store/apis/updateReaction.js.map +1 -1
  112. package/lib/module/store/mappers/mapMessageToStorable.js +5 -3
  113. package/lib/module/store/mappers/mapMessageToStorable.js.map +1 -1
  114. package/lib/module/store/mappers/mapStorableToMessage.js +5 -3
  115. package/lib/module/store/mappers/mapStorableToMessage.js.map +1 -1
  116. package/lib/module/store/schema.js +2 -1
  117. package/lib/module/store/schema.js.map +1 -1
  118. package/lib/module/utils/addReactionToLocalState.js +25 -13
  119. package/lib/module/utils/addReactionToLocalState.js.map +1 -1
  120. package/lib/module/utils/removeReactionFromLocalState.js +11 -3
  121. package/lib/module/utils/removeReactionFromLocalState.js.map +1 -1
  122. package/lib/module/utils/removeReservedFields.js +1 -1
  123. package/lib/module/utils/removeReservedFields.js.map +1 -1
  124. package/lib/module/utils/utils.js +19 -5
  125. package/lib/module/utils/utils.js.map +1 -1
  126. package/lib/module/version.json +1 -1
  127. package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
  128. package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +2 -2
  129. package/lib/typescript/components/Chat/hooks/handleEventToSyncDB.d.ts.map +1 -1
  130. package/lib/typescript/components/Message/Message.d.ts.map +1 -1
  131. package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +11 -3
  132. package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts.map +1 -1
  133. package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts.map +1 -1
  134. package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +1 -1
  135. package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +1 -1
  136. package/lib/typescript/components/Message/hooks/useProcessReactions.d.ts +38 -0
  137. package/lib/typescript/components/Message/hooks/useProcessReactions.d.ts.map +1 -0
  138. package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts.map +1 -1
  139. package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +2 -1
  140. package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts.map +1 -1
  141. package/lib/typescript/components/MessageOverlay/OverlayReactionsItem.d.ts +11 -0
  142. package/lib/typescript/components/MessageOverlay/OverlayReactionsItem.d.ts.map +1 -0
  143. package/lib/typescript/components/MessageOverlay/hooks/useFetchReactions.d.ts +14 -0
  144. package/lib/typescript/components/MessageOverlay/hooks/useFetchReactions.d.ts.map +1 -0
  145. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +3 -6
  146. package/lib/typescript/contexts/messageContext/MessageContext.d.ts.map +1 -1
  147. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +1 -1
  148. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +0 -1
  149. package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
  150. package/lib/typescript/i18n/es.json +13 -13
  151. package/lib/typescript/i18n/fr.json +13 -13
  152. package/lib/typescript/i18n/he.json +13 -13
  153. package/lib/typescript/i18n/hi.json +13 -13
  154. package/lib/typescript/i18n/it.json +13 -13
  155. package/lib/typescript/i18n/ja.json +13 -13
  156. package/lib/typescript/i18n/ko.json +13 -13
  157. package/lib/typescript/i18n/nl.json +13 -13
  158. package/lib/typescript/i18n/pt-BR.json +13 -13
  159. package/lib/typescript/i18n/ru.json +13 -13
  160. package/lib/typescript/i18n/tr.json +13 -13
  161. package/lib/typescript/store/apis/getReactions.d.ts +7 -0
  162. package/lib/typescript/store/apis/getReactions.d.ts.map +1 -0
  163. package/lib/typescript/store/apis/getReactionsforFilterSort.d.ts +14 -0
  164. package/lib/typescript/store/apis/getReactionsforFilterSort.d.ts.map +1 -0
  165. package/lib/typescript/store/apis/insertReaction.d.ts +3 -2
  166. package/lib/typescript/store/apis/insertReaction.d.ts.map +1 -1
  167. package/lib/typescript/store/apis/queries/selectReactionsForMessages.d.ts +4 -0
  168. package/lib/typescript/store/apis/queries/selectReactionsForMessages.d.ts.map +1 -1
  169. package/lib/typescript/store/apis/updateReaction.d.ts.map +1 -1
  170. package/lib/typescript/store/mappers/mapMessageToStorable.d.ts.map +1 -1
  171. package/lib/typescript/store/mappers/mapStorableToMessage.d.ts.map +1 -1
  172. package/lib/typescript/store/schema.d.ts +2 -1
  173. package/lib/typescript/store/schema.d.ts.map +1 -1
  174. package/lib/typescript/utils/addReactionToLocalState.d.ts.map +1 -1
  175. package/lib/typescript/utils/removeReactionFromLocalState.d.ts.map +1 -1
  176. package/lib/typescript/utils/removeReservedFields.d.ts.map +1 -1
  177. package/lib/typescript/utils/utils.d.ts +9 -3
  178. package/lib/typescript/utils/utils.d.ts.map +1 -1
  179. package/package.json +1 -1
  180. package/src/components/Channel/Channel.tsx +24 -34
  181. package/src/components/Chat/hooks/handleEventToSyncDB.ts +1 -2
  182. package/src/components/Message/Message.tsx +8 -26
  183. package/src/components/Message/MessageSimple/MessageFooter.tsx +1 -1
  184. package/src/components/Message/MessageSimple/ReactionList.tsx +72 -47
  185. package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +1 -1
  186. package/src/components/Message/hooks/useCreateMessageContext.ts +5 -10
  187. package/src/components/Message/hooks/useProcessReactions.ts +116 -0
  188. package/src/components/MessageOverlay/MessageOverlay.tsx +4 -17
  189. package/src/components/MessageOverlay/OverlayReactions.tsx +75 -176
  190. package/src/components/MessageOverlay/OverlayReactionsItem.tsx +188 -0
  191. package/src/components/MessageOverlay/hooks/useFetchReactions.ts +85 -0
  192. package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +139 -0
  193. package/src/contexts/messageContext/MessageContext.tsx +2 -6
  194. package/src/contexts/themeContext/utils/theme.ts +0 -2
  195. package/src/i18n/es.json +13 -13
  196. package/src/i18n/fr.json +13 -13
  197. package/src/i18n/he.json +13 -13
  198. package/src/i18n/hi.json +13 -13
  199. package/src/i18n/it.json +13 -13
  200. package/src/i18n/ja.json +13 -13
  201. package/src/i18n/ko.json +13 -13
  202. package/src/i18n/nl.json +13 -13
  203. package/src/i18n/pt-BR.json +13 -13
  204. package/src/i18n/ru.json +13 -13
  205. package/src/i18n/tr.json +13 -13
  206. package/src/mock-builders/generator/message.js +2 -0
  207. package/src/store/QuickSqliteClient.ts +1 -1
  208. package/src/store/apis/getReactions.ts +21 -0
  209. package/src/store/apis/getReactionsforFilterSort.ts +43 -0
  210. package/src/store/apis/insertReaction.ts +15 -5
  211. package/src/store/apis/queries/selectReactionsForMessages.ts +5 -1
  212. package/src/store/apis/updateReaction.ts +6 -18
  213. package/src/store/mappers/mapMessageToStorable.ts +4 -2
  214. package/src/store/mappers/mapStorableToMessage.ts +12 -2
  215. package/src/store/schema.ts +4 -2
  216. package/src/utils/addReactionToLocalState.ts +33 -17
  217. package/src/utils/removeReactionFromLocalState.ts +22 -2
  218. package/src/utils/removeReservedFields.ts +2 -0
  219. package/src/utils/utils.ts +19 -7
  220. package/src/version.json +1 -1
package/src/i18n/ko.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "1 Reply": "",
3
- "1 Thread Reply": "",
3
+ "1 Thread Reply": "1개의 스레드 답글",
4
4
  "Allow access to your Gallery": "",
5
5
  "Allow camera access in device settings": "",
6
- "Also send to channel": "채널에도 전송",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "",
8
8
  "Are you sure?": "",
9
9
  "Block User": "",
@@ -29,7 +29,7 @@
29
29
  "Flag": "",
30
30
  "Flag Message": "",
31
31
  "Flag action failed either due to a network issue or the message is already flagged": "",
32
- "Hold to start recording.": "녹음을 시작하려면 눌러주세요.",
32
+ "Hold to start recording.": "",
33
33
  "How about sending your first message to a friend?": "",
34
34
  "Instant Commands": "",
35
35
  "Let's start chatting!": "",
@@ -45,25 +45,25 @@
45
45
  "Not supported": "",
46
46
  "Nothing yet...": "",
47
47
  "Ok": "",
48
- "Only visible to you": "",
48
+ "Only visible to you": "당신만 볼 수 있습니다",
49
49
  "Open Settings": "",
50
50
  "Photo": "사진",
51
51
  "Photos and Videos": "",
52
52
  "Pin to Conversation": "",
53
- "Pinned by": "",
54
- "Please allow Audio permissions in settings.": "설정에서 오디오 권한을 허용해주세요.",
53
+ "Pinned by": "고정된 사용자",
54
+ "Please allow Audio permissions in settings.": "",
55
55
  "Please enable access to your photos and videos so you can share them.": "",
56
56
  "Please select a channel first": "",
57
57
  "Reconnecting...": "다시 연결 중...",
58
58
  "Reply": "",
59
59
  "Reply to Message": "",
60
60
  "Resend": "",
61
- "Search GIFs": "",
61
+ "Search GIFs": "GIF의 검색",
62
62
  "Select More Photos": "",
63
63
  "Send Anyway": "",
64
- "Send a message": "",
64
+ "Send a message": "메세지를 보내다",
65
65
  "Sending links is not allowed in this conversation": "",
66
- "Slow mode ON": "",
66
+ "Slow mode ON": "슬로모드 켜짐",
67
67
  "The message has been reported to a moderator.": "",
68
68
  "Thread Reply": "",
69
69
  "Unblock User": "",
@@ -72,12 +72,12 @@
72
72
  "Unpin from Conversation": "",
73
73
  "Unread Messages": "",
74
74
  "Video": "동영상",
75
- "You": "",
75
+ "You": "당신",
76
76
  "You can't send messages in this channel": "",
77
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
77
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} 외 {{ nonSelfUserLength }}명이 입력 중입니다",
78
78
  "{{ index }} of {{ photoLength }}": "",
79
79
  "{{ replyCount }} Replies": "",
80
- "{{ replyCount }} Thread Replies": "",
81
- "{{ user }} is typing": "",
80
+ "{{ replyCount }} Thread Replies": "{{ replyCount }} 스레드 답글",
81
+ "{{ user }} is typing": "{{ user }} 타이핑 중",
82
82
  "🏙 Attachment...": ""
83
83
  }
package/src/i18n/nl.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "1 Reply": "",
3
- "1 Thread Reply": "",
3
+ "1 Thread Reply": "1 thread antwoord",
4
4
  "Allow access to your Gallery": "",
5
5
  "Allow camera access in device settings": "",
6
- "Also send to channel": "Stuur ook naar kanaal",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "",
8
8
  "Are you sure?": "",
9
9
  "Block User": "",
@@ -29,7 +29,7 @@
29
29
  "Flag": "",
30
30
  "Flag Message": "",
31
31
  "Flag action failed either due to a network issue or the message is already flagged": "",
32
- "Hold to start recording.": "Houd vast om opname te starten.",
32
+ "Hold to start recording.": "",
33
33
  "How about sending your first message to a friend?": "",
34
34
  "Instant Commands": "",
35
35
  "Let's start chatting!": "",
@@ -45,25 +45,25 @@
45
45
  "Not supported": "",
46
46
  "Nothing yet...": "",
47
47
  "Ok": "",
48
- "Only visible to you": "",
48
+ "Only visible to you": "Alleen zichtbaar voor jou",
49
49
  "Open Settings": "",
50
50
  "Photo": "Foto",
51
51
  "Photos and Videos": "",
52
52
  "Pin to Conversation": "",
53
- "Pinned by": "",
54
- "Please allow Audio permissions in settings.": "Gelieve audio toestemmingen toe te staan in de instellingen.",
53
+ "Pinned by": "Vastgemaakt door",
54
+ "Please allow Audio permissions in settings.": "",
55
55
  "Please enable access to your photos and videos so you can share them.": "",
56
56
  "Please select a channel first": "",
57
57
  "Reconnecting...": "Opnieuw Verbinding Maken...",
58
58
  "Reply": "",
59
59
  "Reply to Message": "",
60
60
  "Resend": "",
61
- "Search GIFs": "",
61
+ "Search GIFs": "Zoek GIF's",
62
62
  "Select More Photos": "",
63
63
  "Send Anyway": "",
64
- "Send a message": "",
64
+ "Send a message": "Stuur een bericht",
65
65
  "Sending links is not allowed in this conversation": "",
66
- "Slow mode ON": "",
66
+ "Slow mode ON": "Langzame modus aan",
67
67
  "The message has been reported to a moderator.": "",
68
68
  "Thread Reply": "",
69
69
  "Unblock User": "",
@@ -72,12 +72,12 @@
72
72
  "Unpin from Conversation": "",
73
73
  "Unread Messages": "",
74
74
  "Video": "Video",
75
- "You": "",
75
+ "You": "U",
76
76
  "You can't send messages in this channel": "",
77
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
77
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} en {{ nonSelfUserLength }} anderen zijn aan het typen",
78
78
  "{{ index }} of {{ photoLength }}": "",
79
79
  "{{ replyCount }} Replies": "",
80
- "{{ replyCount }} Thread Replies": "",
81
- "{{ user }} is typing": "",
80
+ "{{ replyCount }} Thread Replies": "{{replyCount}} Discussiereacties",
81
+ "{{ user }} is typing": "{{ user }} is aan het typen",
82
82
  "🏙 Attachment...": ""
83
83
  }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "1 Reply": "",
3
- "1 Thread Reply": "",
3
+ "1 Thread Reply": "1 Resposta de Thread",
4
4
  "Allow access to your Gallery": "",
5
5
  "Allow camera access in device settings": "",
6
- "Also send to channel": "Também enviar para o canal",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "",
8
8
  "Are you sure?": "",
9
9
  "Block User": "",
@@ -29,7 +29,7 @@
29
29
  "Flag": "",
30
30
  "Flag Message": "",
31
31
  "Flag action failed either due to a network issue or the message is already flagged": "",
32
- "Hold to start recording.": "Mantenha pressionado para começar a gravar.",
32
+ "Hold to start recording.": "",
33
33
  "How about sending your first message to a friend?": "",
34
34
  "Instant Commands": "",
35
35
  "Let's start chatting!": "",
@@ -45,25 +45,25 @@
45
45
  "Not supported": "",
46
46
  "Nothing yet...": "",
47
47
  "Ok": "",
48
- "Only visible to you": "",
48
+ "Only visible to you": "Apenas visível para você",
49
49
  "Open Settings": "",
50
50
  "Photo": "Foto",
51
51
  "Photos and Videos": "",
52
52
  "Pin to Conversation": "",
53
- "Pinned by": "",
54
- "Please allow Audio permissions in settings.": "Por favor, permita as permissões de áudio nas configurações.",
53
+ "Pinned by": "Fixado por",
54
+ "Please allow Audio permissions in settings.": "",
55
55
  "Please enable access to your photos and videos so you can share them.": "",
56
56
  "Please select a channel first": "",
57
57
  "Reconnecting...": "Reconectando...",
58
58
  "Reply": "",
59
59
  "Reply to Message": "",
60
60
  "Resend": "",
61
- "Search GIFs": "",
61
+ "Search GIFs": "Pesquisar GIFs",
62
62
  "Select More Photos": "",
63
63
  "Send Anyway": "",
64
- "Send a message": "",
64
+ "Send a message": "Enviar uma mensagem",
65
65
  "Sending links is not allowed in this conversation": "",
66
- "Slow mode ON": "",
66
+ "Slow mode ON": "Modo Lento ATIVADO",
67
67
  "The message has been reported to a moderator.": "",
68
68
  "Thread Reply": "",
69
69
  "Unblock User": "",
@@ -72,12 +72,12 @@
72
72
  "Unpin from Conversation": "",
73
73
  "Unread Messages": "",
74
74
  "Video": "Vídeo",
75
- "You": "",
75
+ "You": "Você",
76
76
  "You can't send messages in this channel": "",
77
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
77
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} e mais {{ nonSelfUserLength }} pessoa(s) estão digitando",
78
78
  "{{ index }} of {{ photoLength }}": "",
79
79
  "{{ replyCount }} Replies": "",
80
- "{{ replyCount }} Thread Replies": "",
81
- "{{ user }} is typing": "",
80
+ "{{ replyCount }} Thread Replies": "{{ replyCount }} Respostas de Thread",
81
+ "{{ user }} is typing": "{{ user }} está digitando",
82
82
  "🏙 Attachment...": ""
83
83
  }
package/src/i18n/ru.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "1 Reply": "",
3
- "1 Thread Reply": "",
3
+ "1 Thread Reply": "1 тема Ответить",
4
4
  "Allow access to your Gallery": "",
5
5
  "Allow camera access in device settings": "",
6
- "Also send to channel": "Также отправить на канал",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "",
8
8
  "Are you sure?": "",
9
9
  "Block User": "",
@@ -29,7 +29,7 @@
29
29
  "Flag": "",
30
30
  "Flag Message": "",
31
31
  "Flag action failed either due to a network issue or the message is already flagged": "",
32
- "Hold to start recording.": "Удерживайте, чтобы начать запись.",
32
+ "Hold to start recording.": "",
33
33
  "How about sending your first message to a friend?": "",
34
34
  "Instant Commands": "",
35
35
  "Let's start chatting!": "",
@@ -45,25 +45,25 @@
45
45
  "Not supported": "",
46
46
  "Nothing yet...": "",
47
47
  "Ok": "",
48
- "Only visible to you": "",
48
+ "Only visible to you": "Видно только вам",
49
49
  "Open Settings": "",
50
50
  "Photo": "Фото",
51
51
  "Photos and Videos": "",
52
52
  "Pin to Conversation": "",
53
- "Pinned by": "",
54
- "Please allow Audio permissions in settings.": "Пожалуйста, разрешите разрешения на аудио в настройках.",
53
+ "Pinned by": "Закреплено пользователем",
54
+ "Please allow Audio permissions in settings.": "",
55
55
  "Please enable access to your photos and videos so you can share them.": "",
56
56
  "Please select a channel first": "",
57
57
  "Reconnecting...": "Переподключение...",
58
58
  "Reply": "",
59
59
  "Reply to Message": "",
60
60
  "Resend": "",
61
- "Search GIFs": "",
61
+ "Search GIFs": "Поиск GIF",
62
62
  "Select More Photos": "",
63
63
  "Send Anyway": "",
64
- "Send a message": "",
64
+ "Send a message": "Отправить сообщение",
65
65
  "Sending links is not allowed in this conversation": "",
66
- "Slow mode ON": "",
66
+ "Slow mode ON": "Медленный режим включен",
67
67
  "The message has been reported to a moderator.": "",
68
68
  "Thread Reply": "",
69
69
  "Unblock User": "",
@@ -72,12 +72,12 @@
72
72
  "Unpin from Conversation": "",
73
73
  "Unread Messages": "",
74
74
  "Video": "видео",
75
- "You": "",
75
+ "You": "Вы",
76
76
  "You can't send messages in this channel": "",
77
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
77
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
78
78
  "{{ index }} of {{ photoLength }}": "",
79
79
  "{{ replyCount }} Replies": "",
80
- "{{ replyCount }} Thread Replies": "",
81
- "{{ user }} is typing": "",
80
+ "{{ replyCount }} Thread Replies": "{{replyCount}} Ответы в темах",
81
+ "{{ user }} is typing": "{{ user }} пишет",
82
82
  "🏙 Attachment...": ""
83
83
  }
package/src/i18n/tr.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "1 Reply": "",
3
- "1 Thread Reply": "",
3
+ "1 Thread Reply": "1 Konu Yanıtı",
4
4
  "Allow access to your Gallery": "",
5
5
  "Allow camera access in device settings": "",
6
- "Also send to channel": "Kanala da gönder",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "",
8
8
  "Are you sure?": "",
9
9
  "Block User": "",
@@ -29,7 +29,7 @@
29
29
  "Flag": "",
30
30
  "Flag Message": "",
31
31
  "Flag action failed either due to a network issue or the message is already flagged": "",
32
- "Hold to start recording.": "Kayıt yapmak için basılı tutun.",
32
+ "Hold to start recording.": "",
33
33
  "How about sending your first message to a friend?": "",
34
34
  "Instant Commands": "",
35
35
  "Let's start chatting!": "",
@@ -45,25 +45,25 @@
45
45
  "Not supported": "",
46
46
  "Nothing yet...": "",
47
47
  "Ok": "",
48
- "Only visible to you": "",
48
+ "Only visible to you": "Sadece siz görebilirsiniz",
49
49
  "Open Settings": "",
50
50
  "Photo": "Fotoğraf",
51
51
  "Photos and Videos": "",
52
52
  "Pin to Conversation": "",
53
- "Pinned by": "",
54
- "Please allow Audio permissions in settings.": "Lütfen ayarlarda ses izinlerine izin verin",
53
+ "Pinned by": "Tarafından sabitlendi",
54
+ "Please allow Audio permissions in settings.": "",
55
55
  "Please enable access to your photos and videos so you can share them.": "",
56
56
  "Please select a channel first": "",
57
57
  "Reconnecting...": "Yeniden Bağlanılıyor...",
58
58
  "Reply": "",
59
59
  "Reply to Message": "",
60
60
  "Resend": "",
61
- "Search GIFs": "",
61
+ "Search GIFs": "GIF Ara",
62
62
  "Select More Photos": "",
63
63
  "Send Anyway": "",
64
- "Send a message": "",
64
+ "Send a message": "Mesaj gönder",
65
65
  "Sending links is not allowed in this conversation": "",
66
- "Slow mode ON": "",
66
+ "Slow mode ON": "Yavaş Mod Açık",
67
67
  "The message has been reported to a moderator.": "",
68
68
  "Thread Reply": "",
69
69
  "Unblock User": "",
@@ -72,12 +72,12 @@
72
72
  "Unpin from Conversation": "",
73
73
  "Unread Messages": "",
74
74
  "Video": "Video",
75
- "You": "",
75
+ "You": "Sen",
76
76
  "You can't send messages in this channel": "",
77
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
77
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
78
78
  "{{ index }} of {{ photoLength }}": "",
79
79
  "{{ replyCount }} Replies": "",
80
- "{{ replyCount }} Thread Replies": "",
81
- "{{ user }} is typing": "",
80
+ "{{ replyCount }} Thread Replies": "{{responseCount}} Konu Cevapı",
81
+ "{{ user }} is typing": "{{ user }} yazıyor",
82
82
  "🏙 Attachment...": ""
83
83
  }
@@ -11,6 +11,7 @@ export const generateMessage = (options = {}) => {
11
11
  created_at: timestamp,
12
12
  html: '<p>regular</p>',
13
13
  id: uuidv4(),
14
+ message_text_updated_at: timestamp,
14
15
  text: uuidv4(),
15
16
  type: 'regular',
16
17
  updated_at: timestamp.toString(),
@@ -24,6 +25,7 @@ export const generateStaticMessage = (seed, options, date) =>
24
25
  generateMessage({
25
26
  created_at: date || '2020-04-27T13:39:49.331742Z',
26
27
  id: uuidv5(seed, StreamReactNativeNamespace),
28
+ message_text_updated_at: date || '2020-04-27T13:39:49.331742Z',
27
29
  text: seed,
28
30
  updated_at: date || '2020-04-27T13:39:49.331742Z',
29
31
  ...options,
@@ -30,7 +30,7 @@ import type { PreparedQueries, Table } from './types';
30
30
  *
31
31
  */
32
32
  export class QuickSqliteClient {
33
- static dbVersion = 3;
33
+ static dbVersion = 5;
34
34
 
35
35
  static dbName = DB_NAME;
36
36
  static dbLocation = DB_LOCATION;
@@ -0,0 +1,21 @@
1
+ import type { ReactionResponse } from 'stream-chat';
2
+
3
+ import type { DefaultStreamChatGenerics } from '../../types/types';
4
+ import { mapStorableToReaction } from '../mappers/mapStorableToReaction';
5
+ import { QuickSqliteClient } from '../QuickSqliteClient';
6
+ import { TableRowJoinedUser } from '../types';
7
+
8
+ export const getReactions = <
9
+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
10
+ >({
11
+ reactions,
12
+ }: {
13
+ reactions: TableRowJoinedUser<'reactions'>[];
14
+ }): ReactionResponse<StreamChatGenerics>[] => {
15
+ QuickSqliteClient.logger?.('info', 'getReactions', { reactions });
16
+
17
+ // Enrich the channels with state
18
+ return reactions.map((reaction) => ({
19
+ ...mapStorableToReaction<StreamChatGenerics>(reaction),
20
+ }));
21
+ };
@@ -0,0 +1,43 @@
1
+ import type { ReactionFilters, ReactionResponse, ReactionSort } from 'stream-chat';
2
+
3
+ import { getReactions } from './getReactions';
4
+ import { selectReactionsForMessages } from './queries/selectReactionsForMessages';
5
+
6
+ import type { DefaultStreamChatGenerics } from '../../types/types';
7
+
8
+ import { QuickSqliteClient } from '../QuickSqliteClient';
9
+
10
+ /**
11
+ * Fetches reactions for a message from the database based on the provided filters and sort.
12
+ * @param currentMessageId The message ID for which reactions are to be fetched.
13
+ * @param filters The filters to be applied while fetching reactions.
14
+ * @param sort The sort to be applied while fetching reactions.
15
+ */
16
+ export const getReactionsForFilterSort = <
17
+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
18
+ >({
19
+ currentMessageId,
20
+ filters,
21
+ sort,
22
+ }: {
23
+ currentMessageId: string;
24
+ filters?: ReactionFilters<StreamChatGenerics>;
25
+ sort?: ReactionSort<StreamChatGenerics>;
26
+ }): ReactionResponse<StreamChatGenerics>[] | null => {
27
+ if (!filters && !sort) {
28
+ console.warn('Please provide the query (filters/sort) to fetch channels from DB');
29
+ return null;
30
+ }
31
+
32
+ QuickSqliteClient.logger?.('info', 'getReactionsForFilterSort', { filters, sort });
33
+
34
+ const reactions = selectReactionsForMessages([currentMessageId]);
35
+
36
+ if (!reactions) return null;
37
+
38
+ if (reactions.length === 0) {
39
+ return [];
40
+ }
41
+
42
+ return getReactions({ reactions });
43
+ };
@@ -1,14 +1,17 @@
1
- import type { ReactionResponse } from 'stream-chat';
1
+ import type { FormatMessageResponse, MessageResponse, ReactionResponse } from 'stream-chat';
2
2
 
3
3
  import { mapReactionToStorable } from '../mappers/mapReactionToStorable';
4
4
  import { QuickSqliteClient } from '../QuickSqliteClient';
5
+ import { createUpdateQuery } from '../sqlite-utils/createUpdateQuery';
5
6
  import { createUpsertQuery } from '../sqlite-utils/createUpsertQuery';
6
7
  import type { PreparedQueries } from '../types';
7
8
 
8
9
  export const insertReaction = ({
9
10
  flush = true,
11
+ message,
10
12
  reaction,
11
13
  }: {
14
+ message: MessageResponse | FormatMessageResponse;
12
15
  reaction: ReactionResponse;
13
16
  flush?: boolean;
14
17
  }) => {
@@ -18,10 +21,17 @@ export const insertReaction = ({
18
21
 
19
22
  queries.push(createUpsertQuery('reactions', storableReaction));
20
23
 
21
- queries.push([
22
- 'UPDATE messages SET reactionCounts = reactionCounts + 1 WHERE id = ?',
23
- [reaction.message_id],
24
- ]);
24
+ const stringifiedNewReactionGroups = JSON.stringify(message.reaction_groups);
25
+
26
+ queries.push(
27
+ createUpdateQuery(
28
+ 'messages',
29
+ {
30
+ reactionGroups: stringifiedNewReactionGroups,
31
+ },
32
+ { id: reaction.message_id },
33
+ ),
34
+ );
25
35
 
26
36
  QuickSqliteClient.logger?.('info', 'insertReaction', {
27
37
  flush,
@@ -2,6 +2,10 @@ import { QuickSqliteClient } from '../../QuickSqliteClient';
2
2
  import { tables } from '../../schema';
3
3
  import type { TableRowJoinedUser } from '../../types';
4
4
 
5
+ /**
6
+ * Fetches reactions for a message from the database for messageIds.
7
+ * @param messageIds The message IDs for which reactions are to be fetched.
8
+ */
5
9
  export const selectReactionsForMessages = (
6
10
  messageIds: string[],
7
11
  ): TableRowJoinedUser<'reactions'>[] => {
@@ -28,7 +32,7 @@ export const selectReactionsForMessages = (
28
32
  FROM reactions a
29
33
  LEFT JOIN
30
34
  users b
31
- ON b.id = a.userId
35
+ ON b.id = a.userId
32
36
  WHERE a.messageId in (${questionMarks})`,
33
37
  messageIds,
34
38
  );
@@ -34,30 +34,18 @@ export const updateReaction = ({
34
34
  }),
35
35
  );
36
36
 
37
- let updatedReactionCounts: string | undefined;
38
-
39
- if (message.reaction_counts) {
40
- const { reactionCounts } = mapMessageToStorable(message);
41
- updatedReactionCounts = reactionCounts;
42
-
43
- queries.push(
44
- createUpdateQuery(
45
- 'messages',
46
- {
47
- reactionCounts,
48
- },
49
- {
50
- id: message.id,
51
- },
52
- ),
53
- );
37
+ let updatedReactionGroups: string | undefined;
38
+ if (message.reaction_groups) {
39
+ const { reactionGroups } = mapMessageToStorable(message);
40
+ updatedReactionGroups = reactionGroups;
41
+ queries.push(createUpdateQuery('messages', { reactionGroups }, { id: message.id }));
54
42
  }
55
43
 
56
44
  QuickSqliteClient.logger?.('info', 'updateReaction', {
57
45
  addedUser: storableUser,
58
46
  flush,
59
47
  updatedReaction: storableReaction,
60
- updatedReactionCounts,
48
+ updatedReactionGroups,
61
49
  });
62
50
 
63
51
  if (flush) {
@@ -15,9 +15,10 @@ export const mapMessageToStorable = (
15
15
  id,
16
16
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
17
17
  latest_reactions,
18
+ message_text_updated_at,
18
19
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
19
20
  own_reactions,
20
- reaction_counts,
21
+ reaction_groups,
21
22
  text,
22
23
  type,
23
24
  updated_at,
@@ -32,7 +33,8 @@ export const mapMessageToStorable = (
32
33
  deletedAt: mapDateTimeToStorable(deleted_at),
33
34
  extraData: JSON.stringify(extraData),
34
35
  id,
35
- reactionCounts: JSON.stringify(reaction_counts),
36
+ messageTextUpdatedAt: mapDateTimeToStorable(message_text_updated_at),
37
+ reactionGroups: JSON.stringify(reaction_groups),
36
38
  text,
37
39
  type,
38
40
  updatedAt: mapDateTimeToStorable(updated_at),
@@ -19,7 +19,16 @@ export const mapStorableToMessage = <
19
19
  messageRow: TableRowJoinedUser<'messages'>;
20
20
  reactionRows: TableRowJoinedUser<'reactions'>[];
21
21
  }): MessageResponse<StreamChatGenerics> => {
22
- const { createdAt, deletedAt, extraData, reactionCounts, updatedAt, user, ...rest } = messageRow;
22
+ const {
23
+ createdAt,
24
+ deletedAt,
25
+ extraData,
26
+ messageTextUpdatedAt,
27
+ reactionGroups,
28
+ updatedAt,
29
+ user,
30
+ ...rest
31
+ } = messageRow;
23
32
  const latestReactions =
24
33
  reactionRows?.map((reaction) => mapStorableToReaction<StreamChatGenerics>(reaction)) || [];
25
34
 
@@ -31,8 +40,9 @@ export const mapStorableToMessage = <
31
40
  created_at: createdAt,
32
41
  deleted_at: deletedAt,
33
42
  latest_reactions: latestReactions,
43
+ message_text_updated_at: messageTextUpdatedAt,
34
44
  own_reactions: ownReactions,
35
- reaction_counts: reactionCounts ? JSON.parse(reactionCounts) : {},
45
+ reaction_groups: reactionGroups ? JSON.parse(reactionGroups) : {},
36
46
  updated_at: updatedAt,
37
47
  user: mapStorableToUser(user),
38
48
  ...(extraData ? JSON.parse(extraData) : {}),
@@ -102,7 +102,8 @@ export const tables: Tables = {
102
102
  deletedAt: 'TEXT',
103
103
  extraData: 'TEXT',
104
104
  id: 'TEXT',
105
- reactionCounts: 'TEXT',
105
+ messageTextUpdatedAt: 'TEXT',
106
+ reactionGroups: 'TEXT',
106
107
  text: "TEXT DEFAULT ''",
107
108
  type: 'TEXT',
108
109
  updatedAt: 'TEXT',
@@ -262,7 +263,8 @@ export type Schema = {
262
263
  deletedAt: string;
263
264
  extraData: string;
264
265
  id: string;
265
- reactionCounts: string;
266
+ messageTextUpdatedAt: string;
267
+ reactionGroups: string;
266
268
  type: MessageLabel;
267
269
  updatedAt: string;
268
270
  text?: string;