refactor: Remove superflous check for ChatGroupMemberAdded

This commit is contained in:
Hocuri
2025-09-01 08:16:09 +02:00
parent 0c25646ac2
commit 4a9af2b600

View File

@@ -3513,17 +3513,10 @@ async fn apply_out_broadcast_changes(
);
}
}
} else if let Some(added_addr) = mime_parser.get_header(HeaderDef::ChatGroupMemberAdded) {
// TODO this block can be removed,
// now that all of Alice's devices get to know about Bob joining via Bob's QR message.
// TODO test if this creates some problems with duplicate member-added messages on Alice's device
let contact = lookup_key_contact_by_address(context, added_addr, None).await?;
if let Some(contact) = contact {
better_msg.get_or_insert(
stock_str::msg_add_member_local(context, contact, ContactId::UNDEFINED).await,
);
}
}
// No need to check for ChatGroupMemberAdded:
// The only way to add a member is by having them scan a QR code.
// All devices will receive Bob's vb-request-with-auth message and add him to the channel.
if send_event_chat_modified {
context.emit_event(EventType::ChatModified(chat.id));