mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
recteate memberlist on groupjoin
This commit is contained in:
@@ -3984,12 +3984,10 @@ mod tests {
|
|||||||
remove_contact_from_chat(&alice, alice_chat_id, bob_id).await?;
|
remove_contact_from_chat(&alice, alice_chat_id, bob_id).await?;
|
||||||
let remove_bob = alice.pop_sent_msg().await;
|
let remove_bob = alice.pop_sent_msg().await;
|
||||||
bob.recv_msg(&remove_bob).await;
|
bob.recv_msg(&remove_bob).await;
|
||||||
tokio::time::sleep(std::time::Duration::from_millis(1100)).await;
|
|
||||||
|
|
||||||
// remove any other member
|
// remove any other member
|
||||||
remove_contact_from_chat(&alice, alice_chat_id, claire_id).await?;
|
remove_contact_from_chat(&alice, alice_chat_id, claire_id).await?;
|
||||||
alice.pop_sent_msg().await;
|
alice.pop_sent_msg().await;
|
||||||
tokio::time::sleep(std::time::Duration::from_millis(1100)).await;
|
|
||||||
|
|
||||||
// readd bob
|
// readd bob
|
||||||
add_contact_to_chat(&alice, alice_chat_id, bob_id).await?;
|
add_contact_to_chat(&alice, alice_chat_id, bob_id).await?;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ use num_traits::FromPrimitive;
|
|||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use regex::Regex;
|
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::config::Config;
|
||||||
use crate::constants::{Blocked, Chattype, ShowEmails, DC_CHAT_ID_TRASH};
|
use crate::constants::{Blocked, Chattype, ShowEmails, DC_CHAT_ID_TRASH};
|
||||||
use crate::contact::{
|
use crate::contact::{
|
||||||
@@ -1603,7 +1603,9 @@ async fn apply_group_changes(
|
|||||||
|
|
||||||
let mut recreate_member_list = match mime_parser.get_header(HeaderDef::InReplyTo) {
|
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(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,
|
None => true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user