recteate memberlist on groupjoin

This commit is contained in:
Sebastian Klähn
2022-12-27 17:23:04 +01:00
parent b5fc9aedc5
commit f7bf31dbea
2 changed files with 4 additions and 4 deletions

View File

@@ -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?;

View File

@@ -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,
};