diff --git a/src/status_im/data_store/realm/schemas/account/v16/contact.cljs b/src/status_im/data_store/realm/schemas/account/v16/contact.cljs index ad9e6304ad..3bcb185751 100644 --- a/src/status_im/data_store/realm/schemas/account/v16/contact.cljs +++ b/src/status_im/data_store/realm/schemas/account/v16/contact.cljs @@ -13,6 +13,7 @@ :mixable? {:type :bool :default false} :status {:type :string :optional true} :fcm-token {:type :string :optional true} + :description {:type :string :optional true} :public-key {:type :string :optional true} :private-key {:type :string diff --git a/src/status_im/ui/screens/contacts/db.cljs b/src/status_im/ui/screens/contacts/db.cljs index 3334bc77cb..61c8a28474 100644 --- a/src/status_im/ui/screens/contacts/db.cljs +++ b/src/status_im/ui/screens/contacts/db.cljs @@ -23,6 +23,7 @@ (spec/def :contact/photo-path (spec/nilable string?)) (spec/def :contact/status (spec/nilable string?)) (spec/def :contact/fcm-token (spec/nilable string?)) +(spec/def :contact/description (spec/nilable string?)) (spec/def :contact/last-updated (spec/nilable int?)) (spec/def :contact/last-online (spec/nilable int?)) @@ -67,7 +68,8 @@ :contact/responses :contact/debug? :contact/subscriptions - :contact/fcm-token])) + :contact/fcm-token + :contact/description])) ;;Contact list ui props (spec/def :contact-list-ui/edit? boolean?) diff --git a/src/status_im/ui/screens/contacts/events.cljs b/src/status_im/ui/screens/contacts/events.cljs index 54b5fcf297..cfb9288a9b 100644 --- a/src/status_im/ui/screens/contacts/events.cljs +++ b/src/status_im/ui/screens/contacts/events.cljs @@ -211,9 +211,12 @@ :timestamp (random/timestamp) :contacts (mapv #(hash-map :identity %) contacts)})]]) +;; TODO(oskarth): Consider getting rid of the :when so we can overwrite default +;; contacts with default_contacts.json This requires changing semantics of +;; update-pending-status (from :add-contacts handler) too. (defn- prepare-default-contacts-events [contacts default-contacts] [[:add-contacts - (for [[id {:keys [name photo-path public-key add-chat? pending? + (for [[id {:keys [name photo-path public-key add-chat? pending? description dapp? dapp-url dapp-hash bot-url unremovable? mixable?]}] default-contacts :let [id' (clojure.core/name id)] :when (not (get contacts id'))] @@ -228,6 +231,7 @@ :dapp? dapp? :dapp-url (:en dapp-url) :bot-url bot-url + :description description :dapp-hash dapp-hash})]]) (defn- prepare-add-chat-events [contacts default-contacts]