stream-chat-react-native-core 8.2.0 → 8.3.0-beta.2

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 (227) hide show
  1. package/lib/commonjs/components/Channel/Channel.js +3 -1
  2. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  3. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +2 -0
  4. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  5. package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js +9 -0
  6. package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  7. package/lib/commonjs/components/Message/Message.js +8 -0
  8. package/lib/commonjs/components/Message/Message.js.map +1 -1
  9. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +13 -0
  10. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
  11. package/lib/commonjs/components/Reply/Reply.js +1 -1
  12. package/lib/commonjs/components/Reply/Reply.js.map +1 -1
  13. package/lib/commonjs/contexts/index.js +11 -0
  14. package/lib/commonjs/contexts/index.js.map +1 -1
  15. package/lib/commonjs/contexts/liveLocationManagerContext/LiveLocationManagerContext.js +54 -0
  16. package/lib/commonjs/contexts/liveLocationManagerContext/LiveLocationManagerContext.js.map +1 -0
  17. package/lib/commonjs/contexts/liveLocationManagerContext/hooks/useHandleLiveLocationEvents.js +50 -0
  18. package/lib/commonjs/contexts/liveLocationManagerContext/hooks/useHandleLiveLocationEvents.js.map +1 -0
  19. package/lib/commonjs/contexts/liveLocationManagerContext/index.js +26 -0
  20. package/lib/commonjs/contexts/liveLocationManagerContext/index.js.map +1 -0
  21. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +0 -3
  22. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  23. package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
  24. package/lib/commonjs/i18n/en.json +11 -0
  25. package/lib/commonjs/i18n/es.json +8 -0
  26. package/lib/commonjs/i18n/fr.json +7 -0
  27. package/lib/commonjs/i18n/he.json +7 -0
  28. package/lib/commonjs/i18n/hi.json +12 -0
  29. package/lib/commonjs/i18n/it.json +7 -0
  30. package/lib/commonjs/i18n/ja.json +13 -0
  31. package/lib/commonjs/i18n/ko.json +13 -0
  32. package/lib/commonjs/i18n/nl.json +12 -0
  33. package/lib/commonjs/i18n/pt-br.json +7 -0
  34. package/lib/commonjs/i18n/ru.json +7 -0
  35. package/lib/commonjs/i18n/tr.json +12 -0
  36. package/lib/commonjs/store/SqliteClient.js +1 -1
  37. package/lib/commonjs/store/apis/deleteMessage.js +0 -3
  38. package/lib/commonjs/store/apis/deleteMessage.js.map +1 -1
  39. package/lib/commonjs/store/apis/getChannelActiveLocations.js +26 -0
  40. package/lib/commonjs/store/apis/getChannelActiveLocations.js.map +1 -0
  41. package/lib/commonjs/store/apis/getChannelMessages.js +12 -0
  42. package/lib/commonjs/store/apis/getChannelMessages.js.map +1 -1
  43. package/lib/commonjs/store/apis/getChannels.js +7 -2
  44. package/lib/commonjs/store/apis/getChannels.js.map +1 -1
  45. package/lib/commonjs/store/apis/queries/selectActiveLocationsForChannels.js +22 -0
  46. package/lib/commonjs/store/apis/queries/selectActiveLocationsForChannels.js.map +1 -0
  47. package/lib/commonjs/store/apis/upsertChannels.js +16 -1
  48. package/lib/commonjs/store/apis/upsertChannels.js.map +1 -1
  49. package/lib/commonjs/store/apis/upsertLocation.js +31 -0
  50. package/lib/commonjs/store/apis/upsertLocation.js.map +1 -0
  51. package/lib/commonjs/store/apis/upsertMessages.js +8 -0
  52. package/lib/commonjs/store/apis/upsertMessages.js.map +1 -1
  53. package/lib/commonjs/store/mappers/mapMessageToStorable.js +3 -1
  54. package/lib/commonjs/store/mappers/mapMessageToStorable.js.map +1 -1
  55. package/lib/commonjs/store/mappers/mapSharedLocationToStorable.js +28 -0
  56. package/lib/commonjs/store/mappers/mapSharedLocationToStorable.js.map +1 -0
  57. package/lib/commonjs/store/mappers/mapStorableToMessage.js +3 -1
  58. package/lib/commonjs/store/mappers/mapStorableToMessage.js.map +1 -1
  59. package/lib/commonjs/store/mappers/mapStorableToSharedLocation.js +27 -0
  60. package/lib/commonjs/store/mappers/mapStorableToSharedLocation.js.map +1 -0
  61. package/lib/commonjs/store/schema.js +32 -0
  62. package/lib/commonjs/store/schema.js.map +1 -1
  63. package/lib/commonjs/utils/setupCommandUIMiddlewares.js +2 -1
  64. package/lib/commonjs/utils/setupCommandUIMiddlewares.js.map +1 -1
  65. package/lib/commonjs/version.json +1 -1
  66. package/lib/module/components/Channel/Channel.js +3 -1
  67. package/lib/module/components/Channel/Channel.js.map +1 -1
  68. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +2 -0
  69. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  70. package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js +9 -0
  71. package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  72. package/lib/module/components/Message/Message.js +8 -0
  73. package/lib/module/components/Message/Message.js.map +1 -1
  74. package/lib/module/components/Message/MessageSimple/MessageContent.js +13 -0
  75. package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
  76. package/lib/module/components/Reply/Reply.js +1 -1
  77. package/lib/module/components/Reply/Reply.js.map +1 -1
  78. package/lib/module/contexts/index.js +11 -0
  79. package/lib/module/contexts/index.js.map +1 -1
  80. package/lib/module/contexts/liveLocationManagerContext/LiveLocationManagerContext.js +54 -0
  81. package/lib/module/contexts/liveLocationManagerContext/LiveLocationManagerContext.js.map +1 -0
  82. package/lib/module/contexts/liveLocationManagerContext/hooks/useHandleLiveLocationEvents.js +50 -0
  83. package/lib/module/contexts/liveLocationManagerContext/hooks/useHandleLiveLocationEvents.js.map +1 -0
  84. package/lib/module/contexts/liveLocationManagerContext/index.js +26 -0
  85. package/lib/module/contexts/liveLocationManagerContext/index.js.map +1 -0
  86. package/lib/module/contexts/messageInputContext/MessageInputContext.js +0 -3
  87. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  88. package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
  89. package/lib/module/i18n/en.json +11 -0
  90. package/lib/module/i18n/es.json +8 -0
  91. package/lib/module/i18n/fr.json +7 -0
  92. package/lib/module/i18n/he.json +7 -0
  93. package/lib/module/i18n/hi.json +12 -0
  94. package/lib/module/i18n/it.json +7 -0
  95. package/lib/module/i18n/ja.json +13 -0
  96. package/lib/module/i18n/ko.json +13 -0
  97. package/lib/module/i18n/nl.json +12 -0
  98. package/lib/module/i18n/pt-br.json +7 -0
  99. package/lib/module/i18n/ru.json +7 -0
  100. package/lib/module/i18n/tr.json +12 -0
  101. package/lib/module/store/SqliteClient.js +1 -1
  102. package/lib/module/store/apis/deleteMessage.js +0 -3
  103. package/lib/module/store/apis/deleteMessage.js.map +1 -1
  104. package/lib/module/store/apis/getChannelActiveLocations.js +26 -0
  105. package/lib/module/store/apis/getChannelActiveLocations.js.map +1 -0
  106. package/lib/module/store/apis/getChannelMessages.js +12 -0
  107. package/lib/module/store/apis/getChannelMessages.js.map +1 -1
  108. package/lib/module/store/apis/getChannels.js +7 -2
  109. package/lib/module/store/apis/getChannels.js.map +1 -1
  110. package/lib/module/store/apis/queries/selectActiveLocationsForChannels.js +22 -0
  111. package/lib/module/store/apis/queries/selectActiveLocationsForChannels.js.map +1 -0
  112. package/lib/module/store/apis/upsertChannels.js +16 -1
  113. package/lib/module/store/apis/upsertChannels.js.map +1 -1
  114. package/lib/module/store/apis/upsertLocation.js +31 -0
  115. package/lib/module/store/apis/upsertLocation.js.map +1 -0
  116. package/lib/module/store/apis/upsertMessages.js +8 -0
  117. package/lib/module/store/apis/upsertMessages.js.map +1 -1
  118. package/lib/module/store/mappers/mapMessageToStorable.js +3 -1
  119. package/lib/module/store/mappers/mapMessageToStorable.js.map +1 -1
  120. package/lib/module/store/mappers/mapSharedLocationToStorable.js +28 -0
  121. package/lib/module/store/mappers/mapSharedLocationToStorable.js.map +1 -0
  122. package/lib/module/store/mappers/mapStorableToMessage.js +3 -1
  123. package/lib/module/store/mappers/mapStorableToMessage.js.map +1 -1
  124. package/lib/module/store/mappers/mapStorableToSharedLocation.js +27 -0
  125. package/lib/module/store/mappers/mapStorableToSharedLocation.js.map +1 -0
  126. package/lib/module/store/schema.js +32 -0
  127. package/lib/module/store/schema.js.map +1 -1
  128. package/lib/module/utils/setupCommandUIMiddlewares.js +2 -1
  129. package/lib/module/utils/setupCommandUIMiddlewares.js.map +1 -1
  130. package/lib/module/version.json +1 -1
  131. package/lib/typescript/components/Channel/Channel.d.ts +1 -1
  132. package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
  133. package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
  134. package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts.map +1 -1
  135. package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts.map +1 -1
  136. package/lib/typescript/components/Message/Message.d.ts.map +1 -1
  137. package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +1 -1
  138. package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts.map +1 -1
  139. package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
  140. package/lib/typescript/contexts/index.d.ts +1 -0
  141. package/lib/typescript/contexts/index.d.ts.map +1 -1
  142. package/lib/typescript/contexts/liveLocationManagerContext/LiveLocationManagerContext.d.ts +13 -0
  143. package/lib/typescript/contexts/liveLocationManagerContext/LiveLocationManagerContext.d.ts.map +1 -0
  144. package/lib/typescript/contexts/liveLocationManagerContext/hooks/useHandleLiveLocationEvents.d.ts +24 -0
  145. package/lib/typescript/contexts/liveLocationManagerContext/hooks/useHandleLiveLocationEvents.d.ts.map +1 -0
  146. package/lib/typescript/contexts/liveLocationManagerContext/index.d.ts +3 -0
  147. package/lib/typescript/contexts/liveLocationManagerContext/index.d.ts.map +1 -0
  148. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts.map +1 -1
  149. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +5 -1
  150. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts.map +1 -1
  151. package/lib/typescript/i18n/en.json +11 -0
  152. package/lib/typescript/i18n/es.json +8 -0
  153. package/lib/typescript/i18n/fr.json +7 -0
  154. package/lib/typescript/i18n/he.json +7 -0
  155. package/lib/typescript/i18n/hi.json +12 -0
  156. package/lib/typescript/i18n/it.json +7 -0
  157. package/lib/typescript/i18n/ja.json +13 -0
  158. package/lib/typescript/i18n/ko.json +13 -0
  159. package/lib/typescript/i18n/nl.json +12 -0
  160. package/lib/typescript/i18n/pt-br.json +7 -0
  161. package/lib/typescript/i18n/ru.json +7 -0
  162. package/lib/typescript/i18n/tr.json +12 -0
  163. package/lib/typescript/store/OfflineDB.d.ts.map +1 -1
  164. package/lib/typescript/store/apis/deleteMessage.d.ts.map +1 -1
  165. package/lib/typescript/store/apis/getChannelActiveLocations.d.ts +5 -0
  166. package/lib/typescript/store/apis/getChannelActiveLocations.d.ts.map +1 -0
  167. package/lib/typescript/store/apis/getChannelMessages.d.ts.map +1 -1
  168. package/lib/typescript/store/apis/getChannels.d.ts.map +1 -1
  169. package/lib/typescript/store/apis/queries/selectActiveLocationsForChannels.d.ts +3 -0
  170. package/lib/typescript/store/apis/queries/selectActiveLocationsForChannels.d.ts.map +1 -0
  171. package/lib/typescript/store/apis/upsertChannels.d.ts.map +1 -1
  172. package/lib/typescript/store/apis/upsertLocation.d.ts +7 -0
  173. package/lib/typescript/store/apis/upsertLocation.d.ts.map +1 -0
  174. package/lib/typescript/store/apis/upsertMessages.d.ts.map +1 -1
  175. package/lib/typescript/store/mappers/mapMessageToStorable.d.ts.map +1 -1
  176. package/lib/typescript/store/mappers/mapSharedLocationToStorable.d.ts +4 -0
  177. package/lib/typescript/store/mappers/mapSharedLocationToStorable.d.ts.map +1 -0
  178. package/lib/typescript/store/mappers/mapStorableToMessage.d.ts.map +1 -1
  179. package/lib/typescript/store/mappers/mapStorableToSharedLocation.d.ts +4 -0
  180. package/lib/typescript/store/mappers/mapStorableToSharedLocation.d.ts.map +1 -0
  181. package/lib/typescript/store/schema.d.ts +12 -0
  182. package/lib/typescript/store/schema.d.ts.map +1 -1
  183. package/lib/typescript/utils/i18n/Streami18n.d.ts +11 -0
  184. package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
  185. package/lib/typescript/utils/setupCommandUIMiddlewares.d.ts.map +1 -1
  186. package/package.json +1 -1
  187. package/src/components/Channel/Channel.tsx +4 -0
  188. package/src/components/Channel/hooks/useCreateMessagesContext.ts +2 -0
  189. package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +7 -0
  190. package/src/components/Message/Message.tsx +13 -0
  191. package/src/components/Message/MessageSimple/MessageContent.tsx +22 -0
  192. package/src/components/Reply/Reply.tsx +17 -15
  193. package/src/contexts/index.ts +1 -0
  194. package/src/contexts/liveLocationManagerContext/LiveLocationManagerContext.tsx +61 -0
  195. package/src/contexts/liveLocationManagerContext/hooks/useHandleLiveLocationEvents.ts +61 -0
  196. package/src/contexts/liveLocationManagerContext/index.ts +2 -0
  197. package/src/contexts/messageInputContext/MessageInputContext.tsx +1 -4
  198. package/src/contexts/messagesContext/MessagesContext.tsx +7 -1
  199. package/src/i18n/en.json +11 -0
  200. package/src/i18n/es.json +8 -0
  201. package/src/i18n/fr.json +7 -0
  202. package/src/i18n/he.json +7 -0
  203. package/src/i18n/hi.json +12 -0
  204. package/src/i18n/it.json +7 -0
  205. package/src/i18n/ja.json +13 -0
  206. package/src/i18n/ko.json +13 -0
  207. package/src/i18n/nl.json +12 -0
  208. package/src/i18n/pt-br.json +7 -0
  209. package/src/i18n/ru.json +7 -0
  210. package/src/i18n/tr.json +12 -0
  211. package/src/store/SqliteClient.ts +1 -1
  212. package/src/store/apis/deleteMessage.ts +0 -6
  213. package/src/store/apis/getChannelActiveLocations.ts +25 -0
  214. package/src/store/apis/getChannelMessages.ts +13 -0
  215. package/src/store/apis/getChannels.ts +14 -10
  216. package/src/store/apis/queries/selectActiveLocationsForChannels.ts +18 -0
  217. package/src/store/apis/upsertChannels.ts +13 -1
  218. package/src/store/apis/upsertLocation.ts +30 -0
  219. package/src/store/apis/upsertMessages.ts +9 -0
  220. package/src/store/mappers/mapMessageToStorable.ts +2 -0
  221. package/src/store/mappers/mapSharedLocationToStorable.ts +33 -0
  222. package/src/store/mappers/mapStorableToMessage.ts +2 -0
  223. package/src/store/mappers/mapStorableToSharedLocation.ts +29 -0
  224. package/src/store/schema.ts +50 -0
  225. package/src/utils/__tests__/Streami18n.test.js +4 -3
  226. package/src/utils/setupCommandUIMiddlewares.ts +1 -0
  227. package/src/version.json +1 -1
