Change type of dc_msg_t.text to String

Also, remove `send-garbage' command from REPL, since it is not possible to send
non-utf8 string anymore.
This commit is contained in:
Dmitry Bogatov
2019-08-03 11:53:46 +00:00
committed by Floris Bruynooghe
parent d4650ba4a9
commit 765ac2005e
11 changed files with 117 additions and 124 deletions

View File

@@ -100,9 +100,8 @@ pub unsafe fn dc_send_locations_to_chat(
{
if 0 != seconds && !is_sending_locations_before {
msg = dc_msg_new(context, Viewtype::Text);
(*msg).text = context
.stock_system_msg(StockMessage::MsgLocationEnabled, "", "", 0)
.strdup();
(*msg).text =
Some(context.stock_system_msg(StockMessage::MsgLocationEnabled, "", "", 0));
(*msg).param.set_int(Param::Cmd, 8);
dc_send_msg(context, chat_id, msg);
} else if 0 == seconds && is_sending_locations_before {