stream-chat-react-native-core 5.27.0-beta.8 → 5.27.0

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 (97) hide show
  1. package/lib/commonjs/components/Attachment/Gallery.js +4 -4
  2. package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
  3. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +1 -1
  4. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  5. package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js +100 -37
  6. package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
  7. package/lib/commonjs/components/Chat/hooks/useSyncDatabase.js +3 -1
  8. package/lib/commonjs/components/Chat/hooks/useSyncDatabase.js.map +1 -1
  9. package/lib/commonjs/components/ImageGallery/ImageGallery.js +39 -21
  10. package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
  11. package/lib/commonjs/components/MessageList/MessageList.js +22 -21
  12. package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
  13. package/lib/commonjs/i18n/es.json +17 -17
  14. package/lib/commonjs/i18n/fr.json +17 -17
  15. package/lib/commonjs/i18n/he.json +17 -17
  16. package/lib/commonjs/i18n/hi.json +17 -17
  17. package/lib/commonjs/i18n/it.json +17 -17
  18. package/lib/commonjs/i18n/ja.json +17 -17
  19. package/lib/commonjs/i18n/ko.json +17 -17
  20. package/lib/commonjs/i18n/nl.json +17 -17
  21. package/lib/commonjs/i18n/pt-BR.json +17 -17
  22. package/lib/commonjs/i18n/ru.json +17 -17
  23. package/lib/commonjs/i18n/tr.json +17 -17
  24. package/lib/commonjs/store/apis/upsertChannelDataFromChannel.js +21 -0
  25. package/lib/commonjs/store/apis/upsertChannelDataFromChannel.js.map +1 -0
  26. package/lib/commonjs/store/mappers/mapChannelToStorable.js +63 -0
  27. package/lib/commonjs/store/mappers/mapChannelToStorable.js.map +1 -0
  28. package/lib/commonjs/utils/DBSyncManager.js +73 -68
  29. package/lib/commonjs/utils/DBSyncManager.js.map +1 -1
  30. package/lib/commonjs/version.json +1 -1
  31. package/lib/module/components/Attachment/Gallery.js +4 -4
  32. package/lib/module/components/Attachment/Gallery.js.map +1 -1
  33. package/lib/module/components/AttachmentPicker/AttachmentPicker.js +1 -1
  34. package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  35. package/lib/module/components/Chat/hooks/handleEventToSyncDB.js +100 -37
  36. package/lib/module/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
  37. package/lib/module/components/Chat/hooks/useSyncDatabase.js +3 -1
  38. package/lib/module/components/Chat/hooks/useSyncDatabase.js.map +1 -1
  39. package/lib/module/components/ImageGallery/ImageGallery.js +39 -21
  40. package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
  41. package/lib/module/components/MessageList/MessageList.js +22 -21
  42. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  43. package/lib/module/i18n/es.json +17 -17
  44. package/lib/module/i18n/fr.json +17 -17
  45. package/lib/module/i18n/he.json +17 -17
  46. package/lib/module/i18n/hi.json +17 -17
  47. package/lib/module/i18n/it.json +17 -17
  48. package/lib/module/i18n/ja.json +17 -17
  49. package/lib/module/i18n/ko.json +17 -17
  50. package/lib/module/i18n/nl.json +17 -17
  51. package/lib/module/i18n/pt-BR.json +17 -17
  52. package/lib/module/i18n/ru.json +17 -17
  53. package/lib/module/i18n/tr.json +17 -17
  54. package/lib/module/store/apis/upsertChannelDataFromChannel.js +21 -0
  55. package/lib/module/store/apis/upsertChannelDataFromChannel.js.map +1 -0
  56. package/lib/module/store/mappers/mapChannelToStorable.js +63 -0
  57. package/lib/module/store/mappers/mapChannelToStorable.js.map +1 -0
  58. package/lib/module/utils/DBSyncManager.js +73 -68
  59. package/lib/module/utils/DBSyncManager.js.map +1 -1
  60. package/lib/module/version.json +1 -1
  61. package/lib/typescript/components/Chat/hooks/handleEventToSyncDB.d.ts +4 -2
  62. package/lib/typescript/i18n/es.json +17 -17
  63. package/lib/typescript/i18n/fr.json +17 -17
  64. package/lib/typescript/i18n/he.json +17 -17
  65. package/lib/typescript/i18n/hi.json +17 -17
  66. package/lib/typescript/i18n/it.json +17 -17
  67. package/lib/typescript/i18n/ja.json +17 -17
  68. package/lib/typescript/i18n/ko.json +17 -17
  69. package/lib/typescript/i18n/nl.json +17 -17
  70. package/lib/typescript/i18n/pt-BR.json +17 -17
  71. package/lib/typescript/i18n/ru.json +17 -17
  72. package/lib/typescript/i18n/tr.json +17 -17
  73. package/lib/typescript/store/apis/upsertChannelDataFromChannel.d.ts +6 -0
  74. package/lib/typescript/store/mappers/mapChannelToStorable.d.ts +4 -0
  75. package/lib/typescript/utils/DBSyncManager.d.ts +1 -1
  76. package/package.json +1 -1
  77. package/src/components/Attachment/Gallery.tsx +5 -5
  78. package/src/components/AttachmentPicker/AttachmentPicker.tsx +1 -1
  79. package/src/components/Chat/hooks/handleEventToSyncDB.ts +132 -46
  80. package/src/components/Chat/hooks/useSyncDatabase.ts +1 -1
  81. package/src/components/ImageGallery/ImageGallery.tsx +25 -2
  82. package/src/components/MessageList/MessageList.tsx +4 -2
  83. package/src/i18n/es.json +17 -17
  84. package/src/i18n/fr.json +17 -17
  85. package/src/i18n/he.json +17 -17
  86. package/src/i18n/hi.json +17 -17
  87. package/src/i18n/it.json +17 -17
  88. package/src/i18n/ja.json +17 -17
  89. package/src/i18n/ko.json +17 -17
  90. package/src/i18n/nl.json +17 -17
  91. package/src/i18n/pt-BR.json +17 -17
  92. package/src/i18n/ru.json +17 -17
  93. package/src/i18n/tr.json +17 -17
  94. package/src/store/apis/upsertChannelDataFromChannel.ts +25 -0
  95. package/src/store/mappers/mapChannelToStorable.ts +68 -0
  96. package/src/utils/DBSyncManager.ts +7 -3
  97. package/src/version.json +1 -1
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "1 Reply": "1 Antwoord",
3
- "1 Thread Reply": "",
4
- "Allow access to your Gallery": "",
5
- "Allow camera access in device settings": "",
3
+ "1 Thread Reply": "1 thread antwoord",
4
+ "Allow access to your Gallery": "Geef toegang tot uw galerij",
5
+ "Allow camera access in device settings": "Sta cameratoegang toe in de apparaatinstellingen",
6
6
  "Also send to channel": "Stuur ook naar kanaal",
