feat: migrate Ntfy message retrieval from polling to SSE streaming, replacing poll_interval with reconnect_delay for continuous updates.
#20
Reference in New Issue
Block a user
Delete Branch "feat/ntfy-sse"
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?
Switch ntfy message retrieval from polling to SSE streaming
Previously NtfyPoller polled ntfy.sh every 15 seconds using ?poll=1. Messages could arrive up to 15s late.
Changes
• Removed ?poll=1 from the topic URL so ntfy.sh keeps the connection open as a live SSE stream; messages now arrive within network RTT (~1s)
• Replaced poll_interval with reconnect_delay (5s) — only used when the server closes the connection
• Increased socket timeout from 10s → 90s to survive ntfy.sh keepalive heartbeats without spurious reconnects
• Added _build_url(last_id) — tracks the ntfy message ID of the last received event and passes ?since= on reconnect, preventing duplicate message display after a dropped connection
• Cleaned up config.py; since= is now managed internally by the class
poll_intervalwithreconnect_delayfor continuous updates. 6e39a2dad2