@@ -26,6 +26,8 @@
26
26
  "Device camera is used to take photos or videos.": "A câmera do dispositivo é usada para tirar fotos ou vídeos.",
27
27
  "Device gallery permissions is used to take photos or videos.": "As permissões da galeria do dispositivo são usadas para tirar fotos ou vídeos.",
28
28
  "Do you want to send a copy of this message to a moderator for further investigation?": "Deseja enviar uma cópia desta mensagem para um moderador para investigação adicional?",
29
+ "Due since {{ dueSince }}": "Vencido desde {{ dueSince }}",
30
+ "Due {{ timeLeft }}": "Vencido {{ timeLeft }}",
29
31
  "Edit Message": "Editar Mensagem",
30
32
  "Edited": "Editado",
31
33
  "Editing Message": "Editando Mensagem",
@@ -52,6 +54,7 @@
52
54
  "Loading messages...": "Carregando mensagens...",
53
55
  "Loading threads...": "Carregando tópicos...",
54
56
  "Loading...": "Carregando...",
57
+ "Location": "Localização",
55
58
  "Mark as Unread": "Marcar como não lido",
56
59
  "Maximum number of files reached": "Número máximo de arquivos atingido",
57
60
  "Maximum votes per person": "Máximo de votos por pessoa",
@@ -125,6 +128,9 @@
125
128
  "Vote ended": "Votação encerrada",
