isamert / scli

a simple terminal user interface for signal messenger (using signal-cli)
GNU General Public License v3.0
432 stars 40 forks source link

Deleting (orphaned) groups #210

Open ghost opened 1 year ago

ghost commented 1 year ago

I have quite a few groups that I once left via the signal android app, which are showing up in scli

Could there be an option, for example control + d, to delete them?

exquo commented 1 year ago

Looks like #196 (which I have closed prematurely, apparently).

I've assumed that all of the linked devices (including signal-cli) receive the "group-deleted" events, and remove the groups on all of the devices. But after actually trying it, looks like that's not what happens..

If the groups are supposed to be deleted from each of the linked devices individually, then we do need a way to delete groups from scli as well. An alternative (proposed in #196) would be not to show "non-active" groups in scli at all; but there might be a message history that a user might want to see.

Deleting groups from scli would need changes upstream: https://github.com/AsamK/signal-cli/issues/1192. After a group has already been quit on another device (e.g. the phone), it does not seem to be possible to delete such group from signal-cli.

ghost commented 1 year ago

i haven't tried deleting a group while having scli synced yet But deleting a message remotely also doesn't work no matter on which device i do it

do i understand it right that scli is basically just a frontend for signal-cli?

exquo commented 1 year ago

i haven't tried deleting a group while having scli synced yet

It would not show up in signal-cli: https://github.com/AsamK/signal-cli/issues/1192

But deleting a message remotely also doesn't work no matter on which device i do it

I've just tested it: a message remote-deleted in signal-desktop shows up as [Deleted] in scli. Likewise, remote-deleting a msg from scli (with D) shows in signal-desktop as "This message was deleted". So, seems to work here.. If it doesn't work for you - feel free to open a new issue and to describe the details there.

do i understand it right that scli is basically just a frontend for signal-cli?

It would be more accurate to put it like "signal-cli is a backend for scli". In that, for scli it would be possible to replace signal-cli usage with something else, like signald, or one of signal-cli's own alternative interfaces (e.g. JSON-RPC). The bulk of scli is not hard-tied to signal-cli, although it's pretty tightly coupled, being the only backend to ever be used. But scli with a different backend would pretty much "remain itself". Writing another client around signal-cli from scratch would create a completely different app.

ghost commented 1 year ago

okay, I tested the message deleting and

a message written from my phone can be deleted on both devices via scli it only gets deleted on the phone when remote deleted via the phone

a message written from scli doesnt get deleted on my phone via scli remote delete also it cannot even be remote deleted from my phone (no option for that, only for self deletion)

Oh okay Sadly don't really understand the code, as i really like the UI :)

exquo commented 1 year ago

In the meantime (until AsamK/signal-cli#1192 is implemented), groups can be deleted manually from signal-cli (while scli is not running):

signal-cli quitGroup -g <GROUP_ID> --delete

To get groupIDs: signal-cli listGroups

ghost commented 1 year ago

that worked, thank you ^^