mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[PR #842] Make UP return 410 after topic has expired #1442
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#1442
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/binwiederhier/ntfy/pull/842
Author: @ShadowJonathan
Created: 8/18/2023
Status: 🔄 Open
Base:
main← Head:expire-topic📝 Commits (1)
91a8115Make UP return 410 after topic has expired📊 Changes
2 files changed (+9 additions, -1 deletions)
View changed files
📝
server/errors.go(+1 -0)📝
server/server.go(+8 -1)📄 Description
This resolves https://github.com/binwiederhier/ntfy/issues/664;
If a subscription topic;
t.rateVisitor.Stale()...it will start responding with 410s.
This is to make sure that topics eventually will get deleted on servers like mastodon.
There should not be any race condition on first create; Create sets
lastAccesstonow()the same as a Poll would, throughtopicsFromIDs, which gets indirectly called from http middleware every time a topic is mentioned, such as hereUnless a client somehow reuses a topic, and sends a topic publish link to the application, which uses it before the client has started its first poll on the topic, this should not create a race condition.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.