mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 17:36:30 +03:00
api!: make Message.text non-optional
Message.set_text() and Message.get_text() are modified accordingly
to accept String and return String.
Messages which previously contained None text
are now represented as messages with empty text.
Use Message.set_text("".to_string())
instead of Message.set_text(None).
This commit is contained in:
@@ -130,7 +130,7 @@ impl Context {
|
||||
let mut msg = Message {
|
||||
chat_id,
|
||||
viewtype: Viewtype::Text,
|
||||
text: Some(stock_str::sync_msg_body(self).await),
|
||||
text: stock_str::sync_msg_body(self).await,
|
||||
hidden: true,
|
||||
subject: stock_str::sync_msg_subject(self).await,
|
||||
..Default::default()
|
||||
|
||||
Reference in New Issue
Block a user