From f7bf31dbead2cec67b51f24883a6c3a560177927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kl=C3=A4hn?= Date: Tue, 27 Dec 2022 17:23:04 +0100 Subject: [PATCH] recteate memberlist on groupjoin --- src/chat.rs | 2 -- src/receive_imf.rs | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index c1329c954..0171e633b 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -3984,12 +3984,10 @@ mod tests { remove_contact_from_chat(&alice, alice_chat_id, bob_id).await?; let remove_bob = alice.pop_sent_msg().await; bob.recv_msg(&remove_bob).await; - tokio::time::sleep(std::time::Duration::from_millis(1100)).await; // remove any other member remove_contact_from_chat(&alice, alice_chat_id, claire_id).await?; alice.pop_sent_msg().await; - tokio::time::sleep(std::time::Duration::from_millis(1100)).await; // readd bob add_contact_to_chat(&alice, alice_chat_id, bob_id).await?; diff --git a/src/receive_imf.rs b/src/receive_imf.rs index 43806b273..1863a807a 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -12,7 +12,7 @@ use num_traits::FromPrimitive; use once_cell::sync::Lazy; use regex::Regex; -use crate::chat::{self, Chat, ChatId, ChatIdBlocked, ProtectionStatus}; +use crate::chat::{self, is_contact_in_chat, Chat, ChatId, ChatIdBlocked, ProtectionStatus}; use crate::config::Config; use crate::constants::{Blocked, Chattype, ShowEmails, DC_CHAT_ID_TRASH}; use crate::contact::{ @@ -1603,7 +1603,9 @@ async fn apply_group_changes( let mut recreate_member_list = match mime_parser.get_header(HeaderDef::InReplyTo) { Some(reply_to) if rfc724_mid_exists(context, reply_to).await?.is_none() => true, - Some(_) => false, + Some(_) => { + !is_contact_in_chat(context, chat_id, ContactId::SELF).await? + } None => true, };