126
129
  "You": "Você",
127
130
  "You can't send messages in this channel": "Você não pode enviar mensagens neste canal",
131
+ "duration/Location end at": "{{ milliseconds | durationFormatter(withSuffix: false) }}",
132
+ "duration/Message reminder": "{{ milliseconds | durationFormatter(withSuffix: true) }}",
133
+ "duration/Remind Me": "{{ milliseconds | durationFormatter(withSuffix: true) }}",
128
134
  "replied to": "respondeu a",
129
135
  "timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Ontem]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Amanhã]\",\"nextWeek\":\"dddd [às] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
130
136
  "timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
@@ -133,6 +139,7 @@
133
139
  "timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
134
140
  "timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
135
141
  "timestamp/PollVote": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Ontem]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Amanhã]\",\"nextWeek\":\"dddd [às] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
142
+ "timestamp/ReminderNotification": "{{ timestamp | timestampFormatter(calendar: true) }}",
136
143
  "timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
137
144
  "timestamp/ThreadListItem": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Ontem]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Amanhã]\",\"nextWeek\":\"dddd [às] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
138
145
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} e mais {{ nonSelfUserLength }} pessoa(s) estão digitando",
package/src/i18n/ru.json CHANGED
@@ -27,6 +27,8 @@
27
27
  "Device camera is used to take photos or videos.": "Камера устройства используется для съемки фотографий или видео.",
