Dont count 1-to-1 topics if not enabled
This commit is contained in:
parent
e2f53418f3
commit
49035af201
|
@ -3,6 +3,7 @@
|
||||||
(:require [cljs.spec.alpha :as spec]
|
(:require [cljs.spec.alpha :as spec]
|
||||||
[clojure.string :as s]
|
[clojure.string :as s]
|
||||||
status-im.contact.db
|
status-im.contact.db
|
||||||
|
[status-im.utils.config :as config]
|
||||||
[status-im.utils.clocks :as utils.clocks]
|
[status-im.utils.clocks :as utils.clocks]
|
||||||
[status-im.constants :as constants]))
|
[status-im.constants :as constants]))
|
||||||
|
|
||||||
|
@ -127,7 +128,8 @@
|
||||||
chats (into #{:discovery-topic}
|
chats (into #{:discovery-topic}
|
||||||
(keys (filter (fn [[chat-id {:keys [topic one-to-one]}]]
|
(keys (filter (fn [[chat-id {:keys [topic one-to-one]}]]
|
||||||
(if one-to-one
|
(if one-to-one
|
||||||
chat-id
|
(and config/partitioned-topic-enabled?
|
||||||
|
chat-id)
|
||||||
topic))
|
topic))
|
||||||
(get db :transport/chats))))]
|
(get db :transport/chats))))]
|
||||||
(= chats filters)))
|
(= chats filters)))
|
||||||
|
|
|
@ -43,8 +43,7 @@
|
||||||
(receive-message now-in-s chat-id message))
|
(receive-message now-in-s chat-id message))
|
||||||
(js-array->seq js-messages))]
|
(js-array->seq js-messages))]
|
||||||
(apply fx/merge cofx receive-message-fxs))
|
(apply fx/merge cofx receive-message-fxs))
|
||||||
(do (log/error "Something went wrong" js-error js-messages)
|
(log/error "Something went wrong" js-error js-messages)))
|
||||||
cofx)))
|
|
||||||
|
|
||||||
(fx/defn remove-hash
|
(fx/defn remove-hash
|
||||||
[{:keys [db] :as cofx} envelope-hash]
|
[{:keys [db] :as cofx} envelope-hash]
|
||||||
|
|
Loading…
Reference in New Issue