-
Notifications
You must be signed in to change notification settings - Fork 334
WPB-19713: Implement channels and channelsCount in user-groups endpoints
#4776
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
WPB-19713: Implement channels and channelsCount in user-groups endpoints
#4776
Conversation
228209f to
e9cf397
Compare
e9cf397 to
4a6c392
Compare
1dbdc78 to
bd253ff
Compare
c325bbe to
c71074e
Compare
4ed864c to
909912b
Compare
c71074e to
b4af1e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the channels and channelsCount fields in user-groups endpoints, addressing ticket WPB-19713. The implementation adds functionality to fetch and include channel information when retrieving user groups.
Key changes:
- Add
ListChannelsoperation to retrieve channels associated with user groups - Implement conditional channel fetching based on
include_channelsquery parameter - Update API routes and test coverage for the new functionality
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| services/brig/src/Brig/API/Public.hs | Implements channel fetching logic in getUserGroup and getUserGroups handlers |
| services/brig/default.nix | Adds vector dependency for channel count calculations |
| services/brig/brig.cabal | Adds vector library dependency |
| postgres-schema.sql | Contains duplicate table definition (appears to be unintentional) |
| libs/wire-subsystems/test/unit/Wire/MockInterpreters/UserGroupStore.hs | Implements mock interpreter for ListUserGroupChannels |
| libs/wire-subsystems/src/Wire/UserGroupSubsystem/Interpreter.hs | Adds listChannels function with proper authorization checks |
| libs/wire-subsystems/src/Wire/UserGroupSubsystem.hs | Defines ListChannels operation in the subsystem interface |
| libs/wire-subsystems/src/Wire/UserGroupStore/Postgres.hs | Implements PostgreSQL query for listing user group channels |
| libs/wire-subsystems/src/Wire/UserGroupStore.hs | Adds ListUserGroupChannels to the store interface |
| libs/wire-api/src/Wire/API/Routes/Public/Brig.hs | Updates API documentation and adds include_channels query parameter |
| integration/test/Test/UserGroup.hs | Updates test to verify channel inclusion functionality |
| integration/test/API/Brig.hs | Adds helper function for testing channel inclusion |
| changelog.d/2-features/WPB-19713 | Documents the feature addition |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
db1b267 to
2dea4d2
Compare
0823403 to
2b3d03e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
libs/wire-subsystems/test/unit/Wire/MockInterpreters/UserGroupStore.hs
Outdated
Show resolved
Hide resolved
libs/wire-subsystems/test/unit/Wire/MockInterpreters/UserGroupStore.hs
Outdated
Show resolved
Hide resolved
battermann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one todo left in the code which should be resolved otherwise this looks good to me.
| delete from user_group_member where user_group_id = ($1 :: uuid) | ||
| |] | ||
|
|
||
| -- TODO: move to a shared place |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still need to resolve this TODO
Co-authored-by: Copilot <[email protected]>
This reverts commit 6985978.
dc981e3 to
5aa333d
Compare
https://wearezeta.atlassian.net/browse/WPB-19713
Checklist
changelog.dWIP
Design considerations
I'm not happy with the design, I can either:
GalleyAPIAccesschannels/channelsCountfrom the effect