28
28
  "Device gallery permissions is used to take photos or videos.": "Разрешения галереи устройства используются для съемки фото или видео.",
29
29
  "Do you want to send a copy of this message to a moderator for further investigation?": "Вы хотите отправить копию этого сообщения модератору для дальнейшего изучения?",
30
+ "Due since {{ dueSince }}": "Срок с {{ dueSince }}",
31
+ "Due {{ timeLeft }}": "Срок {{ timeLeft }}",
30
32
  "Edit Message": "Редактировать сообщение",
31
33
  "Edited": "Отредактировано",
32
34
  "Editing Message": "Редактирование сообщения",
@@ -53,6 +55,7 @@
53
55
  "Loading messages...": "Загружаю сообщения...",
54
56
  "Loading threads...": "Загрузка потоков...",
55
57
  "Loading...": "Загружаю...",
58
+ "Location": "Местоположение",
56
59
  "Mark as Unread": "Отметить как непрочитанное",
57
60
  "Maximum number of files reached": "Достигнуто максимальное количество файлов",
58
61
  "Maximum votes per person": "Максимальное количество голосов на человека",
@@ -129,6 +132,9 @@
129
132
  "Vote ended": "Голосование завершено",
130
133
  "You": "Вы",
131
134
  "You can't send messages in this channel": "Вы не можете отправлять сообщения в этот канал",
135
+ "duration/Location end at": "{{ milliseconds | durationFormatter(withSuffix: false) }}",
136
+ "duration/Message reminder": "{{ milliseconds | durationFormatter(withSuffix: true) }}",
137
+ "duration/Remind Me": "{{ milliseconds | durationFormatter(withSuffix: true) }}",
132
138
  "replied to": "ответил на",
133
139
  "timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Вчера]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Завтра]\",\"nextWeek\":\"dddd [в] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
134
140
  "timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
@@ -137,6 +143,7 @@
137
143
  "timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
138
144
  "timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
139
145
  "timestamp/PollVote": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Вчера]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Завтра]\",\"nextWeek\":\"dddd [в] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
146
+ "timestamp/ReminderNotification": "{{ timestamp | timestampFormatter(calendar: true) }}",
140
147
  "timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
141
148
  "timestamp/ThreadListItem": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Вчера]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Завтра]\",\"nextWeek\":\"dddd [в] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
