From f31bb4a4b247f4853f3b3651f63f4a237ade5604 Mon Sep 17 00:00:00 2001 From: yenda Date: Tue, 19 Feb 2019 17:40:07 +0100 Subject: [PATCH] [fix 7521] error when receiving message from blocked user Signed-off-by: yenda --- src/status_im/notifications/core.cljs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/status_im/notifications/core.cljs b/src/status_im/notifications/core.cljs index b73d9e83c8..15154cd228 100644 --- a/src/status_im/notifications/core.cljs +++ b/src/status_im/notifications/core.cljs @@ -96,9 +96,8 @@ 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 - (-> db :accounts/accounts vals))] + (if-let [account-pubkey (hash->pubkey contact-pubkey-or-hash + (-> db :accounts/accounts vals))] account-pubkey (if (accounts.db/logged-in? cofx) ;; TODO: for simplicity we're doing a linear lookup of the contacts, @@ -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