mqtt-tools / mqttwarn

A highly configurable MQTT message router, where the routing targets are notification plugins, primarily written in Python.
https://mqttwarn.readthedocs.io/
Eclipse Public License 2.0
950 stars 183 forks source link

[ntfy] Fix submitting newline characters in notification message text #684

Closed amotl closed 8 months ago

amotl commented 8 months ago

Dear @codebude and @zoic21,

this patch has been grown in July already, but only now I have been able to wrap it up. It is based on the suggestion by @codebude shared at https://github.com/mqtt-tools/mqttwarn/issues/677#issuecomment-1575060446, thank you very much.

With kind regards, Andreas.

P.S.: I will be happy about a review, both on code and/or functionality, either before, or after merging and releasing. If it's about code, commenting on this PR will be the appropriate spot. If it is about the outcome, I'd say we just continue our conversation at GH-677, independently of this PR.

codecov[bot] commented 8 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (6a24a8a) 49.33% compared to head (731afef) 49.51%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #684 +/- ## ========================================== + Coverage 49.33% 49.51% +0.17% ========================================== Files 81 81 Lines 3973 3993 +20 ========================================== + Hits 1960 1977 +17 - Misses 2013 2016 +3 ``` | [Flag](https://app.codecov.io/gh/mqtt-tools/mqttwarn/pull/684/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mqtt-tools) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/mqtt-tools/mqttwarn/pull/684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mqtt-tools) | `49.51% <96.42%> (+0.17%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mqtt-tools#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/mqtt-tools/mqttwarn/pull/684?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mqtt-tools) | Coverage Δ | | |---|---|---| | [mqttwarn/services/ntfy.py](https://app.codecov.io/gh/mqtt-tools/mqttwarn/pull/684?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mqtt-tools#diff-bXF0dHdhcm4vc2VydmljZXMvbnRmeS5weQ==) | `97.27% <96.42%> (-1.94%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codebude commented 8 months ago

Great job! I was looking forward to this release. Thanks! :-)

amotl commented 8 months ago

Wonderful. If this works now, we can close GH-677?

/cc @zoic21