signal-cli icon indicating copy to clipboard operation
signal-cli copied to clipboard

Feature request: On groupchange

Open Tsjippy opened this issue 4 years ago • 3 comments

When I query a receive Command after someone is added or removed from a group I get the message that something has changed but not what.

would it be possible to tell who the new or removed member is?

Tsjippy avatar Feb 07 '21 13:02 Tsjippy

I solved this in the following way: Whenever I get an empty message, but with the group field filled, I reload the membership information of this group. That will tell me if somebody was added or left. And you should also query the group name if you use it, since changing the name might also be a reason for the same message.

bublath avatar Mar 05 '21 07:03 bublath

That’s how I did it as well. how do you reload it? I store the memberships in the db and then compare. Is there an easier way

Tsjippy avatar Mar 05 '21 08:03 Tsjippy

I'm just keeping it in a hash in memory, since I simply reload it on program init (listGroups, then per group getGroupName, isMember, isGroupBlocked, getGroupMembers). In case of the update I just query the same as above and overwrite the data - no need to compare anything.

bublath avatar Mar 05 '21 11:03 bublath