[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 <motor4ik@gmail.com>
This commit is contained in:
yenda 2019-08-25 01:51:04 +02:00 committed by Andrey Shovkoplyas
parent 0210f413ab
commit 397b193de2
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
1 changed files with 2 additions and 2 deletions

View File

@ -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