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]
|
:<- [:chats/current-raw-chat]
|
||||||
:<- [:multiaccount/public-key]
|
:<- [:multiaccount/public-key]
|
||||||
:<- [:communities/current-community]
|
:<- [:communities/current-community]
|
||||||
(fn [[{:keys [group-chat] :as current-chat}
|
:<- [:contacts/blocked-set]
|
||||||
my-public-key
|
(fn [[{:keys [group-chat chat-id] :as current-chat} my-public-key community blocked-users-set]]
|
||||||
community]]
|
|
||||||
(when current-chat
|
(when current-chat
|
||||||
(cond-> current-chat
|
(cond-> current-chat
|
||||||
(chat.models/public-chat? current-chat)
|
(chat.models/public-chat? current-chat)
|
||||||
|
@ -1051,7 +1050,7 @@
|
||||||
(assoc :show-input? true)
|
(assoc :show-input? true)
|
||||||
|
|
||||||
(not group-chat)
|
(not group-chat)
|
||||||
(assoc :show-input? true)))))
|
(assoc :show-input? (not (contains? blocked-users-set chat-id)))))))
|
||||||
|
|
||||||
(re-frame/reg-sub
|
(re-frame/reg-sub
|
||||||
:chats/current-chat-chat-view
|
:chats/current-chat-chat-view
|
||||||
|
|
Loading…
Reference in New Issue