mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 16:35:53 +02:00
[GH-ISSUE #1336] Auto-expiring Notifications after N Seconds on Android/IOS #946
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#946
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?
Originally created by @Kris-Sportunity on GitHub (May 13, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1336
Feature Request:
Auto-expiring Notifications after N Seconds on Android/IOS
Description:
It would be very useful if ntfy notifications on Android/IOS could automatically dismiss themselves after a specified duration — for example, after 30 seconds.
Use Case:
Some notifications are time-sensitive and only relevant for a short period (e.g., reminders, alerts, presence triggers). Having them persist clutters the notification area unnecessarily.
This would be particularly helpful for:
Example:
When my game PC consumes more than 100 watt per hour, my automation will turn on game mode (enable game lights and shut the roller blinds etc.). In most cases this is true, but sometimes I'm just doing some video editing.
It would be useful that a notification is send to my phone with a actionable link to disable the game mode. But if i don't do anything for 30 seconds, the notification will remove itself (so it's an opt-out).
Proposed Solution:
Add support for a custom message header such as:
Where the value is the number of seconds after which the notification should be automatically dismissed by the client (the Android/IOS app).
Alternatively, integrate this into the Android app’s handling of messages with a new field like ttl_seconds in the payload or topic-level default.
Notes:
The server does not need to enforce this — the Android client can handle expiration via a scheduled cancel() on the notification manager.
Thank you for the awesome work on ntfy!
@spasche commented on GitHub (May 25, 2025):
Pushover has a similar feature, which they call "Time to Live". API documentation: https://pushover.net/api#ttl