[PR #48] [MERGED] WIP: Add 'At:'/'In:' headers to support scheduled messages #1206

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

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/48
Author: @binwiederhier
Created: 12/10/2021
Status: Merged
Merged: 12/11/2021
Merged by: @binwiederhier

Base: mainHead: delay


📝 Commits (5)

📊 Changes

16 files changed (+831 additions, -235 deletions)

View changed files

📝 config/config.go (+12 -0)
📝 docs/config.md (+1 -1)
📝 docs/publish.md (+81 -2)
📝 docs/subscribe/api.md (+11 -1)
📝 go.mod (+9 -4)
📝 go.sum (+19 -5)
📝 server/cache.go (+3 -1)
📝 server/cache_mem.go (+74 -39)
📝 server/cache_mem_test.go (+5 -1)
📝 server/cache_sqlite.go (+95 -38)
📝 server/cache_sqlite_test.go (+82 -19)
📝 server/cache_test.go (+33 -7)
📝 server/server.go (+82 -32)
📝 server/server_test.go (+167 -85)
util/time.go (+97 -0)
util/time_test.go (+60 -0)

📄 Description

Supports

curl -H "At: 10pm" -d "Will be delivered later" ntfy./mytopic
curl -H "In: 30min" -d "Will be delivered later" ntfy./mytopic
curl -H "In: 8h" -d "Will be delivered later" ntfy./mytopic
curl -H "At: Monday, 10:30am" -d "Will be delivered later" ntfy./mytopic

Related issue: #39

To do:

  • Docs
  • Test in combination with pruning
  • Tests for migration
  • Possibly natural language support for "In:" and "At" headers

🔄 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/48 **Author:** [@binwiederhier](https://github.com/binwiederhier) **Created:** 12/10/2021 **Status:** ✅ Merged **Merged:** 12/11/2021 **Merged by:** [@binwiederhier](https://github.com/binwiederhier) **Base:** `main` ← **Head:** `delay` --- ### 📝 Commits (5) - [`196c86d`](https://github.com/binwiederhier/ntfy/commit/196c86d12bd424fb2360a4c33fa86526f2862c8f) WIP_ Add 'At:'/'Delay:' headers to support scheduled messages - [`06b4d9c`](https://github.com/binwiederhier/ntfy/commit/06b4d9c83b94b71bf3d1ec563405ed7499106316) Natural language - [`5ef83a7`](https://github.com/binwiederhier/ntfy/commit/5ef83a7ba09e02717aa888082f69bdade737f36d) Test DB migration - [`e8688fe`](https://github.com/binwiederhier/ntfy/commit/e8688fed4b2b752ab3ec3bd724d0a6eceb7ef7f7) Lots more tests - [`01d2116`](https://github.com/binwiederhier/ntfy/commit/01d21165e9dad8935b4da639012727dd3df29dbf) Docs docs docs ### 📊 Changes **16 files changed** (+831 additions, -235 deletions) <details> <summary>View changed files</summary> 📝 `config/config.go` (+12 -0) 📝 `docs/config.md` (+1 -1) 📝 `docs/publish.md` (+81 -2) 📝 `docs/subscribe/api.md` (+11 -1) 📝 `go.mod` (+9 -4) 📝 `go.sum` (+19 -5) 📝 `server/cache.go` (+3 -1) 📝 `server/cache_mem.go` (+74 -39) 📝 `server/cache_mem_test.go` (+5 -1) 📝 `server/cache_sqlite.go` (+95 -38) 📝 `server/cache_sqlite_test.go` (+82 -19) 📝 `server/cache_test.go` (+33 -7) 📝 `server/server.go` (+82 -32) 📝 `server/server_test.go` (+167 -85) ➕ `util/time.go` (+97 -0) ➕ `util/time_test.go` (+60 -0) </details> ### 📄 Description Supports ``` curl -H "At: 10pm" -d "Will be delivered later" ntfy./mytopic curl -H "In: 30min" -d "Will be delivered later" ntfy./mytopic curl -H "In: 8h" -d "Will be delivered later" ntfy./mytopic curl -H "At: Monday, 10:30am" -d "Will be delivered later" ntfy./mytopic ``` Related issue: #39 To do: - [x] Docs - [x] Test in combination with pruning - [x] Tests for migration - [x] Possibly natural language support for "In:" and "At" headers --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:01:00 +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#1206
No description provided.