From 8fa22831ee98f23031366d39b37595886cba4ef5 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Tue, 13 Feb 2018 13:40:15 +0800 Subject: [PATCH] fix location/phone commands migrations #3256 Signed-off-by: Eric Dvorsak --- .../data_store/realm/schemas/account/v21/core.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/status_im/data_store/realm/schemas/account/v21/core.cljs b/src/status_im/data_store/realm/schemas/account/v21/core.cljs index 7baaa68101..1ae8fa4baf 100644 --- a/src/status_im/data_store/realm/schemas/account/v21/core.cljs +++ b/src/status_im/data_store/realm/schemas/account/v21/core.cljs @@ -14,7 +14,7 @@ [status-im.data-store.realm.schemas.account.v21.browser :as browser] [taoensso.timbre :as log] [cljs.reader :as reader] - [clojure.string :as str])) + [clojure.string :as string])) (def schema [chat/schema chat-contact/schema @@ -45,7 +45,7 @@ content (aget message "content") type (aget message "content-type")] (when (and (= type "command") - (> (str/index-of content "command=location") -1)) + (string/includes? content "command=location")) (aset message "show?" false)))))) (defn remove-phone-messages! [old-realm new-realm] @@ -55,7 +55,7 @@ content (aget message "content") type (aget message "content-type")] (when (and (= type "command") - (> (str/index-of content "command=phone") -1)) + (string/includes? content "command=phone")) (aset message "show?" false)))))) (defn migration [old-realm new-realm]