small refactoring

This commit is contained in:
Hocuri
2025-08-16 20:06:27 +02:00
parent f7844e97c2
commit 51a36d23a2

View File

@@ -3501,14 +3501,9 @@ async fn apply_out_broadcast_changes(
let removed_id = lookup_key_contact_by_fingerprint(context, removed_fpr).await?;
if removed_id == Some(from_id) {
// 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?;
return Ok(GroupChangesInfo {
better_msg: Some("".to_string()),
added_removed_id: None,
silent: true,
extra_msgs: vec![],
});
better_msg = Some("".to_string());
} else if from_id == ContactId::SELF {
if let Some(removed_id) = removed_id {
chat::remove_from_chat_contacts_table(context, chat.id, removed_id).await?;