7
7
  "Are you sure you want to permanently delete this message?": "Weet u zeker dat u dit bericht definitief wilt verwijderen?",
8
8
  "Are you sure?": "Weet je het zeker?",
@@ -13,10 +13,10 @@
13
13
  "Copy Message": "Bericht kopiëren",
14
14
  "Delete": "Verwijderen",
15
15
  "Delete Message": "Verwijder bericht",
16
- "Device camera is used to take photos or videos.": "",
16
+ "Device camera is used to take photos or videos.": "De camera van het apparaat wordt gebruikt om foto's of video's te maken.",
17
17
  "Do you want to send a copy of this message to a moderator for further investigation?": "Wil je een kopie van dit bericht naar een moderator sturen voor verder onderzoek?",
18
18
  "Edit Message": "Pas bericht aan",
19
- "Editing Message": "",
19
+ "Editing Message": "Bericht aanpassen",
20
20
  "Emoji matching": "Emoji-overeenkomsten",
21
21
  "Empty message...": "Leeg bericht...",
22
22
  "Error loading": "Probleem bij het laden",
@@ -39,23 +39,23 @@
39
39
  "Message deleted": "Bericht verwijderd",
40
40
  "Message flagged": "Bericht gemarkeerd",
41
41
  "Mute User": "Gebruiker dempen",
42
- "Not supported": "",
42
+ "Not supported": "niet ondersteund",
43
43
  "Nothing yet...": "Nog niets...",
44
44
  "Ok": "Oké",
45
- "Only visible to you": "",
46
- "Open Settings": "",
45
+ "Only visible to you": "Alleen zichtbaar voor jou",
46
+ "Open Settings": "Open instellingen",
47
47
  "Photo": "Foto",
48
- "Photos and Videos": "",
48
+ "Photos and Videos": "Foto's en video's",
49
49
  "Pin to Conversation": "Vastmaken aan gesprek",
50
- "Pinned by": "",
51
- "Please enable access to your photos and videos so you can share them.": "",
50
+ "Pinned by": "Vastgemaakt door",
51
+ "Please enable access to your photos and videos so you can share them.": "Schakel toegang tot uw foto's en video's in zodat u ze kunt delen.",
52
52
  "Please select a channel first": "Selecteer eerst een kanaal",
