Skip to content

Commit

Permalink
Chat: make hidden message reveal staff-only
Browse files Browse the repository at this point in the history
This is in tandem with smogon/pokemon-showdown#2645, and makes regular users unable to unhide text from banned users. Staff (moderator and up) retain this ability.
  • Loading branch information
team1257Simon authored Aug 2, 2016
1 parent 5e3a337 commit 14a41eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/client-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@
$messages = this.$chat.find('.chatmessage-' + user);
if (!$messages.length) break;
$messages.hide().addClass('revealed').find('button').parent().remove();
this.$chat.children().last().append(' <button name="toggleMessages" value="' + user + '" class="subtle"><small>(' + $messages.length + ' line' + ($messages.length > 1 ? 's' : '') + ' from ' + user + ' hidden)</small></button>');
if (this.rankOrder[app.user.get('name').charAt(0)] > 3) this.$chat.children().last().append(' <button name="toggleMessages" value="' + user + '" class="subtle"><small>(' + $messages.length + ' line' + ($messages.length > 1 ? 's' : '') + ' from ' + user + ' hidden)</small></button>');
}
break;

Expand Down

0 comments on commit 14a41eb

Please sign in to comment.