refactor: Use Message::new_text() more (#6127)

Follow-up to https://github.com/deltachat/deltachat-core-rust/pull/6123
This commit is contained in:
Hocuri
2024-10-30 13:05:58 +01:00
committed by GitHub
parent 6abadac4bb
commit d6c2c863b7
24 changed files with 66 additions and 111 deletions

View File

@@ -1419,8 +1419,7 @@ impl Context {
msg.param.set(Param::File, blob.as_name());
chat::add_device_msg(self, Some("core-welcome-image"), Some(&mut msg)).await?;
let mut msg = Message::new(Viewtype::Text);
msg.text = welcome_message(self).await;
let mut msg = Message::new_text(welcome_message(self).await);
chat::add_device_msg(self, Some("core-welcome"), Some(&mut msg)).await?;
Ok(())
}