-
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
base: gdifolco/WPB-19712_user-groups-update-endpoint
Are you sure you want to change the base?
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
ListChannels
operation to retrieve channels associated with user groups - Implement conditional channel fetching based on
include_channels
query 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.
Co-authored-by: Copilot <[email protected]>
This reverts commit 6985978.
db1b267
to
2dea4d2
Compare
https://wearezeta.atlassian.net/browse/WPB-19713
Checklist
changelog.d
WIP
Design considerations
I'm not happy with the design, I can either:
GalleyAPIAccess
channels
/channelsCount
from the effect