bbernhard / signal-cli-rest-api

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

No longer receive phone number with first message #546

Open mattwr18 opened 5 months ago

mattwr18 commented 5 months ago

Feature Request

Apparently, we no longer receive phone numbers on the first message. See https://github.com/AsamK/signal-cli/discussions/1414

In version signal-cli v0.13.0 , there was a flag added --unrestricted-unidentified-sender to the updateAccount command that can be used to receive the phone number in the first message.

As far as I can tell, this is not available yet through the /v1/accounts/{number}/settings, but doesn't seem to challenging to add. I can see about opening a PR, if you would accept one @bbernhard

tuxedo0801 commented 1 month ago

I have the same issue. Trying to create a small Signal bot that replies to messages it gets. But "sourceNumber" in envelope ist "null". I only get "sourceUuid".

Did not yet test how it behaves with username. I would like to have the least possible things a newcomer user has to change to his Signal settings before using the bot. That's why I opted for the phonenumber. Dumb idea :-(

If this is now an issue: Is switching to username a solution to this?

Or are there just a few steps to do on my side to make it work again?

Any suggestions?

mattwr18 commented 1 month ago

I have tested sending/receiving messages to a username and it works as expected. However, it also works to send/receive messages to the uuid.

For us, we have the contributors onboard with their phone numbers, without setting up a username. I guess no one knows their uuid. When we create the record with their number, we save an onboarding token which we ask them to send to us to complete their onboarding. This way, we can look up the record and save their uuid for future messages.

Not sure the particulars of your use case, but I hope this information helps.

tuxedo0801 commented 1 month ago

Thanks, I'll try this.

tuxedo0801 commented 1 month ago

Still struggling a bit. Did some more testing: Actually, I think I can get rid of the phone number completely.

The idea is: User is sending by signal a "register" message. The bot answers with a generated API KEY (created with inout from UUID and some other stuff).

The user than can use HTTP Requests towards the bot to send notification messages through signal to his phone. And for this, UUID should be sufficient.

BUT: I have an iPhone user that as my bot in his contacts. He sends a message to the bot. The bot receives the message and answers be the UUID the bot sees from incoming message. The user is receiving the message. BUT: NOw the message is coming from "Unknown" instead of the contact he is already aware of...

I also tried to answer the user manually from the bot to the user's phone number. The user is still receiving the message from "unknown" instead of the known contact...

Is this an iPhone issue? Or another (stupid) security setting? Any ideas?

(i know, this is not really relevant to the original post here, but it is related to issues you can get in contact if you try to work around this...)

mattwr18 commented 1 month ago

@tuxedo0801 I'm sorry, I don't have any specific experience with this issue that you experienced. Have you checked the issue list on https://github.com/AsamK/signal-cli?