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

Add support to disable notify-self flag on /v2/send endpoint #573

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

ahatius
Copy link
Contributor

@ahatius ahatius commented Aug 7, 2024

Will allow you to send the notify_self property to the /v2/send endpoint. Leaving the field null or setting it to true will cause the current default behavior and should therefore be backwards compatible.

Setting it to false will prevent your devices from generating a notification when you send a message yourself.

The notify_self property controls whether the --notify-self flag is attached to the generated command (which currently is always the case).

Useful when you are using the API for both messages that you want to be notified about (for example when your home assistant sends out an alert) and ones you don't need to be alerted to (when using from a chat application where you compose messages yourself).

I have tried to autogenerate the documentation using swaggo/swag with version v1.8.10 but either the docs haven't been updated for a while or my configuration is wrong because the diff is pretty huge. If desired, I can still run swag init, although I'd be glad to know if there is something I should pay attention to config-wise.

@Huakas
Copy link

Huakas commented Aug 20, 2024

Please merge this, because the --notify-self flag has another annoying side effect for sending messages to groups: the messages that were sent with this flag will appear like they were sent by a different person on devices linked to the same number they were sent with.

If someone's aim of using signal-cli is to "remote control" devices (which mine is), you cannot send messages to groups right now, until this flag is disableable.

@bbernhard bbernhard merged commit 4bf70dd into bbernhard:master Aug 20, 2024
4 checks passed
@bbernhard
Copy link
Owner

Will allow you to send the notify_self property to the /v2/send endpoint. Leaving the field null or setting it to true will cause the current default behavior and should therefore be backwards compatible.

Setting it to false will prevent your devices from generating a notification when you send a message yourself.

The notify_self property controls whether the --notify-self flag is attached to the generated command (which currently is always the case).

Useful when you are using the API for both messages that you want to be notified about (for example when your home assistant sends out an alert) and ones you don't need to be alerted to (when using from a chat application where you compose messages yourself).

I have tried to autogenerate the documentation using swaggo/swag with version v1.8.10 but either the docs haven't been updated for a while or my configuration is wrong because the diff is pretty huge. If desired, I can still run swag init, although I'd be glad to know if there is something I should pay attention to config-wise.

Sorry for taking so long - completely forgot about your PR! Looks good, thanks a lot!

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

Successfully merging this pull request may close these issues.

3 participants