mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-15 07:35:49 -06:00
[PR #1593] Add optional limit parameter to JSON/SSE/raw/WS poll API #1650
Labels
No labels
ai-generated
android-app
android-app
android-app
build
build
dependencies
docs
enhancement
enhancement
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
server
server
unified-push
web-app
website
🔒 security
🔥 HOT
🪲 bug
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/ntfy#1650
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/1593
Author: @epifeny
Created: 2/5/2026
Status: 🔄 Open
Base:
main← Head:feature/json-poll-limit📝 Commits (1)
5e1316afeat(server): optional limit for poll subscriptions (rebased on upstream)📊 Changes
2 files changed (+45 additions, -8 deletions)
View changed files
📝
docs/subscribe/api.md(+14 -0)📝
server/server.go(+31 -8)📄 Description
Supports
limit=1(or any positive N) to return at most that many messages, the most recent ones. No limit or invalid value keeps existing behavior (return all). Useful for Uptime Kuma and similar monitors that expect a single JSON to parse.This is an example that I used from building the image locally and testing it.
Request
Response with
limit=1Response with
limit=2For backwards compatibility, without
limit=at all, works as it does before this change🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.