Expose group membership (isMember) on the /v1/groups endpoints#859
Open
pinkustar wants to merge 1 commit into
Open
Expose group membership (isMember) on the /v1/groups endpoints#859pinkustar wants to merge 1 commit into
pinkustar wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
first time ever contributing to this repo, so tell me if I am doing something wrong.
I studied the repo and got some help from Opus 4.8, I checked and verified all tests passed and the API endpoint worked locally
What
signal-cli's
listGroupsoutput includes anisMemberflag indicating whetherthe local account is still a member of a group. The REST wrapper read this into
SignalCliGroupEntrybut dropped it when mapping to the publicGroupEntry/ExpandedGroupEntrytypes — onlyisBlockedwas carried over.As a result,
GET /v1/groups/{number}andGET /v1/groups/{number}/{groupid}returned every group signal-cli still knows about — including ones the account
has left or been removed from — with no way to distinguish them from groups
you're actively in.
Change
memberboolean toGroupEntryandExpandedGroupEntry, mirroring theexisting
blockedfield, populated from signal-cli'sisMember.signalCliGroupEntryToExpandedGroupEntry(...)and add a unit test covering
isMember → member(and the independentisBlocked → blocked) mapping.docs.go,swagger.json) forGroupEntry.member.The field is additive — existing consumers are unaffected. It appears on both
endpoints, in both
expand=falseandexpand=trueresponses.