mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 23:06:32 +03:00
skip protection enabled/disabled messages where they did not appear in the past with verified-groups
this avoids confusion - as long the current core does not communicate with a UI that enables/disables protection, everything looks just the same as in the past :)
This commit is contained in:
committed by
holger krekel
parent
0ae9443e22
commit
e15372531e
@@ -2034,7 +2034,9 @@ pub async fn create_group_chat(
|
|||||||
});
|
});
|
||||||
|
|
||||||
if protect == ProtectionStatus::Protected {
|
if protect == ProtectionStatus::Protected {
|
||||||
chat_id.set_protection(context, protect).await?;
|
// this part is to stay compatible to verified groups,
|
||||||
|
// in some future, we will drop the "protect"-flag from create_group_chat()
|
||||||
|
chat_id.inner_set_protection(context, protect).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(chat_id)
|
Ok(chat_id)
|
||||||
|
|||||||
@@ -1244,13 +1244,16 @@ async fn create_or_lookup_group(
|
|||||||
chat_id_blocked = create_blocked;
|
chat_id_blocked = create_blocked;
|
||||||
recreate_member_list = true;
|
recreate_member_list = true;
|
||||||
|
|
||||||
if create_protected == ProtectionStatus::Protected {
|
// once, we have protected-chats explained in UI, we can uncomment the following lines.
|
||||||
// set from_id=0 as it is not clear that the sender of this random group message
|
// ("verified groups" did not add a message anyway)
|
||||||
// actually really has enabled chat-protection at some point.
|
//
|
||||||
chat_id
|
//if create_protected == ProtectionStatus::Protected {
|
||||||
.add_protection_msg(context, ProtectionStatus::Protected, false, 0)
|
// set from_id=0 as it is not clear that the sender of this random group message
|
||||||
.await?;
|
// actually really has enabled chat-protection at some point.
|
||||||
}
|
//chat_id
|
||||||
|
// .add_protection_msg(context, ProtectionStatus::Protected, false, 0)
|
||||||
|
// .await?;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
// again, check chat_id
|
// again, check chat_id
|
||||||
|
|||||||
Reference in New Issue
Block a user