Skip to content
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

How to remove empty members from a group #624

Open
LeoWelter opened this issue Nov 27, 2024 · 1 comment
Open

How to remove empty members from a group #624

LeoWelter opened this issue Nov 27, 2024 · 1 comment

Comments

@LeoWelter
Copy link

I'm using the following code to get group info:
base="http://localhost:8080/" number=env("SIGNAL_PHONENUMBER") url=base + f"v1/groups/{number}" print(url) requests.get(url).json()

resulting in:
{'name': 'XXX', 'id': 'group......=', 'internal_id': '.....=', 'members': ['+1234567890', '', '', '', ''], 'blocked': False, 'pending_invites': [], 'pending_requests': [], 'invite_link': 'https://signal.group/.....', 'admins': ['+31234567890, '']}]
I want to get rid of the empty members in the group since they result in an error message* when sending a message to the group
# *error message: SignalCliRestApiError: Failed to send (some) messages:<deleted info>: Unregistered user "<deleted id>" (8 additional frame(s) were not displayed)

I tried to remove them through the signal app itself, but that does not seem to work.
I tried using a DELETE request as follows (probably obvious):

`data={"members": [""]}

base="http://localhost:8080/"
groupid="group.VXI1ODJnY01QcnBOckZiZVhNMVNGZVArcmtpS0lyNC9yUmRBUHhFWjV3Zz0="
number=env("SIGNAL_PHONENUMBER")
url=base + f"v1/groups/{number}/{groupid}/delete"
print(url)
result = requests.delete(url, json=data)
result.text
`

Any ideas?

@bbernhard
Copy link
Owner

Are you sure that those are empty members and not just members who have hidden their number? (see also #611)

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

No branches or pull requests

2 participants