Skip to content

fixes for zulip plugin #1330

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fixes for zulip plugin #1330

wants to merge 2 commits into from

Conversation

drewp
Copy link

@drewp drewp commented May 11, 2025

Description:

Without looking into it much, I found that talking to zulip (self-hosted, zulip/docker-zulip:9.4-0) fails without a 'topic' key and succeeds with one.

Failure looks like this. Notice how the response body is critical for debugging, so I promoted it to warning:

[main] 2025-05-10 21:30:30,245 [WARNING] apprise: Zulip Payload: {'title': 'topic1', 'content': 'line1', 'type': 'stream', 'to': 'alerts'}
[main] 2025-05-10 21:30:30,292 [WARNING] apprise: Failed to send Zulip notification to alerts: Bad Request - Unsupported Parameters., error=400.
[main] 2025-05-10 21:30:30,292 [WARNING] apprise: Response Details:
[main] b'{"result":"error","msg":"Missing topic","code":"BAD_REQUEST"}\n'

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

bin/test.sh didn't work for me, but grep topic test/test_plugin_zulip.py returns nothing :) so CI will probably pass.

@drewp
Copy link
Author

drewp commented May 11, 2025

https://github.com/caronc/apprise/wiki/Notify_zulip should also be updated to say 'title' will be used as the topic, and it must be a nonempty string.

@caronc
Copy link
Owner

caronc commented May 24, 2025

Zulip supports both topic and subject depending on the message type. I think the true fix for this is to allow a ?mode= from the command line (argument) that allows you to control what the payload looks like (and toggle between all of the accepted kinds

Copy link

codecov bot commented May 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.37%. Comparing base (ae7f8b8) to head (a14b88d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1330   +/-   ##
=======================================
  Coverage   99.37%   99.37%           
=======================================
  Files         161      161           
  Lines       21069    21069           
  Branches     3791     3791           
=======================================
  Hits        20938    20938           
  Misses        121      121           
  Partials       10       10           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants