test: Improve test_leave_broadcast(), fix small bugs I found along the way

This commit is contained in:
Hocuri
2025-09-11 14:48:49 +02:00
parent 632dd28e5b
commit e8fff886a0
2 changed files with 60 additions and 8 deletions

View File

@@ -3592,6 +3592,7 @@ async fn apply_in_broadcast_changes(
}
better_msg.get_or_insert(msg);
send_event_chat_modified = true;
}
}
@@ -3608,7 +3609,9 @@ async fn apply_in_broadcast_changes(
);
}
chat::remove_from_chat_contacts_table(context, chat.id, ContactId::SELF).await?;
chat::remove_from_chat_contacts_table_without_trace(context, chat.id, ContactId::SELF)
.await?;
send_event_chat_modified = true;
} else if !chat.is_self_in_chat(context).await? {
// Apparently, self is in the chat now, because we're receiving messages
chat::add_to_chat_contacts_table(
@@ -3618,6 +3621,7 @@ async fn apply_in_broadcast_changes(
&[ContactId::SELF],
)
.await?;
send_event_chat_modified = true;
}
if let Some(secret) = mime_parser.get_header(HeaderDef::ChatBroadcastSecret) {