142
149
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
package/src/i18n/tr.json CHANGED
@@ -1,4 +1,5 @@
1
1
  {
2
+ "+{{count}}_many": "+{{count}}",
2
3
  "+{{count}}_one": "+{{count}}",
3
4
  "+{{count}}_other": "+{{count}}",
4
5
  "1 Reply": "1 Cevap",
@@ -25,6 +26,8 @@
25
26
  "Device camera is used to take photos or videos.": "Cihaz kamerası fotoğraf veya video çekmek için kullanılır.",
26
27
  "Device gallery permissions is used to take photos or videos.": "Cihaz galerisi izinleri fotoğraf veya video çekmek için kullanılır.",
27
28
  "Do you want to send a copy of this message to a moderator for further investigation?": "Detaylı inceleme için bu mesajın kopyasını moderatöre göndermek istiyor musunuz?",
29
+ "Due since {{ dueSince }}": "Son tarihi {{ dueSince }} itibarıyla geçmiştir.",
30
+ "Due {{ timeLeft }}": "Son tarihi {{ timeLeft }}'dir.",
28
31
  "Edit Message": "Mesajı Düzenle",
29
32
  "Edited": "Düzenlendi",
30
33
  "Editing Message": "Mesaj Düzenleniyor",
@@ -51,6 +54,7 @@
51
54
  "Loading messages...": "Mesajlar yükleniyor...",
52
55
  "Loading threads...": "Akışlar yükleniyor...",
53
56
  "Loading...": "Yükleniyor...",
57
+ "Location": "Konum",
54
58
  "Mark as Unread": "Okunmamış olarak işaretle",
55
59
  "Maximum number of files reached": "Maksimum dosya sayısına ulaşıldı",
56
60
  "Maximum votes per person": "Kişi başına maksimum oy",
@@ -86,11 +90,13 @@
86
90
  "Resend": "Yeniden gönder",
87
91
  "SEND": "GÖNDER",
88
92
  "Search": "Ara",
93
+ "See all {{count}} options_many": "Tüm {{count}} seçeneklerini gör",
89
94
  "See all {{count}} options_one": "Tüm {{count}} seçeneği gör",
90
95
  "See all {{count}} options_other": "Tüm {{count}} seçeneği gör",
91
96
  "Select More Photos": "Daha Fazla Fotoğraf Seçin",
92
97
  "Select one": "Birini seç",
93
98
  "Select one or more": "Bir veya daha fazlasını seç",
99
+ "Select up to {{count}}_many": "Seçenekleri {{count}} kadar seç",
94
100
  "Select up to {{count}}_one": "{{count}} kadar seç",
95
101
  "Select up to {{count}}_other": "{{count}} kadar seç",
96
102
  "Send Anyway": "Yine de Gönder",
@@ -115,12 +121,16 @@
115
121
  "Update your comment": "Yorumunu güncelle",
116
122
  "Video": "Video",
117
123
  "View Results": "Sonuçları görüntüle",
124
+ "View {{count}} comments_many": "Tüm {{count}} yorumları görüntüle",
118
125
  "View {{count}} comments_one": "{{count}} yorumu görüntüle",
119
126
  "View {{count}} comments_other": "{{count}} yorumu görüntüle",
120
127
  "Voice message": "Sesli mesaj",
121
128
  "Vote ended": "Oylama sona erdi",
122
129
  "You": "Sen",
123
130
  "You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
131
+ "duration/Location end at": "{{ milliseconds | durationFormatter(withSuffix: false) }}",
132
+ "duration/Message reminder": "{{ milliseconds | durationFormatter(withSuffix: true) }}",
133
+ "duration/Remind Me": "{{ milliseconds | durationFormatter(withSuffix: true) }}",
124
134
  "replied to": "yanıtladı",
125
135
  "timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Dün]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Yarın]\",\"nextWeek\":\"dddd [saat] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
126
136
  "timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
@@ -129,6 +139,7 @@
129
139
  "timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
130
140
  "timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
131
141
  "timestamp/PollVote": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Dün]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Yarın]\",\"nextWeek\":\"dddd [saat] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
142
+ "timestamp/ReminderNotification": "{{ timestamp | timestampFormatter(calendar: true) }}",
132
143
  "timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
133
144
  "timestamp/ThreadListItem": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Dün]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Yarın]\",\"nextWeek\":\"dddd [saat] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
134
145
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
@@ -136,6 +147,7 @@
136
147
  "{{ replyCount }} Replies": "{{ replyCount }} Cevap",
137
148
  "{{ replyCount }} Thread Replies": "{{responseCount}} Konu Cevapı",
138
149
  "{{ user }} is typing": "{{ user }} yazıyor",
150
+ "{{count}} votes_many": "{{count}} oy",
139
151
  "{{count}} votes_one": "{{count}} oy",
140
152
  "{{count}} votes_other": "{{count}} oy",
141
153
  "🏙 Attachment...": "🏙 Ek..."
@@ -28,7 +28,7 @@ import type { PreparedBatchQueries, PreparedQueries, Scalar, Table } from './typ
28
28
  * This way usage @op-engineering/op-sqlite package is scoped to a single class/file.
29
29
  */
