mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 01:16:29 +03:00
refactor: Remove superflous check for ChatGroupMemberAdded
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user