Disable chat input for chats with blocked users
Signed-off-by: Audrius Molis <masta@dr.com>
This commit is contained in:
parent
66482863c1
commit
08da76c22a
|
@ -1033,9 +1033,8 @@
|
|||
:<- [:chats/current-raw-chat]
|
||||
:<- [:multiaccount/public-key]
|
||||
:<- [:communities/current-community]
|
||||
(fn [[{:keys [group-chat] :as current-chat}
|
||||
my-public-key
|
||||
community]]
|
||||
:<- [:contacts/blocked-set]
|
||||
(fn [[{:keys [group-chat chat-id] :as current-chat} my-public-key community blocked-users-set]]
|
||||
(when current-chat
|
||||
(cond-> current-chat
|
||||
(chat.models/public-chat? current-chat)
|
||||
|
@ -1051,7 +1050,7 @@
|
|||
(assoc :show-input? true)
|
||||
|
||||
(not group-chat)
|
||||
(assoc :show-input? true)))))
|
||||
(assoc :show-input? (not (contains? blocked-users-set chat-id)))))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:chats/current-chat-chat-view
|
||||
|
|
Loading…
Reference in New Issue