[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:
parent
0210f413ab
commit
397b193de2
|
@ -59,12 +59,12 @@
|
||||||
(:contacts/contacts db)
|
(:contacts/contacts db)
|
||||||
public-key)
|
public-key)
|
||||||
(assoc :last-updated now)
|
(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]))]
|
from-one-to-one-chat? (not (get-in db [:chats (:current-chat-id db) :group-chat]))]
|
||||||
(fx/merge cofx
|
(fx/merge cofx
|
||||||
{:db (-> db
|
{:db (-> db
|
||||||
;; add the contact to blocked contacts
|
;; 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
|
;; update the contact in contacts list
|
||||||
(assoc-in [:contacts/contacts public-key] contact)
|
(assoc-in [:contacts/contacts public-key] contact)
|
||||||
;; remove the 1-1 chat if it exists
|
;; remove the 1-1 chat if it exists
|
||||||
|
|
Loading…
Reference in New Issue