From aa1a3062944f0cc91e8a383b78d39b31db4a6727 Mon Sep 17 00:00:00 2001 From: flexsurfer Date: Thu, 30 May 2024 14:20:57 +0200 Subject: [PATCH] Wrong bottom sheet for channel in communities without permissions #20031 (#20212) --- .../messages/contact_requests/bottom_drawer/view.cljs | 6 +++++- translations/en.json | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/status_im/contexts/chat/messenger/messages/contact_requests/bottom_drawer/view.cljs b/src/status_im/contexts/chat/messenger/messages/contact_requests/bottom_drawer/view.cljs index 8f4d5f7d95..76bbe93b5e 100644 --- a/src/status_im/contexts/chat/messenger/messages/contact_requests/bottom_drawer/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/contact_requests/bottom_drawer/view.cljs @@ -16,6 +16,8 @@ contact-id]) {:keys [contact-request-state community-id]} (rf/sub [:chats/current-chat-chat-view]) chat-type (rf/sub [:chats/chat-type]) + joined (rf/sub [:communities/community-joined + community-id]) contact-request-send? (or (not contact-request-state) (= contact-request-state constants/contact-request-state-none)) @@ -37,7 +39,9 @@ :else :i/add-user) :action-label (cond (= chat-type :community-chat) - (i18n/label :t/join-community-to-post) + (if joined + (i18n/label :t/no-permissions-to-post) + (i18n/label :t/join-community-to-post)) (= chat-type :group-chat) (i18n/label :t/group-chat-not-member) diff --git a/translations/en.json b/translations/en.json index 196f9bbdd2..5a4315119d 100644 --- a/translations/en.json +++ b/translations/en.json @@ -777,6 +777,7 @@ "joined-community": "You joined “{{community}}”", "join-decentralised-communities": "Join Decentralized Communities", "join-community-to-post": "Join community to post", + "no-permissions-to-post": "Sorry, you don't have permissions to post in this channel", "http-gateway-error": "Oops, request failed!", "sign-request-failed": "Could not sign message", "simple": "Simple",