api!: replace message::get_msg_info() with MsgId.get_info()

This commit is contained in:
link2xt
2023-07-05 12:35:19 +00:00
parent 7eeced50d1
commit 578e47666f
6 changed files with 177 additions and 181 deletions

View File

@@ -1877,13 +1877,10 @@ pub unsafe extern "C" fn dc_get_msg_info(
return "".strdup();
}
let ctx = &*context;
block_on(async move {
message::get_msg_info(ctx, MsgId::new(msg_id))
.await
.unwrap_or_log_default(ctx, "failed to get msg id")
.strdup()
})
let msg_id = MsgId::new(msg_id);
block_on(msg_id.get_info(ctx))
.unwrap_or_log_default(ctx, "failed to get msg id")
.strdup()
}
#[no_mangle]