[PR #1466] [CLOSED] WIP: Update notifications #1613

Closed
opened 2026-05-07 01:02:54 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/1466
Author: @wunter8
Created: 10/18/2025
Status: Closed

Base: mainHead: 303-update-notifications


📝 Commits (3)

  • 2aae357 add sid, mtime, and deleted to message_cache
  • 83b5470 publish messages with a custom sequence ID
  • 8293a24 update notification text using sid in web app

📊 Changes

12 files changed (+287 additions, -35 deletions)

View changed files

📝 server/errors.go (+1 -0)
📝 server/message_cache.go (+60 -19)
📝 server/message_cache_test.go (+26 -3)
📝 server/server.go (+30 -1)
📝 server/server_test.go (+68 -0)
📝 server/types.go (+12 -1)
📝 web/public/static/langs/en.json (+2 -0)
📝 web/public/sw.js (+9 -1)
📝 web/src/app/SubscriptionManager.js (+45 -6)
📝 web/src/app/db.js (+2 -2)
📝 web/src/app/notificationUtils.js (+10 -2)
📝 web/src/components/Notifications.jsx (+22 -0)

📄 Description

This allows notification content to be updated in the web app by sending multiple messages with the same sequence id (sid).

Here is a small video demo:

https://github.com/user-attachments/assets/bc020d1e-5772-446e-bf97-dd6759a0dddc

I tried to make sure that things still work if this new version of the web app subscribes to a topic on an "old" ntfy server (a server that doesn't provide mtime or sid fields).

The server doesn't support "deleting" notifications (dismissing from the notification shade) yet, just updating.

The web app cannot "delete" notifications programmatically since "silent" pushes are not allowed. (i.e., sending a JSON object with a message ID to delete and not showing any notification as a result of that JSON object is not allowed. Deleting should work fine on Android, though.)

@binwiederhier you'll need to decide how we present all this visually in the web app. I just wanted to get the information on there somewhere.

All the revisions of a particular message are attached to the one visible notification, so we could create some sort of dialog/modal to show the past revisions of a message. But I figured we could do that later, once everything else is working.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/1466 **Author:** [@wunter8](https://github.com/wunter8) **Created:** 10/18/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `303-update-notifications` --- ### 📝 Commits (3) - [`2aae357`](https://github.com/binwiederhier/ntfy/commit/2aae3577cb5238a303eec3c8dde82a2c744181b3) add sid, mtime, and deleted to message_cache - [`83b5470`](https://github.com/binwiederhier/ntfy/commit/83b5470bc57a24e25e0fa3daa65ab8573954c7a1) publish messages with a custom sequence ID - [`8293a24`](https://github.com/binwiederhier/ntfy/commit/8293a24cf9a91b9508c970057e9450fdabdca38d) update notification text using sid in web app ### 📊 Changes **12 files changed** (+287 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `server/errors.go` (+1 -0) 📝 `server/message_cache.go` (+60 -19) 📝 `server/message_cache_test.go` (+26 -3) 📝 `server/server.go` (+30 -1) 📝 `server/server_test.go` (+68 -0) 📝 `server/types.go` (+12 -1) 📝 `web/public/static/langs/en.json` (+2 -0) 📝 `web/public/sw.js` (+9 -1) 📝 `web/src/app/SubscriptionManager.js` (+45 -6) 📝 `web/src/app/db.js` (+2 -2) 📝 `web/src/app/notificationUtils.js` (+10 -2) 📝 `web/src/components/Notifications.jsx` (+22 -0) </details> ### 📄 Description This allows notification content to be updated in the web app by sending multiple messages with the same `sequence id` (`sid`). Here is a small video demo: https://github.com/user-attachments/assets/bc020d1e-5772-446e-bf97-dd6759a0dddc I tried to make sure that things still work if this new version of the web app subscribes to a topic on an "old" ntfy server (a server that doesn't provide `mtime` or `sid` fields). The server doesn't support "deleting" notifications (dismissing from the notification shade) yet, just updating. The web app cannot "delete" notifications programmatically since "silent" pushes are not allowed. (i.e., sending a JSON object with a message ID to delete and not showing any notification as a result of that JSON object is not allowed. Deleting should work fine on Android, though.) @binwiederhier you'll need to decide how we present all this visually in the web app. I just wanted to get the information on there somewhere. All the revisions of a particular message are attached to the one visible notification, so we could create some sort of dialog/modal to show the past revisions of a message. But I figured we could do that later, once everything else is working. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:02:54 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1613
No description provided.