test: one more fix

isekai-main
Barış Soner Uşaklı 1 year ago
parent 6b09b7c7d4
commit 8b533d5467

@ -447,16 +447,16 @@ module.exports = function (Messaging) {
user.isAdministrator(uid), user.isAdministrator(uid),
user.isGlobalModerator(uid), user.isGlobalModerator(uid),
]); ]);
if (!room) {
return null;
}
if (!canChat || if (!room ||
(!room.public && !inRoom) || (!room.public && !inRoom) ||
(room.public && ( (room.public && (
Array.isArray(room.groups) && room.groups.length && !isAdmin && !(await groups.isMemberOfAny(uid, room.groups))) Array.isArray(room.groups) && room.groups.length && !isAdmin && !(await groups.isMemberOfAny(uid, room.groups)))
) )
) { ) {
return null;
}
if (!canChat) {
throw new Error('[[error:no-privileges]]'); throw new Error('[[error:no-privileges]]');
} }

Loading…
Cancel
Save