simpler subject of Autocrypt-Setup-Message (#2673)

since some time, core handles per-message-subjects
and Mimefactory also picks that up.

therefore, we can remove the old special handling.
This commit is contained in:
bjoern
2021-09-12 14:34:55 +02:00
committed by GitHub
parent 1bef623c89
commit 50a5e715d2
2 changed files with 1 additions and 5 deletions

View File

@@ -234,7 +234,7 @@ async fn do_initiate_key_transfer(context: &Context) -> Result<String> {
msg = Message::default();
msg.viewtype = Viewtype::File;
msg.param.set(Param::File, setup_file_blob.as_name());
msg.subject = stock_str::ac_setup_msg_subject(context).await;
msg.param
.set(Param::MimeType, "application/autocrypt-setup");
msg.param.set_cmd(SystemMessage::AutocryptSetupMessage);

View File

@@ -388,10 +388,6 @@ impl<'a> MimeFactory<'a> {
let subject = match self.loaded {
Loaded::Message { ref chat } => {
if self.msg.param.get_cmd() == SystemMessage::AutocryptSetupMessage {
return Ok(stock_str::ac_setup_msg_subject(context).await);
}
if !self.msg.subject.is_empty() {
return Ok(self.msg.subject.clone());
}