From 49035af201c2ef4635c0621cb6222e90294f9bc6 Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Mon, 4 Feb 2019 10:53:55 +0100 Subject: [PATCH] Dont count 1-to-1 topics if not enabled --- src/status_im/transport/db.cljs | 4 +++- src/status_im/transport/message/core.cljs | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/status_im/transport/db.cljs b/src/status_im/transport/db.cljs index 45a849beb5..de2d606c70 100644 --- a/src/status_im/transport/db.cljs +++ b/src/status_im/transport/db.cljs @@ -3,6 +3,7 @@ (:require [cljs.spec.alpha :as spec] [clojure.string :as s] status-im.contact.db + [status-im.utils.config :as config] [status-im.utils.clocks :as utils.clocks] [status-im.constants :as constants])) @@ -127,7 +128,8 @@ chats (into #{:discovery-topic} (keys (filter (fn [[chat-id {:keys [topic one-to-one]}]] (if one-to-one - chat-id + (and config/partitioned-topic-enabled? + chat-id) topic)) (get db :transport/chats))))] (= chats filters))) diff --git a/src/status_im/transport/message/core.cljs b/src/status_im/transport/message/core.cljs index 5052a027e7..9567a35cc1 100644 --- a/src/status_im/transport/message/core.cljs +++ b/src/status_im/transport/message/core.cljs @@ -43,8 +43,7 @@ (receive-message now-in-s chat-id message)) (js-array->seq js-messages))] (apply fx/merge cofx receive-message-fxs)) - (do (log/error "Something went wrong" js-error js-messages) - cofx))) + (log/error "Something went wrong" js-error js-messages))) (fx/defn remove-hash [{:keys [db] :as cofx} envelope-hash]