Skip to content
Snippets Groups Projects
Commit 5bb66862 authored by Marcelo Schmidt's avatar Marcelo Schmidt
Browse files

Fixes issue #179 by correctly checking room creator username

parent e6e27ff5
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ Meteor.methods
room = ChatRoom.findOne data.rid
if room.username isnt Meteor.user().username and room.t is 'c'
if room.u.username isnt Meteor.user().username and room.t is 'c'
throw new Meteor.Error 403, '[methods] addUserToRoom -> Not allowed'
# verify if user is already in room
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment