Skip to content

Conversation

@eswaldots
Copy link

Exposes listAllUsers method to presence component, so other people (like administrators) can register an see the activity of people without have to filtering by roomId or userId.

@vercel
Copy link

vercel bot commented Sep 10, 2025

@eswaldots is attempting to deploy a commit to the Convex Team on Vercel.

A member of the Team first needs to authorize it.

.withIndex("room_order", (q) => q.eq("roomId", roomId).eq("online", false))
.order("desc")
.take(limit - online.length);
.query("presence")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably need to run prettier here.

},
});

export const listAllUsers = query({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit concerned about exposing this directly via the API since it'll likely hit limits pretty quickly for many applications. One alternative would be to paginate the responses from this. The other would be to just have a listRooms function that lists the rooms and then these can be used with listRoom to get the users in each. That would keep cross-room operations to a minimum and minimize any contention in operations between rooms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants