Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending Mentions #76

Closed
Jasper-J-R opened this issue Dec 10, 2024 · 1 comment
Closed

Sending Mentions #76

Jasper-J-R opened this issue Dec 10, 2024 · 1 comment

Comments

@Jasper-J-R
Copy link

Jasper-J-R commented Dec 10, 2024

I'm having difficulty sending mentions and would appreciate any help you could provide.

The relevant code is below.
mentions = [{ "name": "OBFUSCATED_UUID", "number": None, "uuid": "OBFUSCATED_UUID", "start": 1, "length": 1 }]
await c.send("TEXT", None, mentions=mentions)
I would expect this to produce a mention based on the mentions json that I got when I saved the info from a real mention example, but it does not. Instead I get a [PingCommand] Error: in the signal-api-logfile.txt and nothing of note in the docker logs for the rest api.

@Era-Dorta
Copy link
Collaborator

Era-Dorta commented Dec 20, 2024

The API for sending and receiving are slightly different. For sending a mention you should do:

 mentions = [{ "author": "OBFUSCATED_UUID", "start": 1, "length": 1 }]

You can check the API for it here https://bbernhard.github.io/signal-cli-rest-api/#/Messages/post_v2_send

This worked fine for me. I'm closing as resolved but feel free to reopen if you still have issues.

I'll add a comment to the functions to make this more clear to users of signalbot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants