[fix 7521] error when receiving message from blocked user

Signed-off-by: yenda <eric@status.im>
This commit is contained in:
yenda 2019-02-19 17:40:07 +01:00
parent 9040f0345a
commit f31bb4a4b2
No known key found for this signature in database
GPG Key ID: 0095623C0069DCE6
1 changed files with 3 additions and 4 deletions

View File

@ -96,8 +96,7 @@
Returns original value if not a hash (e.g. already a public key)."
(if (and contact-pubkey-or-hash
(= (count contact-pubkey-or-hash) pn-pubkey-hash-length))
(if-let
[account-pubkey (hash->pubkey contact-pubkey-or-hash
(if-let [account-pubkey (hash->pubkey contact-pubkey-or-hash
(-> db :accounts/accounts vals))]
account-pubkey
(if (accounts.db/logged-in? cofx)
@ -228,7 +227,7 @@
"view-id:" view-id "current-chat-id:" current-chat-id
"from:" from "force:" force)
(merge
(when (and (= (.-length from) pn-pubkey-length)
(when (and (= (count from) pn-pubkey-length)
(show-notification? cofx rehydrated-payload))
{:dispatch [:mailserver/fetch-history from (- (quot now 1000) pull-recent-messages-window)]})
(when (or force