diff --git a/app/api/server/v1/channels.js b/app/api/server/v1/channels.js index 76af348d9a6c3..4331baedb61ca 100644 --- a/app/api/server/v1/channels.js +++ b/app/api/server/v1/channels.js @@ -93,28 +93,6 @@ API.v1.addRoute('channels.archive', { authRequired: true }, { }, }); -API.v1.addRoute('channels.close', { authRequired: true }, { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams(), checkedArchived: false }); - - const sub = Subscriptions.findOneByRoomIdAndUserId(findResult._id, this.userId); - - if (!sub) { - return API.v1.failure(`The user/callee is not in the channel "${ findResult.name }.`); - } - - if (!sub.open) { - return API.v1.failure(`The channel, ${ findResult.name }, is already closed to the sender`); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('hideRoom', findResult._id); - }); - - return API.v1.success(); - }, -}); - API.v1.addRoute('channels.counters', { authRequired: true }, { get() { const access = hasPermission(this.userId, 'view-room-administration'); diff --git a/app/api/server/v1/groups.js b/app/api/server/v1/groups.js index 254c5b8853468..6dcbfb0c84e44 100644 --- a/app/api/server/v1/groups.js +++ b/app/api/server/v1/groups.js @@ -122,22 +122,6 @@ API.v1.addRoute('groups.archive', { authRequired: true }, { }, }); -API.v1.addRoute('groups.close', { authRequired: true }, { - post() { - const findResult = findPrivateGroupByIdOrName({ params: this.requestParams(), userId: this.userId, checkedArchived: false }); - - if (!findResult.open) { - return API.v1.failure(`The private group, ${ findResult.name }, is already closed to the sender`); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('hideRoom', findResult.rid); - }); - - return API.v1.success(); - }, -}); - API.v1.addRoute('groups.counters', { authRequired: true }, { get() { const access = hasPermission(this.userId, 'view-room-administration'); diff --git a/app/api/server/v1/im.js b/app/api/server/v1/im.js index f61426949b083..63b5bfef371c9 100644 --- a/app/api/server/v1/im.js +++ b/app/api/server/v1/im.js @@ -48,22 +48,6 @@ API.v1.addRoute(['dm.create', 'im.create'], { authRequired: true }, { }, }); -API.v1.addRoute(['dm.close', 'im.close'], { authRequired: true }, { - post() { - const findResult = findDirectMessageRoom(this.requestParams(), this.user); - - if (!findResult.subscription.open) { - return API.v1.failure(`The direct message room, ${ this.bodyParams.name }, is already closed to the sender`); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('hideRoom', findResult.room._id); - }); - - return API.v1.success(); - }, -}); - API.v1.addRoute(['dm.counters', 'im.counters'], { authRequired: true }, { get() { const access = hasPermission(this.userId, 'view-room-administration'); diff --git a/app/channel-settings/client/views/channelSettings.html b/app/channel-settings/client/views/channelSettings.html index 67b3fb5ad62e4..ef4736fc06f1c 100644 --- a/app/channel-settings/client/views/channelSettings.html +++ b/app/channel-settings/client/views/channelSettings.html @@ -419,7 +419,6 @@

{{> icon block="rc-header__icon" {{#if canEditRoom}} {{/if}} - {{#if canLeaveRoom}} {{/if}} diff --git a/app/slashcommands-hide/client/index.js b/app/slashcommands-hide/client/index.js index 7456d5f32ef31..8b137891791fe 100644 --- a/app/slashcommands-hide/client/index.js +++ b/app/slashcommands-hide/client/index.js @@ -1 +1 @@ -import './hide'; + diff --git a/app/slashcommands-hide/server/index.js b/app/slashcommands-hide/server/index.js index 7456d5f32ef31..8b137891791fe 100644 --- a/app/slashcommands-hide/server/index.js +++ b/app/slashcommands-hide/server/index.js @@ -1 +1 @@ -import './hide'; + diff --git a/app/ui-sidenav/client/sidebarItem.js b/app/ui-sidenav/client/sidebarItem.js index 46e5427589ead..5347b2b6f7e8c 100644 --- a/app/ui-sidenav/client/sidebarItem.js +++ b/app/ui-sidenav/client/sidebarItem.js @@ -134,12 +134,7 @@ Template.sidebarItem.events({ return false; }; - const items = [{ - icon: 'eye-off', - name: t('Hide_room'), - type: 'sidebar-item', - id: 'hide', - }]; + const items = []; if (this.alert) { items.push({ diff --git a/app/ui-utils/client/lib/popover.js b/app/ui-utils/client/lib/popover.js index 300384d7e65a8..f54ae53fadc3c 100644 --- a/app/ui-utils/client/lib/popover.js +++ b/app/ui-utils/client/lib/popover.js @@ -182,10 +182,6 @@ Template.popover.events({ const { rid, name, template } = instance.data.data; const action = e.currentTarget.dataset.id; - if (action === 'hide') { - hide(template, rid, name); - } - if (action === 'leave') { leave(template, rid, name); }