stream-chat-react-native-core 9.4.0 → 9.4.1-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.
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js +2 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +20 -3
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/commonjs/hooks/actions/useChannelActionItems.js +54 -4
- package/lib/commonjs/hooks/actions/useChannelActionItems.js.map +1 -1
- package/lib/commonjs/hooks/actions/useChannelMemberActionItems.js +22 -3
- package/lib/commonjs/hooks/actions/useChannelMemberActionItems.js.map +1 -1
- package/lib/commonjs/i18n/ar.json +7 -1
- package/lib/commonjs/i18n/en.json +6 -0
- package/lib/commonjs/i18n/es.json +7 -1
- package/lib/commonjs/i18n/fr.json +7 -1
- package/lib/commonjs/i18n/he.json +7 -1
- package/lib/commonjs/i18n/hi.json +7 -1
- package/lib/commonjs/i18n/it.json +7 -1
- package/lib/commonjs/i18n/ja.json +7 -1
- package/lib/commonjs/i18n/ko.json +7 -1
- package/lib/commonjs/i18n/nl.json +7 -1
- package/lib/commonjs/i18n/pt-br.json +7 -1
- package/lib/commonjs/i18n/ru.json +7 -1
- package/lib/commonjs/i18n/tr.json +7 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js +2 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +20 -3
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/module/hooks/actions/useChannelActionItems.js +54 -4
- package/lib/module/hooks/actions/useChannelActionItems.js.map +1 -1
- package/lib/module/hooks/actions/useChannelMemberActionItems.js +22 -3
- package/lib/module/hooks/actions/useChannelMemberActionItems.js.map +1 -1
- package/lib/module/i18n/ar.json +7 -1
- package/lib/module/i18n/en.json +6 -0
- package/lib/module/i18n/es.json +7 -1
- package/lib/module/i18n/fr.json +7 -1
- package/lib/module/i18n/he.json +7 -1
- package/lib/module/i18n/hi.json +7 -1
- package/lib/module/i18n/it.json +7 -1
- package/lib/module/i18n/ja.json +7 -1
- package/lib/module/i18n/ko.json +7 -1
- package/lib/module/i18n/nl.json +7 -1
- package/lib/module/i18n/pt-br.json +7 -1
- package/lib/module/i18n/ru.json +7 -1
- package/lib/module/i18n/tr.json +7 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts.map +1 -1
- package/lib/typescript/hooks/actions/useChannelActionItems.d.ts.map +1 -1
- package/lib/typescript/hooks/actions/useChannelMemberActionItems.d.ts.map +1 -1
- package/lib/typescript/i18n/ar.json +7 -1
- package/lib/typescript/i18n/en.json +6 -0
- package/lib/typescript/i18n/es.json +7 -1
- package/lib/typescript/i18n/fr.json +7 -1
- package/lib/typescript/i18n/he.json +7 -1
- package/lib/typescript/i18n/hi.json +7 -1
- package/lib/typescript/i18n/it.json +7 -1
- package/lib/typescript/i18n/ja.json +7 -1
- package/lib/typescript/i18n/ko.json +7 -1
- package/lib/typescript/i18n/nl.json +7 -1
- package/lib/typescript/i18n/pt-br.json +7 -1
- package/lib/typescript/i18n/ru.json +7 -1
- package/lib/typescript/i18n/tr.json +7 -1
- package/lib/typescript/utils/i18n/Streami18n.d.ts +6 -0
- package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.tsx +2 -1
- package/src/components/Message/hooks/useMessageActions.tsx +30 -6
- package/src/hooks/actions/__tests__/useChannelActionItems.test.tsx +4 -4
- package/src/hooks/actions/__tests__/useChannelMemberActionItems.test.tsx +3 -3
- package/src/hooks/actions/useChannelActionItems.tsx +56 -2
- package/src/hooks/actions/useChannelMemberActionItems.tsx +23 -1
- package/src/i18n/ar.json +7 -1
- package/src/i18n/en.json +6 -0
- package/src/i18n/es.json +7 -1
- package/src/i18n/fr.json +7 -1
- package/src/i18n/he.json +7 -1
- package/src/i18n/hi.json +7 -1
- package/src/i18n/it.json +7 -1
- package/src/i18n/ja.json +7 -1
- package/src/i18n/ko.json +7 -1
- package/src/i18n/nl.json +7 -1
- package/src/i18n/pt-br.json +7 -1
- package/src/i18n/ru.json +7 -1
- package/src/i18n/tr.json +7 -1
- package/src/version.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChannelMemberActionItems.d.ts","sourceRoot":"","sources":["../../../../src/hooks/actions/useChannelMemberActionItems.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAqB,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAqB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAI/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AAKpG,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;AAEhF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,eAAe,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACtC,CAAC,EAAE,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAChC,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;CACzB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CAAC;CACzC,KAAK,uBAAuB,EAAE,CAAC;AAEhC,eAAO,MAAM,2BAA2B,EAAE,2BAC5B,CAAC;AAEf,KAAK,iCAAiC,GAAG;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,2BAA2B,CAAC,EAAE,2BAA2B,CAAC;CAC3D,CAAC;AAKF,eAAO,MAAM,2BAA2B,GAAI,oFAIzC,iCAAiC,8BAwDnC,CAAC"}
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "تثبيت الدردشة",
|
|
458
458
|
"Pin Group": "تثبيت المجموعة",
|
|
459
459
|
"Unpin Chat": "إلغاء تثبيت الدردشة",
|
|
460
|
-
"Unpin Group": "إلغاء تثبيت المجموعة"
|
|
460
|
+
"Unpin Group": "إلغاء تثبيت المجموعة",
|
|
461
|
+
"Block": "حظر",
|
|
462
|
+
"Block {{ name }}": "حظر {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "لن يتمكن/تتمكن من مراسلتك أو الاتصال بك. يمكنك إلغاء الحظر لاحقًا.",
|
|
464
|
+
"Leave": "مغادرة",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "ستتوقف عن تلقي الرسائل من {{ name }}. يمكنك الانضمام مجددًا في أي وقت.",
|
|
466
|
+
"group": "المجموعة"
|
|
461
467
|
}
|
|
@@ -242,6 +242,12 @@
|
|
|
242
242
|
"No conversations yet": "No conversations yet",
|
|
243
243
|
"Are you sure you want to delete this group? This can't be undone.": "Are you sure you want to delete this group? This can't be undone.",
|
|
244
244
|
"Are you sure you want to delete this chat? This can't be undone.": "Are you sure you want to delete this chat? This can't be undone.",
|
|
245
|
+
"Block": "Block",
|
|
246
|
+
"Block {{ name }}": "Block {{ name }}",
|
|
247
|
+
"They won't be able to message or call you. You can unblock them later.": "They won't be able to message or call you. You can unblock them later.",
|
|
248
|
+
"Leave": "Leave",
|
|
249
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "You'll stop receiving messages from {{ name }}. You can rejoin anytime.",
|
|
250
|
+
"group": "this group",
|
|
245
251
|
"Delete chat": "Delete chat",
|
|
246
252
|
"Delete group": "Delete group",
|
|
247
253
|
"Archive Chat": "Archive Chat",
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "Fijar chat",
|
|
458
458
|
"Pin Group": "Fijar grupo",
|
|
459
459
|
"Unpin Chat": "Desfijar chat",
|
|
460
|
-
"Unpin Group": "Desfijar grupo"
|
|
460
|
+
"Unpin Group": "Desfijar grupo",
|
|
461
|
+
"Block": "Bloquear",
|
|
462
|
+
"Block {{ name }}": "Bloquear a {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "No podrá enviarte mensajes ni llamarte. Puedes desbloquearlo más tarde.",
|
|
464
|
+
"Leave": "Salir",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "Dejarás de recibir mensajes de {{ name }}. Puedes volver a unirte cuando quieras.",
|
|
466
|
+
"group": "el grupo"
|
|
461
467
|
}
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "Épingler la discussion",
|
|
458
458
|
"Pin Group": "Épingler le groupe",
|
|
459
459
|
"Unpin Chat": "Détacher la discussion",
|
|
460
|
-
"Unpin Group": "Détacher le groupe"
|
|
460
|
+
"Unpin Group": "Détacher le groupe",
|
|
461
|
+
"Block": "Bloquer",
|
|
462
|
+
"Block {{ name }}": "Bloquer {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "Cette personne ne pourra plus vous envoyer de messages ni vous appeler. Vous pourrez la débloquer plus tard.",
|
|
464
|
+
"Leave": "Quitter",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "Vous ne recevrez plus de messages de {{ name }}. Vous pouvez rejoindre à tout moment.",
|
|
466
|
+
"group": "ce groupe"
|
|
461
467
|
}
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "הצמד/י צ'אט",
|
|
458
458
|
"Pin Group": "הצמד/י קבוצה",
|
|
459
459
|
"Unpin Chat": "בטל/י הצמדת צ'אט",
|
|
460
|
-
"Unpin Group": "בטל/י הצמדת קבוצה"
|
|
460
|
+
"Unpin Group": "בטל/י הצמדת קבוצה",
|
|
461
|
+
"Block": "חסום/חסמי",
|
|
462
|
+
"Block {{ name }}": "חסימת {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "הוא/היא לא יוכל/תוכל לשלוח לך הודעות או להתקשר אליך. ניתן לבטל את החסימה מאוחר יותר.",
|
|
464
|
+
"Leave": "צא/י",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "תפסיק/תפסיקי לקבל הודעות מ-{{ name }}. ניתן להצטרף בחזרה בכל עת.",
|
|
466
|
+
"group": "הקבוצה"
|
|
461
467
|
}
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "चैट पिन करें",
|
|
458
458
|
"Pin Group": "ग्रुप पिन करें",
|
|
459
459
|
"Unpin Chat": "चैट अनपिन करें",
|
|
460
|
-
"Unpin Group": "ग्रुप अनपिन करें"
|
|
460
|
+
"Unpin Group": "ग्रुप अनपिन करें",
|
|
461
|
+
"Block": "ब्लॉक करें",
|
|
462
|
+
"Block {{ name }}": "{{ name }} को ब्लॉक करें",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "वे आपको संदेश या कॉल नहीं कर पाएंगे। आप उन्हें बाद में अनब्लॉक कर सकते हैं।",
|
|
464
|
+
"Leave": "छोड़ें",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "आपको {{ name }} से संदेश मिलना बंद हो जाएंगे। आप कभी भी दोबारा जुड़ सकते हैं।",
|
|
466
|
+
"group": "ग्रुप"
|
|
461
467
|
}
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "Fissa chat",
|
|
458
458
|
"Pin Group": "Fissa gruppo",
|
|
459
459
|
"Unpin Chat": "Sfissa chat",
|
|
460
|
-
"Unpin Group": "Sfissa gruppo"
|
|
460
|
+
"Unpin Group": "Sfissa gruppo",
|
|
461
|
+
"Block": "Blocca",
|
|
462
|
+
"Block {{ name }}": "Blocca {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "Non potrà inviarti messaggi né chiamarti. Potrai sbloccarlo in seguito.",
|
|
464
|
+
"Leave": "Esci",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "Non riceverai più messaggi da {{ name }}. Puoi rientrare in qualsiasi momento.",
|
|
466
|
+
"group": "il gruppo"
|
|
461
467
|
}
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "チャットをピン留め",
|
|
458
458
|
"Pin Group": "グループをピン留め",
|
|
459
459
|
"Unpin Chat": "チャットのピン留めを解除",
|
|
460
|
-
"Unpin Group": "グループのピン留めを解除"
|
|
460
|
+
"Unpin Group": "グループのピン留めを解除",
|
|
461
|
+
"Block": "ブロック",
|
|
462
|
+
"Block {{ name }}": "{{ name }} をブロック",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "メッセージや通話ができなくなります。あとでブロックを解除することもできます。",
|
|
464
|
+
"Leave": "退出",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "{{ name }} からのメッセージが届かなくなります。いつでも再参加できます。",
|
|
466
|
+
"group": "グループ"
|
|
461
467
|
}
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "채팅 고정",
|
|
458
458
|
"Pin Group": "그룹 고정",
|
|
459
459
|
"Unpin Chat": "채팅 고정 해제",
|
|
460
|
-
"Unpin Group": "그룹 고정 해제"
|
|
460
|
+
"Unpin Group": "그룹 고정 해제",
|
|
461
|
+
"Block": "차단",
|
|
462
|
+
"Block {{ name }}": "{{ name }} 차단",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "메시지를 보내거나 전화를 걸 수 없게 됩니다. 나중에 차단을 해제할 수 있습니다.",
|
|
464
|
+
"Leave": "나가기",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "{{ name }}에서 더 이상 메시지를 받지 않게 됩니다. 언제든지 다시 참여할 수 있습니다.",
|
|
466
|
+
"group": "그룹"
|
|
461
467
|
}
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "Chat vastmaken",
|
|
458
458
|
"Pin Group": "Groep vastmaken",
|
|
459
459
|
"Unpin Chat": "Chat losmaken",
|
|
460
|
-
"Unpin Group": "Groep losmaken"
|
|
460
|
+
"Unpin Group": "Groep losmaken",
|
|
461
|
+
"Block": "Blokkeren",
|
|
462
|
+
"Block {{ name }}": "{{ name }} blokkeren",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "Deze persoon kan je geen berichten sturen of bellen. Je kunt de blokkering later opheffen.",
|
|
464
|
+
"Leave": "Verlaten",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "Je ontvangt geen berichten meer van {{ name }}. Je kunt op elk moment opnieuw deelnemen.",
|
|
466
|
+
"group": "de groep"
|
|
461
467
|
}
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "Fixar conversa",
|
|
458
458
|
"Pin Group": "Fixar grupo",
|
|
459
459
|
"Unpin Chat": "Desafixar conversa",
|
|
460
|
-
"Unpin Group": "Desafixar grupo"
|
|
460
|
+
"Unpin Group": "Desafixar grupo",
|
|
461
|
+
"Block": "Bloquear",
|
|
462
|
+
"Block {{ name }}": "Bloquear {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "Essa pessoa não poderá enviar mensagens ou ligar para você. Você pode desbloqueá-la mais tarde.",
|
|
464
|
+
"Leave": "Sair",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "Você deixará de receber mensagens de {{ name }}. Pode entrar novamente a qualquer momento.",
|
|
466
|
+
"group": "o grupo"
|
|
461
467
|
}
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "Закрепить чат",
|
|
458
458
|
"Pin Group": "Закрепить группу",
|
|
459
459
|
"Unpin Chat": "Открепить чат",
|
|
460
|
-
"Unpin Group": "Открепить группу"
|
|
460
|
+
"Unpin Group": "Открепить группу",
|
|
461
|
+
"Block": "Заблокировать",
|
|
462
|
+
"Block {{ name }}": "Заблокировать {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "Он не сможет писать вам и звонить. Вы сможете снять блокировку позже.",
|
|
464
|
+
"Leave": "Покинуть",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "Вы перестанете получать сообщения от {{ name }}. Вы можете присоединиться снова в любое время.",
|
|
466
|
+
"group": "группы"
|
|
461
467
|
}
|
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "Sohbeti sabitle",
|
|
458
458
|
"Pin Group": "Grubu sabitle",
|
|
459
459
|
"Unpin Chat": "Sohbetin sabitlemesini kaldır",
|
|
460
|
-
"Unpin Group": "Grubun sabitlemesini kaldır"
|
|
460
|
+
"Unpin Group": "Grubun sabitlemesini kaldır",
|
|
461
|
+
"Block": "Engelle",
|
|
462
|
+
"Block {{ name }}": "{{ name }} kullanıcısını engelle",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "Size mesaj gönderemez veya sizi arayamaz. Engeli daha sonra kaldırabilirsiniz.",
|
|
464
|
+
"Leave": "Ayrıl",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "{{ name }} kanalından mesaj almayı bırakacaksınız. İstediğiniz zaman tekrar katılabilirsiniz.",
|
|
466
|
+
"group": "grup"
|
|
461
467
|
}
|
|
@@ -378,6 +378,12 @@ export declare class Streami18n {
|
|
|
378
378
|
"No conversations yet": string;
|
|
379
379
|
"Are you sure you want to delete this group? This can't be undone.": string;
|
|
380
380
|
"Are you sure you want to delete this chat? This can't be undone.": string;
|
|
381
|
+
Block: string;
|
|
382
|
+
"Block {{ name }}": string;
|
|
383
|
+
"They won't be able to message or call you. You can unblock them later.": string;
|
|
384
|
+
Leave: string;
|
|
385
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": string;
|
|
386
|
+
group: string;
|
|
381
387
|
"Delete chat": string;
|
|
382
388
|
"Delete group": string;
|
|
383
389
|
"Archive Chat": string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Streami18n.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/Streami18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAa,EAAE,KAAK,IAAI,IAAI,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAElF,OAAO,KAAK,cAAc,MAAM,iBAAiB,CAAC;AAIlD,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE/E,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAahD,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AAEzB;;;;GAIG;AACH,OAAO,iBAAiB,CAAC;AAmGzB,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CA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AM,EAChB,WAAW,EAAE,OAAO,CAAC,OAAO,cAAc,CAAC,EAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;IA+BtC,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC;IASvD;;;OAGG;IACG,WAAW,CAAC,QAAQ,EAAE,MAAM;IAsBlC,2BAA2B,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI;;;IAW5D,8BAA8B,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI;;;IAW/D,iBAAiB,CAAC,SAAS,EAAE,SAAS;CAQvC"}
|
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": "9.4.
|
|
4
|
+
"version": "9.4.1-beta.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
package/src/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.tsx
CHANGED
|
@@ -228,7 +228,8 @@ const useStyles = () => {
|
|
|
228
228
|
margin: 1,
|
|
229
229
|
alignItems: 'center',
|
|
230
230
|
justifyContent: 'center',
|
|
231
|
-
backgroundColor: semantics.
|
|
231
|
+
backgroundColor: semantics.backgroundCoreSurfaceCard,
|
|
232
|
+
gap: primitives.spacingXs,
|
|
232
233
|
},
|
|
233
234
|
iosLimitedIcon: {
|
|
234
235
|
color: semantics.textTertiary,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
+
import { Alert } from 'react-native';
|
|
2
3
|
|
|
3
4
|
import { LocalMessage } from 'stream-chat';
|
|
4
5
|
|
|
@@ -244,18 +245,41 @@ export const useMessageActions = ({
|
|
|
244
245
|
onOpenThread();
|
|
245
246
|
});
|
|
246
247
|
|
|
248
|
+
const isMuted = useUserMuteActive(message.user);
|
|
249
|
+
const isBlocked = new Set(client.blockedUsers.getLatestValue().userIds).has(
|
|
250
|
+
message.user?.id ?? '',
|
|
251
|
+
);
|
|
252
|
+
|
|
247
253
|
const onBlockUser = useStableCallback(() => {
|
|
248
254
|
if (handleBlockUser) {
|
|
249
255
|
handleBlockUser(message.user);
|
|
250
256
|
}
|
|
251
257
|
|
|
252
|
-
|
|
253
|
-
|
|
258
|
+
if (isBlocked) {
|
|
259
|
+
handleToggleBlockUser(message.user);
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
254
262
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
263
|
+
const name = message.user?.name || message.user?.id || '';
|
|
264
|
+
|
|
265
|
+
Alert.alert(
|
|
266
|
+
t('Block {{ name }}', { name }),
|
|
267
|
+
t("They won't be able to message or call you. You can unblock them later."),
|
|
268
|
+
[
|
|
269
|
+
{
|
|
270
|
+
style: 'cancel',
|
|
271
|
+
text: t('Cancel'),
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
onPress: () => {
|
|
275
|
+
handleToggleBlockUser(message.user);
|
|
276
|
+
},
|
|
277
|
+
style: 'destructive',
|
|
278
|
+
text: t('Block'),
|
|
279
|
+
},
|
|
280
|
+
],
|
|
281
|
+
);
|
|
282
|
+
});
|
|
259
283
|
|
|
260
284
|
return useMemo(() => {
|
|
261
285
|
const handleReaction =
|
|
@@ -105,7 +105,7 @@ describe('useChannelActionItems', () => {
|
|
|
105
105
|
expect(result.current.map((item) => item.action)).toEqual([
|
|
106
106
|
channelActions.muteChannel,
|
|
107
107
|
channelActions.pin,
|
|
108
|
-
|
|
108
|
+
expect.any(Function),
|
|
109
109
|
expect.any(Function),
|
|
110
110
|
]);
|
|
111
111
|
expect(result.current.map((item) => item.id)).toEqual([
|
|
@@ -268,7 +268,7 @@ describe('getChannelActionItems', () => {
|
|
|
268
268
|
expect(actionItems.map((item) => item.action)).toEqual([
|
|
269
269
|
channelActions.muteChannel,
|
|
270
270
|
channelActions.pin,
|
|
271
|
-
|
|
271
|
+
expect.any(Function),
|
|
272
272
|
expect.any(Function),
|
|
273
273
|
]);
|
|
274
274
|
expect(actionItems.map((item) => item.id)).toEqual(['mute', 'pin', 'leave', 'deleteChannel']);
|
|
@@ -308,7 +308,7 @@ describe('getChannelActionItems', () => {
|
|
|
308
308
|
channelActions.pin,
|
|
309
309
|
channelActions.unmuteUser,
|
|
310
310
|
channelActions.unblockUser,
|
|
311
|
-
|
|
311
|
+
expect.any(Function),
|
|
312
312
|
expect.any(Function),
|
|
313
313
|
]);
|
|
314
314
|
expect(actionItems.map((item) => item.label)).toEqual([
|
|
@@ -383,7 +383,7 @@ describe('getChannelActionItems', () => {
|
|
|
383
383
|
expect(actionItems[0].placement).toBe('swipe');
|
|
384
384
|
|
|
385
385
|
const leaveItem = actionItems.find((item) => item.id === 'leave');
|
|
386
|
-
expect(leaveItem?.action).
|
|
386
|
+
expect(leaveItem?.action).toEqual(expect.any(Function));
|
|
387
387
|
expect(leaveItem?.label).toBe('Leave Group');
|
|
388
388
|
expect(leaveItem?.placement).toBe('sheet');
|
|
389
389
|
});
|
|
@@ -76,7 +76,7 @@ describe('useChannelMemberActionItems', () => {
|
|
|
76
76
|
expect(result.current.map((item) => item.id)).toEqual(['muteUser', 'block']);
|
|
77
77
|
expect(result.current.map((item) => item.action)).toEqual([
|
|
78
78
|
userActions.muteUser,
|
|
79
|
-
|
|
79
|
+
expect.any(Function),
|
|
80
80
|
]);
|
|
81
81
|
expect(result.current.map((item) => item.type)).toEqual(['standard', 'destructive']);
|
|
82
82
|
expect(result.current.map((item) => item.label)).toEqual(['Mute User', 'Block User']);
|
|
@@ -259,7 +259,7 @@ describe('buildDefaultChannelMemberActionItems', () => {
|
|
|
259
259
|
});
|
|
260
260
|
|
|
261
261
|
expect(items.map((item) => item.id)).toEqual(['muteUser', 'block']);
|
|
262
|
-
expect(items.map((item) => item.action)).toEqual([actions.muteUser,
|
|
262
|
+
expect(items.map((item) => item.action)).toEqual([actions.muteUser, expect.any(Function)]);
|
|
263
263
|
expect(items.map((item) => item.label)).toEqual(['Mute User', 'Block User']);
|
|
264
264
|
expect(items.map((item) => item.type)).toEqual(['standard', 'destructive']);
|
|
265
265
|
});
|
|
@@ -335,7 +335,7 @@ describe('buildDefaultChannelMemberActionItems', () => {
|
|
|
335
335
|
});
|
|
336
336
|
|
|
337
337
|
expect(items.find((item) => item.id === 'muteUser')?.action).toBe(actions.unmuteUser);
|
|
338
|
-
expect(items.find((item) => item.id === 'block')?.action).
|
|
338
|
+
expect(items.find((item) => item.id === 'block')?.action).toEqual(expect.any(Function));
|
|
339
339
|
});
|
|
340
340
|
|
|
341
341
|
it('default getChannelMemberActionItems returns defaultItems unchanged', () => {
|
|
@@ -179,8 +179,31 @@ export const buildDefaultChannelActionItems: BuildDefaultChannelActionItems = (
|
|
|
179
179
|
type: 'standard',
|
|
180
180
|
});
|
|
181
181
|
|
|
182
|
+
const blockUserWithConfirmation = (...args: Parameters<ChannelActionHandler>) => {
|
|
183
|
+
const otherUser = getOtherUserInDirectChannel(channel)?.user;
|
|
184
|
+
const name = otherUser?.name || otherUser?.id || '';
|
|
185
|
+
|
|
186
|
+
Alert.alert(
|
|
187
|
+
t('Block {{ name }}', { name }),
|
|
188
|
+
t("They won't be able to message or call you. You can unblock them later."),
|
|
189
|
+
[
|
|
190
|
+
{
|
|
191
|
+
style: 'cancel',
|
|
192
|
+
text: t('Cancel'),
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
onPress: async () => {
|
|
196
|
+
await blockUser(...args);
|
|
197
|
+
},
|
|
198
|
+
style: 'destructive',
|
|
199
|
+
text: t('Block'),
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
);
|
|
203
|
+
};
|
|
204
|
+
|
|
182
205
|
actionItems.push({
|
|
183
|
-
action: isBlocked ? unblockUser :
|
|
206
|
+
action: isBlocked ? unblockUser : blockUserWithConfirmation,
|
|
184
207
|
Icon: (props) => <ChannelActionsIcon Icon={BlockUser} {...props} />,
|
|
185
208
|
id: 'block',
|
|
186
209
|
label: isBlocked ? t('Unblock User') : t('Block User'),
|
|
@@ -189,8 +212,39 @@ export const buildDefaultChannelActionItems: BuildDefaultChannelActionItems = (
|
|
|
189
212
|
});
|
|
190
213
|
}
|
|
191
214
|
|
|
215
|
+
const leaveWithConfirmation = (...args: Parameters<ChannelActionHandler>) => {
|
|
216
|
+
const channelName = channel.data?.name;
|
|
217
|
+
let name: string;
|
|
218
|
+
if (channelName) {
|
|
219
|
+
name = channelName;
|
|
220
|
+
} else if (isDirectChat) {
|
|
221
|
+
const otherUser = getOtherUserInDirectChannel(channel)?.user;
|
|
222
|
+
name = otherUser?.name || otherUser?.id || '';
|
|
223
|
+
} else {
|
|
224
|
+
name = t('group');
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
Alert.alert(
|
|
228
|
+
isDirectChat ? t('Leave Chat') : t('Leave Group'),
|
|
229
|
+
t("You'll stop receiving messages from {{ name }}. You can rejoin anytime.", { name }),
|
|
230
|
+
[
|
|
231
|
+
{
|
|
232
|
+
style: 'cancel',
|
|
233
|
+
text: t('Cancel'),
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
onPress: async () => {
|
|
237
|
+
await leave(...args);
|
|
238
|
+
},
|
|
239
|
+
style: 'destructive',
|
|
240
|
+
text: t('Leave'),
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
);
|
|
244
|
+
};
|
|
245
|
+
|
|
192
246
|
actionItems.push({
|
|
193
|
-
action:
|
|
247
|
+
action: leaveWithConfirmation,
|
|
194
248
|
Icon: (props) => <ChannelActionsIcon Icon={ArrowBoxLeft} {...props} />,
|
|
195
249
|
id: 'leave',
|
|
196
250
|
label: isDirectChat ? t('Leave Chat') : t('Leave Group'),
|
|
@@ -83,7 +83,29 @@ export const buildDefaultChannelMemberActionItems: BuildDefaultChannelMemberActi
|
|
|
83
83
|
type: 'standard',
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
|
-
action: isBlocked
|
|
86
|
+
action: isBlocked
|
|
87
|
+
? unblockUser
|
|
88
|
+
: (...args: Parameters<UserActions['blockUser']>) => {
|
|
89
|
+
const name = member.user?.name || member.user?.id || '';
|
|
90
|
+
|
|
91
|
+
Alert.alert(
|
|
92
|
+
t('Block {{ name }}', { name }),
|
|
93
|
+
t("They won't be able to message or call you. You can unblock them later."),
|
|
94
|
+
[
|
|
95
|
+
{
|
|
96
|
+
style: 'cancel',
|
|
97
|
+
text: t('Cancel'),
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
onPress: async () => {
|
|
101
|
+
await blockUser(...args);
|
|
102
|
+
},
|
|
103
|
+
style: 'destructive',
|
|
104
|
+
text: t('Block'),
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
);
|
|
108
|
+
},
|
|
87
109
|
Icon: (props) => <ChannelMemberActionsIcon Icon={BlockUser} {...props} />,
|
|
88
110
|
id: 'block',
|
|
89
111
|
label: isBlocked ? t('Unblock User') : t('Block User'),
|
package/src/i18n/ar.json
CHANGED
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "تثبيت الدردشة",
|
|
458
458
|
"Pin Group": "تثبيت المجموعة",
|
|
459
459
|
"Unpin Chat": "إلغاء تثبيت الدردشة",
|
|
460
|
-
"Unpin Group": "إلغاء تثبيت المجموعة"
|
|
460
|
+
"Unpin Group": "إلغاء تثبيت المجموعة",
|
|
461
|
+
"Block": "حظر",
|
|
462
|
+
"Block {{ name }}": "حظر {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "لن يتمكن/تتمكن من مراسلتك أو الاتصال بك. يمكنك إلغاء الحظر لاحقًا.",
|
|
464
|
+
"Leave": "مغادرة",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "ستتوقف عن تلقي الرسائل من {{ name }}. يمكنك الانضمام مجددًا في أي وقت.",
|
|
466
|
+
"group": "المجموعة"
|
|
461
467
|
}
|
package/src/i18n/en.json
CHANGED
|
@@ -242,6 +242,12 @@
|
|
|
242
242
|
"No conversations yet": "No conversations yet",
|
|
243
243
|
"Are you sure you want to delete this group? This can't be undone.": "Are you sure you want to delete this group? This can't be undone.",
|
|
244
244
|
"Are you sure you want to delete this chat? This can't be undone.": "Are you sure you want to delete this chat? This can't be undone.",
|
|
245
|
+
"Block": "Block",
|
|
246
|
+
"Block {{ name }}": "Block {{ name }}",
|
|
247
|
+
"They won't be able to message or call you. You can unblock them later.": "They won't be able to message or call you. You can unblock them later.",
|
|
248
|
+
"Leave": "Leave",
|
|
249
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "You'll stop receiving messages from {{ name }}. You can rejoin anytime.",
|
|
250
|
+
"group": "this group",
|
|
245
251
|
"Delete chat": "Delete chat",
|
|
246
252
|
"Delete group": "Delete group",
|
|
247
253
|
"Archive Chat": "Archive Chat",
|
package/src/i18n/es.json
CHANGED
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "Fijar chat",
|
|
458
458
|
"Pin Group": "Fijar grupo",
|
|
459
459
|
"Unpin Chat": "Desfijar chat",
|
|
460
|
-
"Unpin Group": "Desfijar grupo"
|
|
460
|
+
"Unpin Group": "Desfijar grupo",
|
|
461
|
+
"Block": "Bloquear",
|
|
462
|
+
"Block {{ name }}": "Bloquear a {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "No podrá enviarte mensajes ni llamarte. Puedes desbloquearlo más tarde.",
|
|
464
|
+
"Leave": "Salir",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "Dejarás de recibir mensajes de {{ name }}. Puedes volver a unirte cuando quieras.",
|
|
466
|
+
"group": "el grupo"
|
|
461
467
|
}
|
package/src/i18n/fr.json
CHANGED
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "Épingler la discussion",
|
|
458
458
|
"Pin Group": "Épingler le groupe",
|
|
459
459
|
"Unpin Chat": "Détacher la discussion",
|
|
460
|
-
"Unpin Group": "Détacher le groupe"
|
|
460
|
+
"Unpin Group": "Détacher le groupe",
|
|
461
|
+
"Block": "Bloquer",
|
|
462
|
+
"Block {{ name }}": "Bloquer {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "Cette personne ne pourra plus vous envoyer de messages ni vous appeler. Vous pourrez la débloquer plus tard.",
|
|
464
|
+
"Leave": "Quitter",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "Vous ne recevrez plus de messages de {{ name }}. Vous pouvez rejoindre à tout moment.",
|
|
466
|
+
"group": "ce groupe"
|
|
461
467
|
}
|
package/src/i18n/he.json
CHANGED
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "הצמד/י צ'אט",
|
|
458
458
|
"Pin Group": "הצמד/י קבוצה",
|
|
459
459
|
"Unpin Chat": "בטל/י הצמדת צ'אט",
|
|
460
|
-
"Unpin Group": "בטל/י הצמדת קבוצה"
|
|
460
|
+
"Unpin Group": "בטל/י הצמדת קבוצה",
|
|
461
|
+
"Block": "חסום/חסמי",
|
|
462
|
+
"Block {{ name }}": "חסימת {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "הוא/היא לא יוכל/תוכל לשלוח לך הודעות או להתקשר אליך. ניתן לבטל את החסימה מאוחר יותר.",
|
|
464
|
+
"Leave": "צא/י",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "תפסיק/תפסיקי לקבל הודעות מ-{{ name }}. ניתן להצטרף בחזרה בכל עת.",
|
|
466
|
+
"group": "הקבוצה"
|
|
461
467
|
}
|
package/src/i18n/hi.json
CHANGED
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "चैट पिन करें",
|
|
458
458
|
"Pin Group": "ग्रुप पिन करें",
|
|
459
459
|
"Unpin Chat": "चैट अनपिन करें",
|
|
460
|
-
"Unpin Group": "ग्रुप अनपिन करें"
|
|
460
|
+
"Unpin Group": "ग्रुप अनपिन करें",
|
|
461
|
+
"Block": "ब्लॉक करें",
|
|
462
|
+
"Block {{ name }}": "{{ name }} को ब्लॉक करें",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "वे आपको संदेश या कॉल नहीं कर पाएंगे। आप उन्हें बाद में अनब्लॉक कर सकते हैं।",
|
|
464
|
+
"Leave": "छोड़ें",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "आपको {{ name }} से संदेश मिलना बंद हो जाएंगे। आप कभी भी दोबारा जुड़ सकते हैं।",
|
|
466
|
+
"group": "ग्रुप"
|
|
461
467
|
}
|
package/src/i18n/it.json
CHANGED
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "Fissa chat",
|
|
458
458
|
"Pin Group": "Fissa gruppo",
|
|
459
459
|
"Unpin Chat": "Sfissa chat",
|
|
460
|
-
"Unpin Group": "Sfissa gruppo"
|
|
460
|
+
"Unpin Group": "Sfissa gruppo",
|
|
461
|
+
"Block": "Blocca",
|
|
462
|
+
"Block {{ name }}": "Blocca {{ name }}",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "Non potrà inviarti messaggi né chiamarti. Potrai sbloccarlo in seguito.",
|
|
464
|
+
"Leave": "Esci",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "Non riceverai più messaggi da {{ name }}. Puoi rientrare in qualsiasi momento.",
|
|
466
|
+
"group": "il gruppo"
|
|
461
467
|
}
|
package/src/i18n/ja.json
CHANGED
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "チャットをピン留め",
|
|
458
458
|
"Pin Group": "グループをピン留め",
|
|
459
459
|
"Unpin Chat": "チャットのピン留めを解除",
|
|
460
|
-
"Unpin Group": "グループのピン留めを解除"
|
|
460
|
+
"Unpin Group": "グループのピン留めを解除",
|
|
461
|
+
"Block": "ブロック",
|
|
462
|
+
"Block {{ name }}": "{{ name }} をブロック",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "メッセージや通話ができなくなります。あとでブロックを解除することもできます。",
|
|
464
|
+
"Leave": "退出",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "{{ name }} からのメッセージが届かなくなります。いつでも再参加できます。",
|
|
466
|
+
"group": "グループ"
|
|
461
467
|
}
|
package/src/i18n/ko.json
CHANGED
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "채팅 고정",
|
|
458
458
|
"Pin Group": "그룹 고정",
|
|
459
459
|
"Unpin Chat": "채팅 고정 해제",
|
|
460
|
-
"Unpin Group": "그룹 고정 해제"
|
|
460
|
+
"Unpin Group": "그룹 고정 해제",
|
|
461
|
+
"Block": "차단",
|
|
462
|
+
"Block {{ name }}": "{{ name }} 차단",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "메시지를 보내거나 전화를 걸 수 없게 됩니다. 나중에 차단을 해제할 수 있습니다.",
|
|
464
|
+
"Leave": "나가기",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "{{ name }}에서 더 이상 메시지를 받지 않게 됩니다. 언제든지 다시 참여할 수 있습니다.",
|
|
466
|
+
"group": "그룹"
|
|
461
467
|
}
|
package/src/i18n/nl.json
CHANGED
|
@@ -457,5 +457,11 @@
|
|
|
457
457
|
"Pin Chat": "Chat vastmaken",
|
|
458
458
|
"Pin Group": "Groep vastmaken",
|
|
459
459
|
"Unpin Chat": "Chat losmaken",
|
|
460
|
-
"Unpin Group": "Groep losmaken"
|
|
460
|
+
"Unpin Group": "Groep losmaken",
|
|
461
|
+
"Block": "Blokkeren",
|
|
462
|
+
"Block {{ name }}": "{{ name }} blokkeren",
|
|
463
|
+
"They won't be able to message or call you. You can unblock them later.": "Deze persoon kan je geen berichten sturen of bellen. Je kunt de blokkering later opheffen.",
|
|
464
|
+
"Leave": "Verlaten",
|
|
465
|
+
"You'll stop receiving messages from {{ name }}. You can rejoin anytime.": "Je ontvangt geen berichten meer van {{ name }}. Je kunt op elk moment opnieuw deelnemen.",
|
|
466
|
+
"group": "de groep"
|
|
461
467
|
}
|