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

Inform the client if it subscribes to a new topic #979

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

karmanyaahm
Copy link
Contributor

@karmanyaahm karmanyaahm commented Dec 16, 2023

  • Reject Matrix with 200 and rejected pushkey instead of returning 5xx
  • Set UnifiedPush 'can't publish' error to 404
  • Implement a NeverSubscribed() method in topics to keep track of new topics
  • add the "new_topic" param to the open message
  • Return new_topic in the open message when any of the list of topics subscribed to is new. Not the most information, but the likelihood of topics from the same client have different statuses is so tiny and rare, that clients can resubscribe all to be safe.

Deployment
I think the Android app needs to be released first, before the server is deployed, so the client can deal with the case of re-registration on 404.

Paired with binwiederhier/ntfy-android#70
Closes #664

@codecov-commenter
Copy link

Codecov Report

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

Comparison is base (bb4b5d2) 65.82% compared to head (ec79778) 65.85%.

Files Patch % Lines
server/server.go 55.55% 3 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #979      +/-   ##
==========================================
+ Coverage   65.82%   65.85%   +0.02%     
==========================================
  Files          53       53              
  Lines        7737     7746       +9     
==========================================
+ Hits         5093     5101       +8     
- Misses       1799     1801       +2     
+ Partials      845      844       -1     

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

@karmanyaahm karmanyaahm marked this pull request as ready for review December 17, 2023 23:20
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.

UnifiedPush: Respond with 404/409/... to Mastodon/etc. instead of 507 based on User-Agent
2 participants