bbernhard / signal-cli-rest-api

Dockerized Signal Messenger REST API
https://bbernhard.github.io/signal-cli-rest-api/
MIT License
1.36k stars 158 forks source link

Disappearing / expiring group chat messages #587

Open travelvice opened 1 month ago

travelvice commented 1 month ago

The problem

My Signal CLI device was not respecting the message expiration timer in group chats. The secondary CLI device is sending alerts to a group channel, and while the other members of the channel have their messages disappear as expected the untouched message history is made visible when logged into Signal Android with the primary device.

I found references that this was touched on a few years ago, but didn't see any matching documentation in this project's API:

https://github.com/AsamK/signal-cli/issues/620 https://github.com/AsamK/signal-cli/blob/master/man/signal-cli.1.adoc

updateGroup -e EXPIRATION_SECONDS, --expiration EXPIRATION_SECONDS Set expiration time of messages (seconds). To disable expiration set expiration time to 0.

Although undocumented I passed the following body to the PUT /v1/groups/{number}/{groupid} endpoint and I believe it's having the correct impact (but needs more testing).

{
  "EXPIRATION_SECONDS": "86400"
}

Hoping to both confirm this was correct and the setting will remain sticky and respected for the secondary CLI device and if so hopefully get it documented. Thanks!

Are you using the latest released version?

Have you read the troubleshooting page?

What type of installation are you running?

signal-cli-rest-api Docker Container

In which mode are you using the docker container?

JSON-RPC Mode

What's the architecture of your host system?

x86-64

Additional information

No response

bbernhard commented 1 month ago

There's no option yet, but it should be pretty easy to add. I'll have a look