mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
agent/agent: Use parameter instead of fluid
Change-Id: I365b4346d123b0cc8c71a17e62e25bae37e5fc49
This commit is contained in:
@ -25,8 +25,8 @@
|
||||
#:export (ensure-account
|
||||
ensure-account-from-archive))
|
||||
|
||||
(define-public account-id (make-fluid "afafafafafafafaf"))
|
||||
(define-public peer-id (make-fluid))
|
||||
(define-public account-id (make-parameter "afafafafafafafaf"))
|
||||
(define-public peer-id (make-parameter #f))
|
||||
|
||||
(define* (ensure-account% this-account-id account-details #:optional (wait-for-announcement? #t))
|
||||
(if wait-for-announcement?
|
||||
@ -51,24 +51,24 @@
|
||||
(account:add account-details this-account-id)))
|
||||
|
||||
(let ((details (account:get-details this-account-id)))
|
||||
(fluid-set! peer-id (assoc-ref details "Account.username"))))
|
||||
(peer-id (assoc-ref details "Account.username"))))
|
||||
|
||||
(define* (ensure-account #:key (wait-for-announcement? #t))
|
||||
(jami:info "Ensure account")
|
||||
(ensure-account% (fluid-ref account-id) '(("Account.type" . "RING")
|
||||
("Account.displayName" . "AGENT")
|
||||
("Account.alias" . "AGENT")
|
||||
("Account.archivePassword" . "")
|
||||
("Account.archivePIN" . "")
|
||||
("Account.archivePath" . ""))
|
||||
(ensure-account% (account-id) '(("Account.type" . "RING")
|
||||
("Account.displayName" . "AGENT")
|
||||
("Account.alias" . "AGENT")
|
||||
("Account.archivePassword" . "")
|
||||
("Account.archivePIN" . "")
|
||||
("Account.archivePath" . ""))
|
||||
wait-for-announcement?))
|
||||
|
||||
(define* (ensure-account-from-archive path #:key (wait-for-announcement? #t))
|
||||
(jami:info "Ensure account from archive ~a" path)
|
||||
(ensure-account% (fluid-ref account-id) `(("Account.type" . "RING")
|
||||
("Account.displayName" . "AGENT")
|
||||
("Account.alias" . "AGENT")
|
||||
("Account.archivePassword" . "")
|
||||
("Account.archivePIN" . "")
|
||||
("Account.archivePath" . ,path))
|
||||
(ensure-account% (account-id) `(("Account.type" . "RING")
|
||||
("Account.displayName" . "AGENT")
|
||||
("Account.alias" . "AGENT")
|
||||
("Account.archivePassword" . "")
|
||||
("Account.archivePIN" . "")
|
||||
("Account.archivePath" . ,path))
|
||||
wait-for-announcement?))
|
||||
|
Reference in New Issue
Block a user