Skip to content

Commit

Permalink
Banned users and guests no longer see last chat
Browse files Browse the repository at this point in the history
Fixes #96
  • Loading branch information
DerpgonCz committed Jun 23, 2016
1 parent 1670041 commit 5e0bfb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion socketserver/socketserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ var SocketServer = function(server){
roles: Roles.makeClientObj(),
roleOrder: Roles.getOrder(),
staffRoles: Roles.getStaffRoles(),
lastChat: that.room.makePrevChatObj(),
lastChat: ((!socket.user && !config.room.guestCanSeeChat) || (that.room.isUserRestricted((socket.user || {}).uid, 'BAN') && !config.room.bannedCanSeeChat)) ? [] : that.room.makePrevChatObj(),
time: new Date().getTime(),
captchakey: config.apis.reCaptcha.key,
allowemojis: config.room.allowemojis,
Expand Down

0 comments on commit 5e0bfb2

Please sign in to comment.