mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-14 01:45:47 +01:00
parseInt uid in room users check (#7988)
nodebb-write-api fails this check without parsing into an int
This commit is contained in:
committed by
Barış Soner Uşaklı
parent
500ca6658e
commit
1aa520b7a0
@@ -224,7 +224,7 @@ module.exports = function (Messaging) {
|
|||||||
room.messages = messages;
|
room.messages = messages;
|
||||||
room.isOwner = parseInt(room.owner, 10) === parseInt(uid, 10);
|
room.isOwner = parseInt(room.owner, 10) === parseInt(uid, 10);
|
||||||
room.users = users.filter(function (user) {
|
room.users = users.filter(function (user) {
|
||||||
return user && parseInt(user.uid, 10) && parseInt(user.uid, 10) !== uid;
|
return user && parseInt(user.uid, 10) && parseInt(user.uid, 10) !== parseInt(uid, 10);
|
||||||
});
|
});
|
||||||
room.canReply = canReply;
|
room.canReply = canReply;
|
||||||
room.groupChat = room.hasOwnProperty('groupChat') ? room.groupChat : users.length > 2;
|
room.groupChat = room.hasOwnProperty('groupChat') ? room.groupChat : users.length > 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user