-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add membersByHighestRole
endpoints
#29870
base: develop
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: cd44cfc The changes in this PR will be included in the next version bump. This PR includes changesets to release 31 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #29870 +/- ##
===========================================
+ Coverage 53.18% 54.35% +1.16%
===========================================
Files 2263 2276 +13
Lines 49675 50207 +532
Branches 10114 10373 +259
===========================================
+ Hits 26422 27291 +869
+ Misses 20835 20422 -413
- Partials 2418 2494 +76
Flags with carried forward coverage won't be shown. Click here to find out more. |
…nto feat/members-by-role
groups.membersByRole
endpointgroups.membersByHighestRole
endpoint
groups.membersByHighestRole
endpointmembersByHighestRole
endpoints
following your description, this is then basically a filter right? I'm not understanding the connection between the description (filtering by and if it's just a filter why can it not be added to existing members endpoints? |
Hey @debdutdeb ! Yeah, it is some sort of filter, but since this filter wouldn't be applied to a field that is returned in the endpoint, I felt like this should be something else (new). Just like we have the Although I've taken the decision to split this in a new endpoint for now, this still needs to be discussed with the Archicteture team, so it may change 🤔 But I'm sure that adding a new param to the
We're not just filtering by There is an improvement planned to members lists in rooms: instead of displaying a single list with all the users, we're going to split it in multiple lists (one for owners, other for moderators, other for leaders, and other list for any other role or no role at all) that's where this new endpoint fits. Note: we changed the approach, so this comment is outdated. Read the PR's description. |
This PR currently has a merge conflict. Please resolve this and then re-add the |
…nto feat/members-by-role
…nto feat/members-by-role
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
Proposed changes (including videos or screenshots)
channels.membersByHighestRole
andgroups.membersByHighestRole
endpoints to enable users to retrieve members of a room ordered by their highest (most important) role.Issue(s)
Steps to test or reproduce
The endpoint's usage is the same as the current
.members
:And results are as follows:
members
array contains a list of users ordered from highest to lowest role.roleLevel
field (inside thehighestRole
object), which ranges from 0 to 2. 0 is used for owners, 1 is used for moderators and 2 is used for any other room scoped roles..members
endpoints, except from the newhighestRole
object (which contains thelevel
androle
fields) andstatusConnection
. Theroles
field returned within each user contains only room scoped roles (and not global roles, as in the.members
endpoints).Note: The same applies to the
channels.membersByHighestRole
endpointFurther comments
The following rank between room scoped roles is used: Owner > Moderator > Other room scoped roles.
TC-837