From be36b04d6ebe369397c6ebffd8f8e1a23058d1d9 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Mon, 7 Jun 2021 15:44:59 -0300 Subject: [PATCH 1/3] [FIX] Don't show Block Button inside Group DM Actions --- app/views/RoomActionsView/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/RoomActionsView/index.js b/app/views/RoomActionsView/index.js index 7ed2e1a579..755d8a3fd4 100644 --- a/app/views/RoomActionsView/index.js +++ b/app/views/RoomActionsView/index.js @@ -713,13 +713,13 @@ class RoomActionsView extends React.Component { renderLastSection = () => { const { room, joined } = this.state; const { theme } = this.props; - const { t, blocker } = room; + const { t, blocker, usernames } = room; if (!joined || t === 'l') { return null; } - if (t === 'd') { + if (t === 'd' && usernames.length === 2) { return ( From be8d75bc817760e03827b82b0721f16d642e730a Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Thu, 10 Jun 2021 14:39:44 -0300 Subject: [PATCH 2/3] Use RocketChat.isGroupChat instead of simple if condition --- app/views/RoomActionsView/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/RoomActionsView/index.js b/app/views/RoomActionsView/index.js index 755d8a3fd4..3d9ff661c0 100644 --- a/app/views/RoomActionsView/index.js +++ b/app/views/RoomActionsView/index.js @@ -713,13 +713,13 @@ class RoomActionsView extends React.Component { renderLastSection = () => { const { room, joined } = this.state; const { theme } = this.props; - const { t, blocker, usernames } = room; + const { t, blocker } = room; if (!joined || t === 'l') { return null; } - if (t === 'd' && usernames.length === 2) { + if (t === 'd' && !RocketChat.isGroupChat(room)) { return ( From 6af8c9355c4d16357234c075dcac5764ce02ebc9 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 10 Jun 2021 14:51:12 -0300 Subject: [PATCH 3/3] Add return --- app/views/RoomActionsView/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/RoomActionsView/index.js b/app/views/RoomActionsView/index.js index 3d9ff661c0..087100b029 100644 --- a/app/views/RoomActionsView/index.js +++ b/app/views/RoomActionsView/index.js @@ -756,6 +756,8 @@ class RoomActionsView extends React.Component { ); } + + return null; } teamChannelActions = (t, room) => {