security: Make sure that there is no trace of a member after they left

This commit is contained in:
Hocuri
2025-09-10 22:39:02 +02:00
parent 6cd499ebc1
commit 23c04c2134
3 changed files with 39 additions and 17 deletions

View File

@@ -3512,11 +3512,12 @@ async fn apply_out_broadcast_changes(
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?;
chat::remove_from_chat_contacts_table_without_trace(context, chat.id, from_id).await?;
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?;
chat::remove_from_chat_contacts_table_without_trace(context, chat.id, removed_id)
.await?;
better_msg.get_or_insert(
stock_str::msg_del_member_local(context, removed_id, ContactId::SELF).await,