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

Does not notify when sending a message to a group.

Open dxbit opened this issue 1 year ago • 9 comments

The problem

When you send a message to a phone number, there are notifications.

Are you using the latest released version?

  • [X] Yes

Have you read the troubleshooting page?

  • [X] Yes

What type of installation are you running?

signal-cli-rest-api Docker Container

In which mode are you using the docker container?

Native Mode

What's the architecture of your host system?

x86-64

Additional information

No response

dxbit avatar Feb 02 '24 18:02 dxbit

Can you please elaborate a bit more what you did and what the problem is.

bbernhard avatar Feb 03 '24 13:02 bbernhard

I send to endpoint /v2/send a json data: {"number": "+XXXXXXXXXXX","recipients": ["group.STBnUkdSQmo5RGp0QWlNelFnNkNOVzJnWktLMzh1NmZVbC95K0FzbENsTDS="],"message": "My message."}

A message arrives in the group, but a notification about a new message does not appear on the phone.

dxbit avatar Feb 04 '24 06:02 dxbit

I have the same issue as dxbit.

bartekmarczyk6 avatar Feb 25 '24 17:02 bartekmarczyk6

Are there any Updates on this?

ySteini avatar Mar 24 '24 12:03 ySteini

To me that sounds more like a client issue. If sending via the REST API works fine, but the message doesn't generate a notification on the phone I'd say the client settings are fo blame here.

bbernhard avatar Mar 24 '24 14:03 bbernhard

The Problem only exists if I choose to send the message to a group chat but if I send it to my own number (Note to Self) it does send a Notification

ySteini avatar Mar 24 '24 16:03 ySteini

Afaik there are also group specific notification settings, maybe the notifications are turned off there

bbernhard avatar Mar 24 '24 17:03 bbernhard

They're not, but I think I don't get a Notification because the message is sent by my account (the textbubble is blue) if sent to a group, but if it's sent to my phone number which is Note to Self the message shows up as a different one (the textbubble is grey) and signal doesn't notify me if it's my own.

ySteini avatar Mar 24 '24 18:03 ySteini

You mean you're sending a message to a group with the sender's number in, right? You indeed get no notification in that case. This is because there are sync messages sent as well. E.g., if you send a message from your phone in a group, this is synced to your other devices linked to the same number, hence no notifications.

Some related issues: https://github.com/AsamK/signal-cli/issues/1087, https://github.com/AsamK/signal-cli/issues/373#issuecomment-899101954 (which fixed it for sending messages to only yourself, not in group). It could be that it will be solved by the recent commit https://github.com/Turasa/libsignal-service-java/commit/8a91b2e8ee3679b533e78aa40c1b788703c1a71d, which is not yet in signal-cli, though it could also be that this does not work for a named group and only for a list of recipients (not that familiar with the signal code).

What I did was commenting all sendMessage calls with a syncMessageContent arg in SignalServiceMessageSender.java of Turasa/libsignal-service-java, publishing that build to my local maven repo, then building signal-cli with that, and then copying the distTar to signal-cli-rest-api, modifying the Dockerfile that it doesn't download signal-cli but just copies this tar. With this I get notifications. (Docker image is published as matthiasdg/signal-cli-rest:latest or matthiasdg/signal-cli-rest:0.82-pre2; corresponding to the same tag here. It's only arm64; crossbuilding on my macbook with the golang stuff failed and I run it on a raspberry pi anyway. The GraalVM thing will probably not work; I only tested json-rpc).

Note that my only use case is sending messages to a group containing some household members and myself, so it could be that removing all these sync messages is not a proper solution 😅

matthiasdg avatar Mar 30 '24 18:03 matthiasdg