fix: do not apply group changes to special chats

This is a similar check to the one we have in `save_locations`.
This commit is contained in:
link2xt
2023-11-09 03:12:32 +00:00
parent 9ca049051c
commit d7aecabcaa
2 changed files with 37 additions and 2 deletions

View File

@@ -1723,6 +1723,10 @@ async fn apply_group_changes(
to_ids: &[ContactId],
is_partial_download: bool,
) -> Result<Vec<String>> {
if chat_id.is_special() {
// Do not apply group changes to the trash chat.
return Ok(Vec::new());
}
let mut chat = Chat::load_from_db(context, chat_id).await?;
if chat.typ != Chattype::Group {
return Ok(Vec::new());