fix: Don't remember old channel members in the database (#7716)

This PR fixes a bug that old channel members were remembered in the
database even after they left the channel. Concretely, they remained in
the `past_members` table that's only meant for groups.

Though it was not a bad bug; we're anyways not cleaning up old contacts.
This commit is contained in:
Hocuri
2026-01-19 11:35:01 +01:00
committed by GitHub
parent 82a0d6b0ab
commit 29c57ad065
3 changed files with 37 additions and 8 deletions

View File

@@ -4087,7 +4087,7 @@ pub async fn remove_contact_from_chat(
} else {
let mut sync = Nosync;
if chat.is_promoted() {
if chat.is_promoted() && chat.typ != Chattype::OutBroadcast {
remove_from_chat_contacts_table(context, chat_id, contact_id).await?;
} else {
remove_from_chat_contacts_table_without_trace(context, chat_id, contact_id).await?;