mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
use language of receiver for protection-messages, show correct sender
This commit is contained in:
@@ -712,6 +712,20 @@ async fn add_parts(
|
||||
// hour, only the message about the change to 1
|
||||
// week is left.
|
||||
ephemeral_timer = EphemeralTimer::Disabled;
|
||||
} else if mime_parser.is_system_message == SystemMessage::ChatProtectionEnabled {
|
||||
set_better_msg(
|
||||
mime_parser,
|
||||
chat_id
|
||||
.get_protection_msg(context, ProtectionStatus::Protected, from_id)
|
||||
.await,
|
||||
);
|
||||
} else if mime_parser.is_system_message == SystemMessage::ChatProtectionDisabled {
|
||||
set_better_msg(
|
||||
mime_parser,
|
||||
chat_id
|
||||
.get_protection_msg(context, ProtectionStatus::Unprotected, from_id)
|
||||
.await,
|
||||
);
|
||||
}
|
||||
|
||||
// change chat protection
|
||||
@@ -1240,7 +1254,9 @@ async fn create_or_lookup_group(
|
||||
recreate_member_list = true;
|
||||
|
||||
if create_protected == ProtectionStatus::Protected {
|
||||
chat_id.add_protection_msg(context, ProtectionStatus::Protected, false).await?;
|
||||
chat_id
|
||||
.add_protection_msg(context, ProtectionStatus::Protected, false, from_id)
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user