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:
link2xt
2023-07-03 13:34:13 +00:00
parent 8e17e400b3
commit 9c68fac4b6
33 changed files with 248 additions and 325 deletions

View File

@@ -422,7 +422,7 @@ async fn send_handshake_message(
) -> Result<()> {
let mut msg = Message {
viewtype: Viewtype::Text,
text: Some(step.body_text(invite)),
text: step.body_text(invite),
hidden: true,
..Default::default()
};