From 6ef9c390339d83de97e14819df2bfc926d79bea0 Mon Sep 17 00:00:00 2001 From: Matthew Shirley Date: Sat, 29 Apr 2017 09:24:17 -0700 Subject: [PATCH 1/2] Fixed incorrect error that user is not in room Fixed incorrect error that user is not in the room when the user is in the room. --- packages/rocketchat-slashcommands-mute/server/unmute.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rocketchat-slashcommands-mute/server/unmute.js b/packages/rocketchat-slashcommands-mute/server/unmute.js index c5a3f02cfa10..0d5d6a93e12e 100644 --- a/packages/rocketchat-slashcommands-mute/server/unmute.js +++ b/packages/rocketchat-slashcommands-mute/server/unmute.js @@ -26,7 +26,7 @@ RocketChat.slashCommands.add('unmute', function Unmute(command, params, item) { }, user.language) }); } - if ((room.usernames || []).includes(username)) { + if ((room.usernames || []).includes(username) === false) { return RocketChat.Notifications.notifyUser(Meteor.userId(), 'message', { _id: Random.id(), rid: item.rid, From 76b34422cd57e78253ee05a47e8967b2b2a81e65 Mon Sep 17 00:00:00 2001 From: Matthew Shirley Date: Sat, 29 Apr 2017 09:28:07 -0700 Subject: [PATCH 2/2] Fixed incorrect error that user is not in the room Fixed incorrect error that user is not in the room when the user is in the room. --- packages/rocketchat-slashcommands-mute/server/mute.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rocketchat-slashcommands-mute/server/mute.js b/packages/rocketchat-slashcommands-mute/server/mute.js index 38273ff18fee..21601cebe080 100644 --- a/packages/rocketchat-slashcommands-mute/server/mute.js +++ b/packages/rocketchat-slashcommands-mute/server/mute.js @@ -26,7 +26,7 @@ RocketChat.slashCommands.add('mute', function Mute(command, params, item) { }); return; } - if ((room.usernames || []).includes(username)) { + if ((room.usernames || []).includes(username) === false) { RocketChat.Notifications.notifyUser(Meteor.userId(), 'message', { _id: Random.id(), rid: item.rid,