53
53
  "Reconnecting...": "Opnieuw Verbinding Maken...",
54
54
  "Reply": "Antwoord",
55
55
  "Reply to Message": "Beantwoord bericht",
56
56
  "Resend": "Opnieuw versturen",
57
57
  "Search GIFs": "Zoek GIF's",
58
- "Select More Photos": "",
58
+ "Select More Photos": "Selecteer Meer foto's",
59
59
  "Send Anyway": "Toch verzenden",
60
60
  "Send a message": "Stuur een bericht",
61
61
  "Sending links is not allowed in this conversation": "In dit gesprek is het niet toegestaan links te versturen",
@@ -63,17 +63,17 @@
63
63
  "The message has been reported to a moderator.": "Het bericht is gerapporteerd aan een moderator.",
64
64
  "Thread Reply": "Discussie beantwoorden",
65
65
  "Unblock User": "Deblokkeer gebruiker",
66
- "Unknown User": "",
66
+ "Unknown User": "Onbekende gebruiker",
67
67
  "Unmute User": "Dempen van gebruiker opheffen",
68
68
  "Unpin from Conversation": "Losmaken van gesprek",
69
69
  "Unread Messages": "Ongelezen Berichten",
70
70
  "Video": "Video",
71
71
  "You": "U",
72
72
  "You can't send messages in this channel": "Je kan geen berichten sturen in dit kanaal",
73
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
74
- "{{ index }} of {{ photoLength }}": "",
73
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} en {{ nonSelfUserLength }} anderen zijn aan het typen",
74
+ "{{ index }} of {{ photoLength }}": "{{ index }} van {{ photoLength }}",
75
75
  "{{ replyCount }} Replies": "{{ replyCount }} Antwoorden",
76
- "{{ replyCount }} Thread Replies": "",
77
- "{{ user }} is typing": "",
76
+ "{{ replyCount }} Thread Replies": "{{replyCount}} Discussiereacties",
77
+ "{{ user }} is typing": "{{ user }} is aan het typen",
78
78
  "🏙 Attachment...": "🏙 Bijlage..."
79
79
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "1 Reply": "1 Resposta",
3
- "1 Thread Reply": "",
4
- "Allow access to your Gallery": "",
5
- "Allow camera access in device settings": "",
3
+ "1 Thread Reply": "1 Resposta de Thread",
4
+ "Allow access to your Gallery": "Permitir acesso à sua Galeria",
5
+ "Allow camera access in device settings": "Permitir acesso à câmera nas configurações do dispositivo",
6
6
  "Also send to channel": "Também enviar para o canal",
7
7
  "Are you sure you want to permanently delete this message?": "Tem certeza de que deseja excluir esta mensagem permanentemente?",
8
8
  "Are you sure?": "Tem certeza?",
@@ -13,10 +13,10 @@
13
13
  "Copy Message": "Copiar Mensagem",
14
14
  "Delete": "Excluir",
15
15
  "Delete Message": "Excluir Mensagem",
16
- "Device camera is used to take photos or videos.": "",
16
+ "Device camera is used to take photos or videos.": "A câmera do dispositivo é usada para tirar fotos ou vídeos.",
17
17
  "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?",
18
18
  "Edit Message": "Editar Mensagem",
19
- "Editing Message": "",
19
+ "Editing Message": "Editando Mensagem",
20
20
  "Emoji matching": "Correspondência de Emoji",
21
21
  "Empty message...": "Mensagem vazia...",
22
22
  "Error loading": "Erro ao carregar",
@@ -39,23 +39,23 @@
39
39
  "Message deleted": "Mensagem excluída",
40
40
  "Message flagged": "Mensagem sinalizada",
41
41
  "Mute User": "Silenciar Usuário",
42
- "Not supported": "",
42
+ "Not supported": "Não suportado",
43
43
  "Nothing yet...": "Nada ainda...",
44
44
  "Ok": "Ok",
45
- "Only visible to you": "",
46
- "Open Settings": "",
45
+ "Only visible to you": "Apenas visível para você",
46
+ "Open Settings": "Abrir Configurações",
47
47
  "Photo": "Foto",
48
- "Photos and Videos": "",
48
+ "Photos and Videos": "Fotos e Vídeos",
49
49
  "Pin to Conversation": "Fixar na Conversa",
50
- "Pinned by": "",
51
- "Please enable access to your photos and videos so you can share them.": "",
50
+ "Pinned by": "Fixado por",
51
+ "Please enable access to your photos and videos so you can share them.": "Por favor, habilite o acesso às suas fotos e vídeos para poder compartilhá-los.",
52
52
  "Please select a channel first": "Por favor, selecione um canal primeiro",
