Skip to content

Commit

Permalink
Merge pull request #6840 from matthewshirley/patch-2
Browse files Browse the repository at this point in the history
[FIX] Check that username is not in the room when being muted / unmuted
  • Loading branch information
rodrigok authored May 16, 2017
2 parents 47bdd60 + 76b3442 commit 8c951e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/rocketchat-slashcommands-mute/server/mute.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-slashcommands-mute/server/unmute.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8c951e4

Please sign in to comment.