mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 05:16:28 +03:00
refactor: Use self_fingerprint() where it makes sense
This commit is contained in:
@@ -142,7 +142,7 @@ pub async fn get_securejoin_qr(context: &Context, chat: Option<ChatId>) -> Resul
|
|||||||
let auth = create_id();
|
let auth = create_id();
|
||||||
token::save(context, Namespace::Auth, grpid, &auth, time()).await?;
|
token::save(context, Namespace::Auth, grpid, &auth, time()).await?;
|
||||||
|
|
||||||
let fingerprint = get_self_fingerprint(context).await?.hex();
|
let fingerprint = self_fingerprint(context).await?;
|
||||||
|
|
||||||
let self_addr = context.get_primary_self_addr().await?;
|
let self_addr = context.get_primary_self_addr().await?;
|
||||||
let self_addr_urlencoded = utf8_percent_encode(&self_addr, DISALLOWED_CHARACTERS).to_string();
|
let self_addr_urlencoded = utf8_percent_encode(&self_addr, DISALLOWED_CHARACTERS).to_string();
|
||||||
|
|||||||
@@ -152,11 +152,7 @@ async fn test_missing_key_reexecute_securejoin() -> Result<()> {
|
|||||||
bob.sql
|
bob.sql
|
||||||
.execute(
|
.execute(
|
||||||
"DELETE FROM public_keys WHERE fingerprint=?",
|
"DELETE FROM public_keys WHERE fingerprint=?",
|
||||||
(&load_self_public_key(alice)
|
(&self_fingerprint(alice).await.unwrap(),),
|
||||||
.await
|
|
||||||
.unwrap()
|
|
||||||
.dc_fingerprint()
|
|
||||||
.hex(),),
|
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
let chat = Chat::load_from_db(bob, chat_id).await?;
|
let chat = Chat::load_from_db(bob, chat_id).await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user