53
53
  "Reconnecting...": "Reconectando...",
54
54
  "Reply": "Responder",
55
55
  "Reply to Message": "Responder à Mensagem",
56
56
  "Resend": "Reenviar",
57
57
  "Search GIFs": "Pesquisar GIFs",
58
- "Select More Photos": "",
58
+ "Select More Photos": "Selecionar Mais Fotos",
59
59
  "Send Anyway": "Enviar de qualquer maneira",
60
60
  "Send a message": "Enviar uma mensagem",
61
61
  "Sending links is not allowed in this conversation": "Não é permitido enviar links nesta conversa",
@@ -63,17 +63,17 @@
63
63
  "The message has been reported to a moderator.": "A mensagem foi relatada a um moderador.",
64
64
  "Thread Reply": "Respostas de Tópico",
65
65
  "Unblock User": "Desbloquear Usuário",
66
- "Unknown User": "",
66
+ "Unknown User": "Usuário Desconhecido",
67
67
  "Unmute User": "Remover usuário do modo silencioso",
68
68
  "Unpin from Conversation": "Desmarcar como fixado na conversa",
69
69
  "Unread Messages": "Mensagens não lidas",
70
70
  "Video": "Vídeo",
71
71
  "You": "Você",
72
72
  "You can't send messages in this channel": "Você não pode enviar mensagens neste canal",
73
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
74
- "{{ index }} of {{ photoLength }}": "",
73
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} e mais {{ nonSelfUserLength }} pessoa(s) estão digitando",
74
+ "{{ index }} of {{ photoLength }}": "{{ index }} de {{ photoLength }}",
75
75
  "{{ replyCount }} Replies": "{{ replyCount }} Respostas",
76
- "{{ replyCount }} Thread Replies": "",
77
- "{{ user }} is typing": "",
76
+ "{{ replyCount }} Thread Replies": "{{ replyCount }} Respostas de Thread",
77
+ "{{ user }} is typing": "{{ user }} está digitando",
78
78
  "🏙 Attachment...": "🏙 Anexo..."
79
79
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "1 Reply": "1 Ответ",
3
- "1 Thread Reply": "",
4
- "Allow access to your Gallery": "",
5
- "Allow camera access in device settings": "",
3
+ "1 Thread Reply": "1 тема Ответить",
4
+ "Allow access to your Gallery": "Разрешить доступ к вашей галерее",
5
+ "Allow camera access in device settings": "Разрешите доступ к камере в настройках устройства.",
6
6
  "Also send to channel": "Также отправить на канал",
7
7
  "Are you sure you want to permanently delete this message?": "Вы действительно хотите удалить это сообщение без возможности восстановления?",
8
8
  "Are you sure?": "Вы уверены?",
@@ -13,10 +13,10 @@
13
13
  "Copy Message": "Копировать сообщение",
14
14
  "Delete": "удалять",
15
15
  "Delete Message": "Удалить сообщение",
16
- "Device camera is used to take photos or videos.": "",
16
+ "Device camera is used to take photos or videos.": "Камера устройства используется для съемки фотографий или видео.",
17
17
  "Do you want to send a copy of this message to a moderator for further investigation?": "Вы хотите отправить копию этого сообщения модератору для дальнейшего изучения?",
18
18
  "Edit Message": "Редактировать сообщение",
19
- "Editing Message": "",
19
+ "Editing Message": "Редактирование сообщения",
20
20
  "Emoji matching": "Соответствие эмодзи",
21
21
  "Empty message...": "Пустое сообщение...",
22
22
  "Error loading": "Ошибка при загрузке",
@@ -39,23 +39,23 @@
39
39
  "Message deleted": "Сообщение удалено",
40
40
  "Message flagged": "Сообщение отмечено",
41
41
  "Mute User": "Отключить пользователя",
42
- "Not supported": "",
42
+ "Not supported": "не поддерживается",
43
43
  "Nothing yet...": "Пока ничего нет...",
44
44
  "Ok": "Oк",
45
- "Only visible to you": "",
46
- "Open Settings": "",
45
+ "Only visible to you": "Видно только вам",
46
+ "Open Settings": "Открыть настройки",
47
47
  "Photo": "Фото",
48
- "Photos and Videos": "",
48
+ "Photos and Videos": "Фото и видео",
49
49
  "Pin to Conversation": "Закрепить к беседе",
