use language of receiver for protection-messages, show correct sender

This commit is contained in:
B. Petersen
2020-10-04 18:29:36 +02:00
parent 12cf89735c
commit 47f4f2bd08
2 changed files with 38 additions and 9 deletions

View File

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