Don't send to blocked users

This commit is contained in:
Scott Nonnenberg 2022-02-24 18:40:56 -08:00 committed by GitHub
parent de942e1af2
commit fc62fd4564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 55 additions and 5 deletions

View file

@ -27,8 +27,11 @@ export function getConversationMembers(
members.map(member => {
const conversation = window.ConversationController.get(member.uuid);
// In groups we won't sent to contacts we believe are unregistered
if (conversation && conversation.isUnregistered()) {
// In groups we won't sent to blocked contacts or those we think are unregistered
if (
conversation &&
(conversation.isUnregistered() || conversation.isBlocked())
) {
return null;
}
@ -42,8 +45,11 @@ export function getConversationMembers(
conversationAttrs.members.map(id => {
const conversation = window.ConversationController.get(id);
// In groups we won't send to contacts we believe are unregistered
if (conversation && conversation.isUnregistered()) {
// In groups we won't sent to blocked contacts or those we think are unregistered
if (
conversation &&
(conversation.isUnregistered() || conversation.isBlocked())
) {
return null;
}