From 397b193de21571c9e540373d51ceb44447d880e0 Mon Sep 17 00:00:00 2001 From: yenda Date: Sun, 25 Aug 2019 01:51:04 +0200 Subject: [PATCH] [fix 8831] error when unblocking first blocked contact when unlocking first blocked contact before relogin, an error occurs this is because the first blocked contact is added to a list and you can't disj an element from a list this makes sure the first blocked contact is put into a set Signed-off-by: Andrey Shovkoplyas --- src/status_im/contact/block.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/status_im/contact/block.cljs b/src/status_im/contact/block.cljs index 694bf44193..ddf7730361 100644 --- a/src/status_im/contact/block.cljs +++ b/src/status_im/contact/block.cljs @@ -59,12 +59,12 @@ (:contacts/contacts db) public-key) (assoc :last-updated now) - (update :system-tags conj :contact/blocked)) + (update :system-tags (fnil conj #{}) :contact/blocked)) from-one-to-one-chat? (not (get-in db [:chats (:current-chat-id db) :group-chat]))] (fx/merge cofx {:db (-> db ;; add the contact to blocked contacts - (update :contacts/blocked conj public-key) + (update :contacts/blocked (fnil conj #{}) public-key) ;; update the contact in contacts list (assoc-in [:contacts/contacts public-key] contact) ;; remove the 1-1 chat if it exists