50
- "Pinned by": "",
51
- "Please enable access to your photos and videos so you can share them.": "",
50
+ "Pinned by": "Закреплено пользователем",
51
+ "Please enable access to your photos and videos so you can share them.": "Разрешите доступ к своим фотографиям и видео, чтобы вы могли ими поделиться.",
52
52
  "Please select a channel first": "Пожалуйста, сначала выберите канал",
53
53
  "Reconnecting...": "Переподключение...",
54
54
  "Reply": "Ответить",
55
55
  "Reply to Message": "Ответить на сообщение",
56
56
  "Resend": "Отправить",
57
57
  "Search GIFs": "Поиск GIF",
58
- "Select More Photos": "",
58
+ "Select More Photos": "Выбрать больше фотографий",
59
59
  "Send Anyway": "Всё равно отправить",
60
60
  "Send a message": "Отправить сообщение",
61
61
  "Sending links is not allowed in this conversation": "Отправка ссылок недоступна в этом чате",
@@ -63,17 +63,17 @@
63
63
  "The message has been reported to a moderator.": "Сообщение отправлено модератору.",
64
64
  "Thread Reply": "Тема Ответить",
65
65
  "Unblock User": "Разблокировать пользователя",
66
- "Unknown User": "",
66
+ "Unknown User": "Неизвестный пользователь",
67
67
  "Unmute User": "Включить микрофон",
68
68
  "Unpin from Conversation": "Открепить от беседы",
69
69
  "Unread Messages": "Непрочитанные Сообщения",
70
70
  "Video": "видео",
71
71
  "You": "Вы",
72
72
  "You can't send messages in this channel": "Вы не можете отправлять сообщения в этот канал",
73
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
74
- "{{ index }} of {{ photoLength }}": "",
73
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
74
+ "{{ index }} of {{ photoLength }}": "{{ index }} из {{ photoLength }}",
75
75
  "{{ replyCount }} Replies": "{{ replyCount }} Ответов",
76
- "{{ replyCount }} Thread Replies": "",
77
- "{{ user }} is typing": "",
76
+ "{{ replyCount }} Thread Replies": "{{replyCount}} Ответы в темах",
77
+ "{{ user }} is typing": "{{ user }} пишет",
78
78
  "🏙 Attachment...": "🏙 Вложение..."
79
79
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "1 Reply": "1 Cevap",
3
- "1 Thread Reply": "",
4
- "Allow access to your Gallery": "",
5
- "Allow camera access in device settings": "",
3
+ "1 Thread Reply": "1 Konu Yanıtı",
4
+ "Allow access to your Gallery": "Galerinize erişime izin verin",
5
+ "Allow camera access in device settings": "Cihaz ayarlarında kamera erişimine izin ver",
6
6
  "Also send to channel": "Kanala da gönder",
7
7
  "Are you sure you want to permanently delete this message?": "Bu mesajı kalıcı olarak silmek istediğinizden emin misiniz?",
8
8
  "Are you sure?": "Emin misiniz?",
@@ -13,10 +13,10 @@
13
13
  "Copy Message": "Mesajı Kopyala",
14
14
  "Delete": "Sil",
15
15
  "Delete Message": "Mesajı Sil",
16
- "Device camera is used to take photos or videos.": "",
16
+ "Device camera is used to take photos or videos.": "Cihaz kamerası fotoğraf veya video çekmek için kullanılır.",
17
17
  "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?",
18
18
  "Edit Message": "Mesajı Düzenle",
19
- "Editing Message": "",
19
+ "Editing Message": "Mesaj Düzenleniyor",
20
20
  "Emoji matching": "Emoji eşleştirme",
21
21
  "Empty message...": "Boş mesaj...",
22
22
  "Error loading": "Yükleme hatası",
@@ -39,23 +39,23 @@
39
39
  "Message deleted": "Mesaj silindi",
40
40
  "Message flagged": "Mesaj işaretlendi",
41
41
  "Mute User": "Kullanıcıyı sessize al",
42
- "Not supported": "",
42
+ "Not supported": "Desteklenmiyor",
43
43
  "Nothing yet...": "Henüz değil...",
44
44
  "Ok": "Tamam",
45
- "Only visible to you": "",
46
- "Open Settings": "",
45
+ "Only visible to you": "Sadece siz görebilirsiniz",
46
+ "Open Settings": "Ayarları aç",
47
47
  "Photo": "Fotoğraf",
48
- "Photos and Videos": "",
48
+ "Photos and Videos": "Fotoğraflar ve Videolar",
49
49
  "Pin to Conversation": "Konuşmaya sabitle",
