build: jami-service: account->username always return a fingerprint.
This change is motivated by the fact that Account.registeredName is a volatile account data, not exported along the account and retrieved from the name server. Have it always return Account.username instead, so that the result is reproducible independent of whether networking is available or not. * gnu/build/jami-service.scm (account->username): Always return the account fingerprint. Adjust doc. (id->username): Likewise.
This commit is contained in:
parent
c50231cfcb
commit
21afbf54cd
1 changed files with 3 additions and 6 deletions
|
@ -153,14 +153,11 @@ implementation detail used to identify the accounts in Jami."
|
||||||
(error message username))))
|
(error message username))))
|
||||||
|
|
||||||
(define (account->username account)
|
(define (account->username account)
|
||||||
"Return USERNAME, the registered username associated with ACCOUNT, else its
|
"Return the public key fingerprint of ACCOUNT."
|
||||||
public key fingerprint."
|
(assoc-ref account "Account.username"))
|
||||||
(or (assoc-ref account "Account.registeredName")
|
|
||||||
(assoc-ref account "Account.username")))
|
|
||||||
|
|
||||||
(define (id->username id)
|
(define (id->username id)
|
||||||
"Return USERNAME, the registered username associated with ID, else its
|
"Return the public key fingerprint corresponding to account with ID, else #f."
|
||||||
public key fingerprint, else #f."
|
|
||||||
(account->username (id->account id)))
|
(account->username (id->account id)))
|
||||||
|
|
||||||
(define (get-accounts)
|
(define (get-accounts)
|
||||||
|
|
Reference in a new issue