mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 13:26:38 +03:00
Remove use of ChatId::is_unset
The ChatId::is_unset method is something we need to get rid of to clean up the type. This removes one use-case in generating QR codes for securejoin.
This commit is contained in:
@@ -1875,9 +1875,14 @@ pub unsafe extern "C" fn dc_get_securejoin_qr(
|
||||
return "".strdup();
|
||||
}
|
||||
let ctx = &*context;
|
||||
let chat_id = if chat_id == 0 {
|
||||
None
|
||||
} else {
|
||||
Some(ChatId::new(chat_id))
|
||||
};
|
||||
|
||||
block_on(async move {
|
||||
securejoin::dc_get_securejoin_qr(&ctx, ChatId::new(chat_id))
|
||||
securejoin::dc_get_securejoin_qr(&ctx, chat_id)
|
||||
.await
|
||||
.unwrap_or_else(|| "".to_string())
|
||||
.strdup()
|
||||
|
||||
Reference in New Issue
Block a user