mirror of
https://github.com/chatmail/core.git
synced 2026-05-01 20:36:31 +03:00
Resultify join_securejoin
This gets rid of ChatId::new(0) usage and is generally a nice first refactoing step. The complexity of cleanup() unravels nicely.
This commit is contained in:
@@ -1877,8 +1877,13 @@ pub unsafe extern "C" fn dc_join_securejoin(
|
||||
}
|
||||
let ctx = &*context;
|
||||
|
||||
block_on(async move { securejoin::dc_join_securejoin(&ctx, &to_string_lossy(qr)).await })
|
||||
.to_u32()
|
||||
block_on(async move {
|
||||
securejoin::dc_join_securejoin(&ctx, &to_string_lossy(qr))
|
||||
.await
|
||||
.map(|chatid| chatid.to_u32())
|
||||
.log_err(ctx, "failed dc_join_securejoin() call")
|
||||
.unwrap_or_default()
|
||||
})
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
||||
Reference in New Issue
Block a user