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

@@ -36,7 +36,7 @@ use crate::{chat, location};
use std::collections::{hash_map, HashMap};
use crate::context::Context;
use crate::message::{Message, MsgId, Viewtype};
use crate::message::{Message, MsgId};
use crate::chat::ChatId;
use crate::color::color_int_to_hex_string;
@@ -85,8 +85,7 @@ pub(crate) async fn intercept_send_update(
ChatId::create_for_contact(context, ContactId::SELF).await?
};
let mut poi_msg = Message::new(Viewtype::Text);
poi_msg.text = label;
let mut poi_msg = Message::new_text(label);
poi_msg.set_location(lat, lng);
chat::send_msg(context, chat_id, &mut poi_msg).await?;
} else {