|
|
@ -368,6 +368,14 @@ var async = require('async'),
|
|
|
|
if (!inRoom) {
|
|
|
|
if (!inRoom) {
|
|
|
|
return next(new Error('[[error:not-in-room]]'));
|
|
|
|
return next(new Error('[[error:not-in-room]]'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Messaging.getUserCountInRoom(roomId, next);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
function(count, next) {
|
|
|
|
|
|
|
|
if (count < 2) {
|
|
|
|
|
|
|
|
return next(new Error('[[error:no-users-in-room]]'));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
user.getUserFields(uid, ['banned', 'email:confirmed'], next);
|
|
|
|
user.getUserFields(uid, ['banned', 'email:confirmed'], next);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
function (userData, next) {
|
|
|
|
function (userData, next) {
|
|
|
|