50
- "Pinned by": "",
51
- "Please enable access to your photos and videos so you can share them.": "",
50
+ "Pinned by": "Tarafından sabitlendi",
51
+ "Please enable access to your photos and videos so you can share them.": "Paylaşım yapabilmek için lutfen fotoğraflarınıza ve videolarınıza erişimi etkinleştirin.",
52
52
  "Please select a channel first": "Lütfen önce bir kanal seçiniz",
53
53
  "Reconnecting...": "Yeniden Bağlanılıyor...",
54
54
  "Reply": "Yanıtla",
55
55
  "Reply to Message": "Mesajı Yanıtla",
56
56
  "Resend": "Yeniden gönder",
57
57
  "Search GIFs": "GIF Ara",
58
- "Select More Photos": "",
58
+ "Select More Photos": "Daha Fazla Fotoğraf Seçin",
59
59
  "Send Anyway": "Yine de Gönder",
60
60
  "Send a message": "Mesaj gönder",
61
61
  "Sending links is not allowed in this conversation": "Bu konuşmada bağlantı göndermek desteklenmiyor",
@@ -63,17 +63,17 @@
63
63
  "The message has been reported to a moderator.": "Mesaj moderatöre bildirildi.",
64
64
  "Thread Reply": "Konu Yanıtı",
65
65
  "Unblock User": "Kullanıcının engelini kaldır",
66
- "Unknown User": "",
66
+ "Unknown User": "Bilinmeyen kullanıcı",
67
67
  "Unmute User": "Kullanıcının sesini aç",
68
68
  "Unpin from Conversation": "Sabitlemeyi kaldır",
69
69
  "Unread Messages": "Okunmamış Mesajlar",
70
70
  "Video": "Video",
71
71
  "You": "Sen",
72
72
  "You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
73
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
74
- "{{ index }} of {{ photoLength }}": "",
73
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
74
+ "{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
75
75
  "{{ replyCount }} Replies": "{{ replyCount }} Cevap",
76
- "{{ replyCount }} Thread Replies": "",
77
- "{{ user }} is typing": "",
76
+ "{{ replyCount }} Thread Replies": "{{responseCount}} Konu Cevapı",
77
+ "{{ user }} is typing": "{{ user }} yazıyor",
78
78
  "🏙 Attachment...": "🏙 Ek..."
79
79
  }
@@ -0,0 +1,6 @@
1
+ import { DefaultStreamChatGenerics } from 'src/types/types';
2
+ import type { Channel } from 'stream-chat';
3
+ export declare const upsertChannelDataFromChannel: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channel, flush, }: {
4
+ channel: Channel<StreamChatGenerics>;
5
+ flush?: boolean | undefined;
6
+ }) => import("../types").PreparedQueries[] | undefined;
@@ -0,0 +1,4 @@
1
+ import type { Channel } from 'stream-chat';
2
+ import type { DefaultStreamChatGenerics } from '../../types/types';
3
+ import type { TableRow } from '../types';
4
+ export declare const mapChannelToStorable: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(channel: Channel<StreamChatGenerics>) => TableRow<'channels'> | undefined;
@@ -26,7 +26,7 @@ export declare class DBSyncManager {
26
26
  static onSyncStatusChange: (listener: (status: boolean) => void) => {
27
27
  unsubscribe: () => void;
28
28
  };
29
- static sync: () => Promise<void>;
29
+ static sync: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(client: StreamChat<StreamChatGenerics>) => Promise<void>;
30
30
  static syncAndExecutePendingTasks: () => Promise<void>;
31
31
  static queueTask: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ client, task, }: {
32
32
  client: StreamChat<StreamChatGenerics>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native-core",
3
3
  "description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
4
- "version": "5.27.0-beta.8",
4
+ "version": "5.27.0",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -309,14 +309,14 @@ const GalleryThumbnail = <
309
309
  };
310
310
 
