mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
feat: show online users at the top of userlist and update
when they enter/leave
This commit is contained in:
@@ -171,7 +171,9 @@ chatsAPI.users = async (caller, data) => {
|
||||
const [isOwner, isUserInRoom, users] = await Promise.all([
|
||||
messaging.isRoomOwner(caller.uid, data.roomId),
|
||||
messaging.isUserInRoom(caller.uid, data.roomId),
|
||||
messaging.getUsersInRoom(data.roomId, start, stop),
|
||||
messaging.getUsersInRoomFromSet(
|
||||
`chat:room:${data.roomId}:uids:online`, data.roomId, start, stop, true
|
||||
),
|
||||
]);
|
||||
if (!isUserInRoom) {
|
||||
throw new Error('[[error:no-privileges]]');
|
||||
|
||||
Reference in New Issue
Block a user