-
Notifications
You must be signed in to change notification settings - Fork 184
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
Improve Apprise integration, with a focus on Ntfy #619
Conversation
], | ||
title="⚽ Message title ⚽", | ||
message="⚽ Notification message ⚽", | ||
data={"priority": "high", "tags": "foo,bar", "click": "https://httpbin.org/headers"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, tags
are propagated 1:1 from a string to a string, without any transformation in between.
The Apprise Ntfy parameter breakdown documentation says:
Variable | Required | Description |
---|---|---|
tags | No | The ntfy tags to associate with the ntfy post. Use a comma and/or space to specify more then one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, @zoic21 outlined at #607 (comment), that they would like to submit tags
as a list
? Please raise your voice if this would be important to you, then we can try to add a corresponding translator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
No string to string is better, I used array because it's mandatory by ntfy when we used json but it's no necessary by apprise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent. Then let's just keep it as is, for the sake of simplicity.
8f13829
to
468a6e2
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #619 +/- ##
==========================================
+ Coverage 36.68% 39.08% +2.40%
==========================================
Files 80 83 +3
Lines 3604 3746 +142
==========================================
+ Hits 1322 1464 +142
Misses 2282 2282
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hello, I make some test with your change but I have some issue. My configuration :
I send this : |
Hi Loïc, thank you for trying this.
I think the message and title are not part of the "Apprise template arguments" list, and are routed a bit differently. In this manner, I think the classic way of configuring them via mqttwarn machinery, using, for example, With kind regards, |
Ok with this configuration :
It's ok for title and message but not for topic, it'send message on all topic, I try with |
Hi again, Status quoI think
I think there is currently no way to propagate the echo hello | apprise --debug "ntfy://user:[email protected]/?topic=foo"
The topic MUST be obtained as URL path instead: echo hello | apprise --debug "ntfy://user:[email protected]/foo"
QuestionSo, with respect to your example URL OutlookPlease let me know if you would have a need to supply the As I will be merging this now, please request such a feature at GH-607 again. Thanks! With kind regards, Footnotes |
With the previous variant, it would use the "cloud" mode incorrectly, because the default code examples should outline the "private" mode instead.
... by propagating the mqttwarn data dictionary into the Apprise plugin template arguments.
58770b6
to
2d3f9ef
Compare
mqttwarn 0.32.0 has been released, including this improvement. Thanks, again! |
Hello, Thank for the release, I test and it's perfectly work. Topic it's not really needed I can manage it with mqtt topic. So it's perfect, thank for your fast correction and release. |
Hi again,
based on what @zoic21 reported at #607 (comment), this patch improves the mqttwarn <-> Apprise integration by propagating the mqttwarn data dictionary into the Apprise plugin template arguments. It is accompanied by a dedicated test case for the Ntfy notification service.
We may discuss some details on this patch before merging. Thanks for your feedback already!
With kind regards,
Andreas.
References