311
311
  const defaultOnPress = () => {
312
- // If file type is video and the url is defined then try to open the file.
313
- if (thumbnail.type === 'video' && thumbnail.url) {
314
- if (isVideoPackageAvailable()) {
315
- openImageViewer();
316
- } else {
312
+ // If the url is defined then only try to open the file.
313
+ if (thumbnail.url) {
314
+ if (thumbnail.type === 'video' && !isVideoPackageAvailable()) {
317
315
  // This condition is kinda unreachable, since we render videos as file attachment if the video
318
316
  // library is not installed. But doesn't hurt to have extra safeguard, in case of some customizations.
319
317
  openUrlSafely(thumbnail.url);
318
+ } else {
319
+ openImageViewer();
320
320
  }
321
321
  }
322
322
  };
@@ -292,7 +292,7 @@ export const AttachmentPicker = React.forwardRef(
292
292
  * this is an issue if you are calling close on the bottom sheet.
293
293
  */
294
294
  const snapPoints = useMemo(
295
- () => [initialSnapPoint, finalSnapPoint],
295
+ () => [Math.max(0, initialSnapPoint), Math.max(0, finalSnapPoint)],
296
296
  [initialSnapPoint, finalSnapPoint],
297
297
  );
298
298
 
@@ -1,74 +1,152 @@
1
- import type { Event } from 'stream-chat';
1
+ import { DefaultStreamChatGenerics } from 'src/types/types';
2
+ import type { Event, StreamChat } from 'stream-chat';
2
3
 
3
4
  import { deleteChannel } from '../../../store/apis/deleteChannel';
4
5
  import { deleteMember } from '../../../store/apis/deleteMember';
5
6
  import { deleteMessagesForChannel } from '../../../store/apis/deleteMessagesForChannel';
6
7
  import { updateMessage } from '../../../store/apis/updateMessage';
7
8
  import { upsertChannelData } from '../../../store/apis/upsertChannelData';
9
+ import { upsertChannelDataFromChannel } from '../../../store/apis/upsertChannelDataFromChannel';
8
10
  import { upsertChannels } from '../../../store/apis/upsertChannels';
9
11
  import { upsertMembers } from '../../../store/apis/upsertMembers';
10
12
  import { upsertMessages } from '../../../store/apis/upsertMessages';
11
13
  import { upsertReads } from '../../../store/apis/upsertReads';
14
+ import { QuickSqliteClient } from '../../../store/QuickSqliteClient';
15
+ import { createSelectQuery } from '../../../store/sqlite-utils/createSelectQuery';
16
+ import { PreparedQueries } from '../../../store/types';
12
17
 
13
- export const handleEventToSyncDB = (event: Event, flush?: boolean) => {
18
+ export const handleEventToSyncDB = <
19
+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
20
+ >(
21
+ event: Event,
22
+ client: StreamChat<StreamChatGenerics>,
23
+ flush?: boolean,
24
+ ) => {
14
25
  const { type } = event;
15
26
 
27
+ // This function is used to guard the queries that require channel to be present in the db first
28
+ // If channel is not present in the db, we first fetch the channel data from the channel object
29
+ // and then add the queries with a channel create query first
30
+ const queriesWithChannelGuard = (
31
+ createQueries: (flushOverride?: boolean) => PreparedQueries[],
32
+ ) => {
33
+ const cid = event.cid || event.channel?.cid;
34
+
35
+ if (!cid) return createQueries(flush);
36
+ const channels = QuickSqliteClient.executeSql.apply(
37
+ null,
38
+ createSelectQuery('channels', ['cid'], {
39
+ cid,
40
+ }),
41
+ );
42
+ // a channel is not present in the db, we first fetch the channel data from the channel object.
43
+ // this can happen for example when a message.new event is received for a channel that is not in the db due to a channel being hidden.
44
+ if (channels.length === 0) {
45
+ const channel =
46
+ event.channel_type && event.channel_id
47
+ ? client.channel(event.channel_type, event.channel_id)
48
+ : undefined;
49
+ if (channel && channel.initialized && !channel.disconnected) {
50
+ const channelQuery = upsertChannelDataFromChannel({
51
+ channel,
52
+ flush,
53
+ });
54
+ if (channelQuery) {
55
+ const newQueries = [...channelQuery, ...createQueries(false)];
56
+ if (flush !== false) {
57
+ QuickSqliteClient.executeSqlBatch(newQueries);
58
+ }
59
+ return newQueries;
60
+ } else {
61
+ console.warn(
62
+ `Couldnt create channel queries on ${type} event for an initialized channel that is not in DB, skipping event`,
63
+ { event },
64
+ );
65
+ return [];
66
+ }
67
+ } else {
68
+ console.warn(
69
+ `Received ${type} event for a non initialized channel that is not in DB, skipping event`,
70
+ { event },
71
+ );
72
+ return [];
73
+ }
74
+ }
75
+ return createQueries(flush);
76
+ };
77
+
16
78
  if (type === 'message.read') {
17
- if (event.user?.id && event.cid) {
18
- return upsertReads({
19
- cid: event.cid,
20
- flush,
21
- reads: [
22
- {
23
- last_read: event.received_at as string,
24
- unread_messages: 0,
25
- user: event.user,
26
- },
27
- ],
28
- });
79
+ const cid = event.cid;
80
+ const user = event.user;
81
+ if (user?.id && cid) {
82
+ return queriesWithChannelGuard((flushOverride) =>
83
+ upsertReads({
84
+ cid,
85
+ flush: flushOverride,
86
+ reads: [
87
+ {
88
+ last_read: event.received_at as string,
89
+ unread_messages: 0,
90
+ user,
91
+ },
92
+ ],
93
+ }),
94
+ );
29
95
  }
30
96
  }
31
97
 
32
98
  if (type === 'message.new') {
33
- if (event.message && (!event.message.parent_id || event.message.show_in_channel)) {
34
- return upsertMessages({
35
- flush,
36
- messages: [event.message],
37
- });
99
+ const message = event.message;
100
+ if (message && (!message.parent_id || message.show_in_channel)) {
101
+ return queriesWithChannelGuard((flushOverride) =>
102
+ upsertMessages({
103
+ flush: flushOverride,
104
+ messages: [message],
105
+ }),
106
+ );
38
107
  }
39
108
  }
40
109
 
41
110
  if (type === 'message.updated' || type === 'message.deleted') {
42
- if (event.message && !event.message.parent_id) {
111
+ const message = event.message;
112
+ if (message && !message.parent_id) {
43
113
  // Update only if it exists, otherwise event could be related
44
114
  // to a message which is not in database.
45
- return updateMessage({
46
- flush,
47
- message: event.message,
48
- });
115
+ return queriesWithChannelGuard((flushOverride) =>
116
+ updateMessage({
117
+ flush: flushOverride,
118
+ message,
119
+ }),
120
+ );
49
121
  }
50
122
  }
51
123
 
52
124
  if (type === 'reaction.updated') {
53
- if (event.message && event.reaction) {
125
+ const message = event.message;
126
+ if (message && event.reaction) {
54
127
  // We update the entire message to make sure we also update
55
128
  // reaction_counts.
56
- return updateMessage({
57
- flush,
58
- message: event.message,
59
- });
129
+ return queriesWithChannelGuard((flushOverride) =>
130
+ updateMessage({
131
+ flush: flushOverride,
132
+ message,
133
+ }),
134
+ );
60
135
  }
61
136
  }
62
137
 
63
138
  if (type === 'reaction.new' || type === 'reaction.deleted') {
64
- if (event.message && !event.message.parent_id) {
139
+ const message = event.message;
140
+ if (message && !message.parent_id) {
65
141
  // Here we are relying on the fact message.latest_reactions always includes
66
142
  // the new reaction. So we first delete all the existing reactions and populate
67
143
  // the reactions table with message.latest_reactions
68
- return updateMessage({
69
- flush,
70
- message: event.message,
71
- });
144
+ return queriesWithChannelGuard((flushOverride) =>
145
+ updateMessage({
146
+ flush: flushOverride,
147
+ message,
148
+ }),
149
+ );
72
150
  }
73
151
  }
74
152
 
@@ -119,22 +197,30 @@ export const handleEventToSyncDB = (event: Event, flush?: boolean) => {
119
197
  }
120
198
 
121
199
  if (type === 'member.added' || type === 'member.updated') {
122
- if (event.member && event.cid) {
123
- return upsertMembers({
124
- cid: event.cid,
125
- flush,
126
- members: [event.member],
127
- });
200
+ const member = event.member;
201
+ const cid = event.cid;
202
+ if (member && cid) {
203
+ return queriesWithChannelGuard((flushOverride) =>
204
+ upsertMembers({
205
+ cid,
206
+ flush: flushOverride,
207
+ members: [member],
208
+ }),
209
+ );
128
210
  }
129
211
  }
130
212
 
131
213
  if (type === 'member.removed') {
132
- if (event.member && event.cid) {
133
- return deleteMember({
134
- cid: event.cid,
135
- flush,
136
- member: event.member,
137
- });
214
+ const member = event.member;
215
+ const cid = event.cid;
216
+ if (member && cid) {
217
+ return queriesWithChannelGuard((flushOverride) =>
218
+ deleteMember({
219
+ cid,
220
+ flush: flushOverride,
221
+ member,
222
+ }),
223
+ );
138
224
  }
139
225
  }
140
226
 
@@ -22,7 +22,7 @@ export const useSyncDatabase = <
22
22
  let listener: ReturnType<StreamChat['on']> | undefined;
23
23
 
24
24
  if (enableOfflineSupport && initialisedDatabase) {
25
- listener = client?.on(handleEventToSyncDB);
25
+ listener = client?.on((event) => handleEventToSyncDB(event, client));
26
26
  }
27
27
 
28
28
  return () => {