fix 9597 mailserver when login offline

Signed-off-by: yenda <eric@status.im>
This commit is contained in:
yenda 2019-12-06 15:41:54 +01:00
parent 54cf783d5b
commit 4fa275bb05
No known key found for this signature in database
GPG Key ID: 0095623C0069DCE6
1 changed files with 19 additions and 15 deletions

View File

@ -287,6 +287,7 @@
- mailserver connected: we mark the mailserver as trusted peer"
[{:keys [db] :as cofx} previous-summary]
(when (:multiaccount db)
(if (:mailserver/current-id db)
(let [{:keys [peers-summary peers-count]} db
{:keys [address sym-key-id] :as mailserver} (fetch-current db)
mailserver-was-registered? (registered-peer? previous-summary
@ -301,7 +302,10 @@
mailserver-added?
(mark-trusted-peer cofx)
mailserver-removed?
(connect-to-mailserver cofx)))))
(connect-to-mailserver cofx)))
;; if there is no current mailserver defined,
;; we set it first
(set-current-mailserver cofx))))
(defn adjust-request-for-transit-time
[from]