[GH-ISSUE #928] Adding a configuration option to force sending a EVENT_MESSAGE #649

Open
opened 2026-05-07 00:26:17 +02:00 by BreizhHardware · 2 comments

Originally created by @TheBlusky on GitHub (Oct 23, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/928

🤔 Problem

When pushing an event, the ntfy server got some heuristic in order to determinate whether or not sending to Firebase an EVENT_MESSAGE or a EVENT_POLL_REQUEST. I think the reason behind it, is to prevent info leakage to Firebase.
Comments says If anonymous read for a topic is not allowed, we cannot send the message along via Firebase. Instead, we send a "poll_request" message, asking the client to poll..
More than that, users might want to always, or never send information to Firebase.

💡 Idea

The idea is to add a configuration option to bypass this heuristic, either by

  • always sending an EVENT_MESSAGE (if the admin does not mind sending information to Firebase)
  • always sending an EVENT_POLL (if the admin always mind sending information to Firebase)
  • keep the actual behavior

For this, a new FIREBASE_EVENT_STRATEGY configuration option can be used.

💻 Target components

  • ntfy server
    • Adding a FIREBASE_EVENT_STRATEGY settings configuration, that might be set to AUTO / MESSAGE / POLL.
    • ntfy/server/server_firebase.go, changing the if line 145
  • ntfy documentation

If this feature might be accepted, I am willing to fork and write a PR with implementation.

Originally created by @TheBlusky on GitHub (Oct 23, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/928 🤔 **Problem** When pushing an event, the ntfy server got some heuristic in order to determinate whether or not sending to Firebase an `EVENT_MESSAGE` or a `EVENT_POLL_REQUEST`. I think the reason behind it, is to prevent info leakage to Firebase. Comments says `If anonymous read for a topic is not allowed, we cannot send the message along via Firebase. Instead, we send a "poll_request" message, asking the client to poll.`. More than that, users might want to always, or never send information to Firebase. :bulb: **Idea** The idea is to add a configuration option to bypass this heuristic, either by - always sending an `EVENT_MESSAGE` (if the admin does not mind sending information to Firebase) - always sending an `EVENT_POLL` (if the admin always mind sending information to Firebase) - keep the actual behavior For this, a new `FIREBASE_EVENT_STRATEGY` configuration option can be used. :computer: **Target components** - ntfy server - Adding a `FIREBASE_EVENT_STRATEGY` settings configuration, that might be set to `AUTO` / `MESSAGE` / `POLL`. - `ntfy/server/server_firebase.go`, changing the `if` line 145 - ntfy documentation If this feature might be accepted, I am willing to fork and write a PR with implementation.
Author
Owner

@FamliarMan commented on GitHub (Feb 26, 2024):

is this feature supported now ?

<!-- gh-comment-id:1963698235 --> @FamliarMan commented on GitHub (Feb 26, 2024): is this feature supported now ?
Author
Owner

@wunter8 commented on GitHub (Feb 26, 2024):

This has not been implemented yet

<!-- gh-comment-id:1964130318 --> @wunter8 commented on GitHub (Feb 26, 2024): This has not been implemented yet
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#649
No description provided.