mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
small refactoring
This commit is contained in:
@@ -3501,14 +3501,9 @@ async fn apply_out_broadcast_changes(
|
|||||||
let removed_id = lookup_key_contact_by_fingerprint(context, removed_fpr).await?;
|
let removed_id = lookup_key_contact_by_fingerprint(context, removed_fpr).await?;
|
||||||
if removed_id == Some(from_id) {
|
if removed_id == Some(from_id) {
|
||||||
// The sender of the message left the broadcast channel
|
// The sender of the message left the broadcast channel
|
||||||
|
// Silently remove them without notifying the user
|
||||||
chat::remove_from_chat_contacts_table(context, chat.id, from_id).await?;
|
chat::remove_from_chat_contacts_table(context, chat.id, from_id).await?;
|
||||||
|
better_msg = Some("".to_string());
|
||||||
return Ok(GroupChangesInfo {
|
|
||||||
better_msg: Some("".to_string()),
|
|
||||||
added_removed_id: None,
|
|
||||||
silent: true,
|
|
||||||
extra_msgs: vec![],
|
|
||||||
});
|
|
||||||
} else if from_id == ContactId::SELF {
|
} else if from_id == ContactId::SELF {
|
||||||
if let Some(removed_id) = removed_id {
|
if let Some(removed_id) = removed_id {
|
||||||
chat::remove_from_chat_contacts_table(context, chat.id, removed_id).await?;
|
chat::remove_from_chat_contacts_table(context, chat.id, removed_id).await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user