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

@@ -264,10 +264,7 @@ unsafe fn send_handshake_msg(
) {
let mut msg: *mut dc_msg_t = dc_msg_new_untyped(context);
(*msg).type_0 = Viewtype::Text;
(*msg).text = dc_mprintf(
b"Secure-Join: %s\x00" as *const u8 as *const libc::c_char,
step,
);
(*msg).text = Some(format!("Secure-Join: {}", to_string(step)));
(*msg).hidden = 1;
(*msg).param.set_int(Param::Cmd, 7);
if step.is_null() {