Refactor dc_set_chat_profile_image, make it a bit rustier and fix bug of not being able to

unset profile_image
This commit is contained in:
jikstra
2019-08-15 17:53:04 +02:00
parent 18b70bff0e
commit f101439175
3 changed files with 52 additions and 77 deletions

View File

@@ -645,7 +645,7 @@ pub unsafe extern "C" fn dc_set_chat_profile_image(
assert!(chat_id > constants::DC_CHAT_ID_LAST_SPECIAL as u32);
let context = &*context;
dc_chat::dc_set_chat_profile_image(context, chat_id, image)
dc_chat::dc_set_chat_profile_image(context, chat_id, &dc_tools::to_string(image)) as libc::c_int
}
#[no_mangle]