30
30
  export class SqliteClient {
31
- static dbVersion = 12;
31
+ static dbVersion = 13;
32
32
 
33
33
  static dbName = DB_NAME;
34
34
  static dbLocation = DB_LOCATION;
@@ -4,12 +4,6 @@ import { SqliteClient } from '../SqliteClient';
4
4
  export const deleteMessage = async ({ execute = true, id }: { id: string; execute?: boolean }) => {
5
5
  const queries = [];
6
6
 
7
- queries.push(
8
- createDeleteQuery('reactions', {
9
- messageId: id,
10
- }),
11
- );
12
-
13
7
  queries.push(
14
8
  createDeleteQuery('messages', {
15
9
  id,
@@ -0,0 +1,25 @@
1
+ import { SharedLocationResponse } from 'stream-chat';
2
+
3
+ import { selectActiveLocationsForChannels } from './queries/selectActiveLocationsForChannels';
4
+
5
+ import { mapStorableToSharedLocation } from '../mappers/mapStorableToSharedLocation';
6
+
7
+ export const getChannelActiveLocations = async ({
8
+ channelIds,
9
+ }: {
10
+ channelIds: string[];
11
+ }): Promise<Record<string, SharedLocationResponse[]>> => {
12
+ const cidVsLiveLocations: Record<string, SharedLocationResponse[]> = {};
13
+
14
+ // Query to select active live locations for the given channel ids where the end_at is not empty and it is greater than the current date.
15
+ const locations = await selectActiveLocationsForChannels(channelIds);
16
+
17
+ locations.forEach((location) => {
18
+ if (!cidVsLiveLocations[location.channelCid]) {
19
+ cidVsLiveLocations[location.channelCid] = [];
20
+ }
21
+ cidVsLiveLocations[location.channelCid].push(mapStorableToSharedLocation(location));
22
+ });
23
+
24
+ return cidVsLiveLocations;
25
+ };
@@ -62,6 +62,19 @@ export const getChannelMessages = async ({
62
62
  messageIdsVsReminders[reminder.messageId] = reminder;
63
63
  });
64
64
 
65
+ const messagesWithSharedLocations = messageRows.filter((message) => !!message.shared_location);
66
+ const messageIdsVsLocations: Record<string, TableRow<'locations'>> = {};
67
+ const sharedLocationRows = (await SqliteClient.executeSql.apply(
68
+ null,
69
+ createSelectQuery('locations', ['*'], {
70
+ messageId: messagesWithSharedLocations.map((message) => message.id),
71
+ }),
72
+ )) as unknown as TableRow<'locations'>[];
73
+
74
+ sharedLocationRows.forEach((location) => {
75
+ messageIdsVsLocations[location.messageId] = location;
76
+ });
77
+
65
78
  // Populate the messages.
66
79
  const cidVsMessages: Record<string, MessageResponse[]> = {};
67
80
  messageRows.forEach((m) => {
@@ -1,5 +1,6 @@
1
1
  import type { ChannelAPIResponse } from 'stream-chat';
2
2
 
3
+ import { getChannelActiveLocations } from './getChannelActiveLocations';
3
4
  import { getChannelMessages } from './getChannelMessages';
4
5
  import { getDraftForChannels } from './getDraftsForChannels';
5
6
  import { getMembers } from './getMembers';
@@ -27,20 +28,23 @@ export const getChannels = async ({
27
28
  }): Promise<Omit<ChannelAPIResponse, 'duration'>[]> => {
28
29
  SqliteClient.logger?.('info', 'getChannels', { channelIds, currentUserId });
29
30
 
30
- const [channels, cidVsDraft, cidVsMembers, cidVsReads, cidVsMessages] = await Promise.all([
31
- selectChannels({ channelIds }),
32
- getDraftForChannels({ channelIds, currentUserId }),
33
- getMembers({ channelIds }),
34
- getReads({ channelIds }),
35
- getChannelMessages({
36
- channelIds,
37
- currentUserId,
38
- }),
39
- ]);
31
+ const [channels, cidVsDraft, cidVsMembers, cidVsReads, cidVsMessages, cidVsActiveLocations] =
32
+ await Promise.all([
33
+ selectChannels({ channelIds }),
34
+ getDraftForChannels({ channelIds, currentUserId }),
35
+ getMembers({ channelIds }),
36
+ getReads({ channelIds }),
37
+ getChannelMessages({
38
+ channelIds,
39
+ currentUserId,
40
+ }),
41
+ getChannelActiveLocations({ channelIds }),
42
+ ]);
40
43
 
41
44
  // Enrich the channels with state
42
45
  return channels.map((c) => ({
43
46
  ...mapStorableToChannel(c),
47
+ active_live_locations: cidVsActiveLocations[c.cid] || [],
44
48
  draft: cidVsDraft[c.cid],
45
49
  members: cidVsMembers[c.cid] || [],
46
50
  membership: (cidVsMembers[c.cid] || []).find((member) => member.user_id === currentUserId),
@@ -0,0 +1,18 @@
1
+ import { TableRow } from '../../../store/types';
2
+ import { SqliteClient } from '../../SqliteClient';
3
+
4
+ export const selectActiveLocationsForChannels = async (
5
+ cids: string[],
6
+ ): Promise<TableRow<'locations'>[]> => {
7
+ const questionMarks = Array(cids.length).fill('?').join(',');
8
+ SqliteClient.logger?.('info', 'selectActiveLocationsForChannels', {
9
+ cids,
10
+ });
11
+ // Query to select active live locations for the given channel ids where the end_at is not empty and it is greater than the current date.
12
+ const locations = await SqliteClient.executeSql(
13
+ `SELECT * FROM locations WHERE channelCid IN (${questionMarks}) AND endAt IS NOT NULL AND endAt > ?`,
14
+ [...cids, new Date().toISOString()],
15
+ );
16
+
17
+ return locations as unknown as TableRow<'locations'>[];
18
+ };
@@ -1,6 +1,7 @@
1
1
  import type { ChannelAPIResponse, ChannelMemberResponse } from 'stream-chat';
2
2
 
3
3
  import { upsertDraft } from './upsertDraft';
4
+ import { upsertLocation } from './upsertLocation';
4
5
  import { upsertMembers } from './upsertMembers';
5
6
 
6
7
  import { upsertMessages } from './upsertMessages';
@@ -32,7 +33,7 @@ export const upsertChannels = async ({
32
33
  for (const channel of channels) {
33
34
  queries.push(createUpsertQuery('channels', mapChannelDataToStorable(channel.channel)));
34
35
 
35
- const { draft, members, membership, messages, read } = channel;
36
+ const { active_live_locations, draft, members, membership, messages, read } = channel;
36
37
  if (
37
38
  membership &&
38
39
  !members.includes((m: ChannelMemberResponse) => m.user?.id === membership.user?.id)
@@ -40,6 +41,17 @@ export const upsertChannels = async ({
40
41
  members.push({ ...membership, user_id: membership.user?.id });
41
42
  }
42
43
 
44
+ if (active_live_locations && active_live_locations.length > 0) {
45
+ active_live_locations.forEach(async (location) => {
46
+ queries = queries.concat(
47
+ await upsertLocation({
48
+ execute: false,
49
+ location,
50
+ }),
51
+ );
52
+ });
53
+ }
54
+
43
55
  if (draft) {
44
56
  queries = queries.concat(await upsertDraft({ draft, execute: false }));
45
57
  }
@@ -0,0 +1,30 @@
1
+ import type { SharedLocationResponse } from 'stream-chat';
2
+
3
+ import { mapSharedLocationToStorable } from '../mappers/mapSharedLocationToStorable';
4
+ import { createUpsertQuery } from '../sqlite-utils/createUpsertQuery';
5
+ import { SqliteClient } from '../SqliteClient';
6
+ import type { PreparedQueries } from '../types';
7
+
8
+ export const upsertLocation = async ({
9
+ execute = true,
10
+ location,
11
+ }: {
12
+ location: SharedLocationResponse;
13
+ execute?: boolean;
14
+ }) => {
15
+ const queries: PreparedQueries[] = [];
16
+
17
+ queries.push(createUpsertQuery('locations', mapSharedLocationToStorable(location)));
18
+
19
+ SqliteClient.logger?.('info', 'upsertLocation', {
20
+ cid: location.channel_cid,
21
+ execute,
22
+ location,
23
+ });
24
+
25
+ if (execute) {
26
+ await SqliteClient.executeSqlBatch(queries);
27
+ }
28
+
29
+ return queries;
30
+ };
@@ -4,6 +4,7 @@ import { mapMessageToStorable } from '../mappers/mapMessageToStorable';
4
4
  import { mapPollToStorable } from '../mappers/mapPollToStorable';
5
5
  import { mapReactionToStorable } from '../mappers/mapReactionToStorable';
6
6
  import { mapReminderToStorable } from '../mappers/mapReminderToStorable';
7
+ import { mapSharedLocationToStorable } from '../mappers/mapSharedLocationToStorable';
7
8
  import { mapUserToStorable } from '../mappers/mapUserToStorable';
8
9
  import { createUpsertQuery } from '../sqlite-utils/createUpsertQuery';
9
10
  import { SqliteClient } from '../SqliteClient';
@@ -20,6 +21,7 @@ export const upsertMessages = async ({
20
21
  const storableReactions: Array<ReturnType<typeof mapReactionToStorable>> = [];
21
22
  const storablePolls: Array<ReturnType<typeof mapPollToStorable>> = [];
22
23
  const storableReminders: Array<ReturnType<typeof mapReminderToStorable>> = [];
24
+ const storableLocations: Array<ReturnType<typeof mapSharedLocationToStorable>> = [];
23
25
 
24
26
  messages?.forEach((message: MessageResponse | LocalMessage) => {
25
27
  storableMessages.push(mapMessageToStorable(message));
@@ -38,6 +40,9 @@ export const upsertMessages = async ({
38
40
  if (message.reminder) {
39
41
  storableReminders.push(mapReminderToStorable(message.reminder));
40
42
  }
43
+ if (message.shared_location) {
44
+ storableLocations.push(mapSharedLocationToStorable(message.shared_location));
45
+ }
41
46
  });
42
47
 
43
48
  const finalQueries = [
@@ -50,10 +55,14 @@ export const upsertMessages = async ({
50
55
  ...storableReminders.map((storableReminder) =>
51
56
  createUpsertQuery('reminders', storableReminder),
52
57
  ),
58
+ ...storableLocations.map((storableLocation) =>
59
+ createUpsertQuery('locations', storableLocation),
60
+ ),
53
61
  ];
54
62
 
55
63
  SqliteClient.logger?.('info', 'upsertMessages', {
56
64
  execute,
65
+ locations: storableLocations,
57
66
  messages: storableMessages,
58
67
  polls: storablePolls,
59
68
  reactions: storableReactions,
@@ -24,6 +24,7 @@ export const mapMessageToStorable = (
24
24
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
25
25
  reminder,
26
26
  reaction_groups,
27
+ shared_location,
27
28
  text,
28
29
  type,
29
30
  updated_at,
@@ -41,6 +42,7 @@ export const mapMessageToStorable = (
41
42
  messageTextUpdatedAt: mapDateTimeToStorable(message_text_updated_at),
42
43
  poll_id: poll_id || '',
43
44
  reactionGroups: JSON.stringify(reaction_groups),
45
+ shared_location: JSON.stringify(shared_location),
44
46
  text,
45
47
  type,
46
48
  updatedAt: mapDateTimeToStorable(updated_at),
@@ -0,0 +1,33 @@
1
+ import type { SharedLocationResponse } from 'stream-chat';
2
+
3
+ import { mapDateTimeToStorable } from './mapDateTimeToStorable';
4
+
5
+ import type { TableRow } from '../types';
6
+
7
+ export const mapSharedLocationToStorable = (
8
+ location: SharedLocationResponse,
9
+ ): TableRow<'locations'> => {
10
+ const {
11
+ channel_cid,
12
+ created_at,
13
+ created_by_device_id,
14
+ end_at,
15
+ latitude,
16
+ longitude,
17
+ message_id,
18
+ updated_at,
19
+ user_id,
20
+ } = location;
21
+
22
+ return {
23
+ channelCid: channel_cid,
24
+ createdAt: mapDateTimeToStorable(created_at),
25
+ createdByDeviceId: created_by_device_id,
26
+ endAt: mapDateTimeToStorable(end_at),
27
+ latitude,
28
+ longitude,
29
+ messageId: message_id,
30
+ updatedAt: mapDateTimeToStorable(updated_at),
31
+ userId: user_id,
32
+ };
33
+ };
@@ -28,6 +28,7 @@ export const mapStorableToMessage = ({
28
28
  messageTextUpdatedAt,
29
29
  poll_id,
30
30
  reactionGroups,
31
+ shared_location,
31
32
  updatedAt,
32
33
  user,
33
34
  ...rest
@@ -46,6 +47,7 @@ export const mapStorableToMessage = ({
46
47
  own_reactions: ownReactions,
47
48
  poll_id,
48
49
  reaction_groups: reactionGroups ? JSON.parse(reactionGroups) : {},
50
+ shared_location: shared_location ? JSON.parse(shared_location) : null,
49
51
  updated_at: updatedAt,
50
52
  user: mapStorableToUser(user),
51
53
  ...(pollRow ? { poll: mapStorableToPoll(pollRow) } : {}),
@@ -0,0 +1,29 @@
1
+ import { SharedLocationResponse } from 'stream-chat';
2
+
3
+ import type { TableRow } from '../types';
4
+
5
+ export const mapStorableToSharedLocation = (row: TableRow<'locations'>): SharedLocationResponse => {
6
+ const {
7
+ channelCid,
8
+ createdAt,
9
+ createdByDeviceId,
10
+ endAt,
11
+ latitude,
12
+ longitude,
13
+ messageId,
14
+ updatedAt,
15
+ userId,
16
+ } = row;
17
+
18
+ return {
19
+ channel_cid: channelCid,
20
+ created_at: createdAt,
21
+ created_by_device_id: createdByDeviceId,
22
+ end_at: endAt,
23
+ latitude,
24
+ longitude,
25
+ message_id: messageId,
26
+ updated_at: updatedAt,
27
+ user_id: userId,
28
+ };
29
+ };
@@ -101,6 +101,35 @@ export const tables: Tables = {
101
101
  },
102
102
  primaryKey: ['id'],
103
103
  },
104
+ locations: {
105
+ columns: {
106
+ channelCid: 'TEXT NOT NULL',
107
+ createdAt: 'TEXT',
108
+ createdByDeviceId: 'TEXT',
109
+ endAt: 'TEXT',
110
+ latitude: 'REAL NOT NULL',
111
+ longitude: 'REAL NOT NULL',
112
+ messageId: 'TEXT NOT NULL',
113
+ updatedAt: 'TEXT',
114
+ userId: 'TEXT NOT NULL',
115
+ },
116
+ foreignKeys: [
117
+ {
118
+ column: 'messageId',
119
+ onDeleteAction: 'CASCADE',
120
+ referenceTable: 'messages',
121
+ referenceTableColumn: 'id',
122
+ },
123
+ ],
124
+ indexes: [
125
+ {
126
+ columns: ['channelCid', 'messageId'],
127
+ name: 'index_locations',
128
+ unique: false,
129
+ },
130
+ ],
131
+ primaryKey: ['channelCid', 'messageId'],
132
+ },
104
133
  members: {
105
134
  columns: {
106
135
  archivedAt: 'TEXT',
@@ -146,6 +175,7 @@ export const tables: Tables = {
146
175
  messageTextUpdatedAt: 'TEXT',
147
176
  poll_id: 'TEXT',
148
177
  reactionGroups: 'TEXT',
178
+ shared_location: 'TEXT',
149
179
  text: "TEXT DEFAULT ''",
150
180
  type: 'TEXT',
151
181
  updatedAt: 'TEXT',
@@ -258,6 +288,14 @@ export const tables: Tables = {
258
288
  updatedAt: 'TEXT',
259
289
  userId: 'TEXT NOT NULL',
260
290
  },
291
+ foreignKeys: [
292
+ {
293
+ column: 'messageId',
294
+ onDeleteAction: 'CASCADE',
295
+ referenceTable: 'messages',
296
+ referenceTableColumn: 'id',
297
+ },
298
+ ],
261
299
  indexes: [
262
300
  {
263
301
  columns: ['messageId'],
@@ -375,6 +413,7 @@ export type Schema = {
375
413
  messageTextUpdatedAt: string;
376
414
  poll_id: string;
377
415
  reactionGroups: string;
416
+ shared_location: string;
378
417
  type: MessageLabel;
379
418
  updatedAt: string;
380
419
  text?: string;
@@ -436,6 +475,17 @@ export type Schema = {
436
475
  userId: string;
437
476
  remindAt?: string;
438
477
  };
478
+ locations: {
479
+ channelCid: string;
480
+ createdAt: string;
481
+ createdByDeviceId: string;
482
+ endAt?: string;
483
+ latitude: number;
484
+ longitude: number;
485
+ messageId: string;
486
+ updatedAt: string;
487
+ userId: string;
488
+ };
439
489
  users: {
440
490
  id: string;
441
491
  banned?: boolean;
@@ -50,7 +50,7 @@ describe('Streami18n instance - with built-in language', () => {
50
50
  it('should provide dutch translator', async () => {
51
51
  const { t: _t } = await streami18n.getTranslators();
52
52
  for (const key in nlTranslations) {
53
- if (key.indexOf('{{') > -1 && key.indexOf('}}') > -1) {
53
+ if ((key.indexOf('{{') > -1 && key.indexOf('}}') > -1) || key.indexOf('duration/') > -1) {
54
54
  continue;
55
55
  }
56
56
 
@@ -74,7 +74,7 @@ describe('Streami18n instance - with built-in language', () => {
74
74
  it('should provide dutch translator', async () => {
75
75
  const { t: _t } = await streami18n.getTranslators();
76
76
  for (const key in nlTranslations) {
77
- if (key.indexOf('{{') > -1 && key.indexOf('}}') > -1) {
77
+ if ((key.indexOf('{{') > -1 && key.indexOf('}}') > -1) || key.indexOf('duration/') > -1) {
78
78
  continue;
79
79
  }
80
80
 
@@ -188,7 +188,8 @@ describe('setLanguage - switch to french', () => {
188
188
 
189
189
  const { t: _t } = await streami18n.getTranslators();
190
190
  for (const key in frTranslations) {
191
- if (key.indexOf('{{') > -1 && key.indexOf('}}') > -1) {
191
+ // Skip keys with template strings or duration keys
192
+ if ((key.indexOf('{{') > -1 && key.indexOf('}}') > -1) || key.indexOf('duration/') > -1) {
192
193
  continue;
193
194
  }
194
195
 
@@ -11,6 +11,7 @@ export const setupCommandUIMiddlewares = (messageComposer: MessageComposer) => {
11
11
  messageComposer.compositionMiddlewareExecutor.insert({
12
12
  middleware: [createCommandInjectionMiddleware(messageComposer)],
13
13
  position: { after: 'stream-io/message-composer-middleware/attachments' },
14
+ unique: true,
14
15
  });
15
16
 
16
17
  messageComposer.draftCompositionMiddlewareExecutor.insert({
package/src/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "8.2.0"
2
+ "version": "8.3.0-beta.2"
3
3
  }