From 80eeb8765a2406ce1b3c88faf04a91ca26418604 Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Thu, 7 Feb 2019 07:50:48 +0100 Subject: [PATCH] Relax constraint on filters Before we checked filters are exactly the same as the chats. If there's any state mismatch, this will result in not fetching messages from the mailserver. This might not be necessarily what we want, we probably want to be resilient to this case. Signed-off-by: Andrea Maria Piana --- src/status_im/transport/db.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/status_im/transport/db.cljs b/src/status_im/transport/db.cljs index de2d606c70..a10311be97 100644 --- a/src/status_im/transport/db.cljs +++ b/src/status_im/transport/db.cljs @@ -2,6 +2,7 @@ status-im.transport.db (:require [cljs.spec.alpha :as spec] [clojure.string :as s] + [clojure.set :as sets] status-im.contact.db [status-im.utils.config :as config] [status-im.utils.clocks :as utils.clocks] @@ -132,4 +133,4 @@ chat-id) topic)) (get db :transport/chats))))] - (= chats filters))) + (empty? (sets/difference chats filters))))