Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on example in iOS instant notifications #465

Closed
jpmens opened this issue Nov 4, 2022 · 1 comment · Fixed by #466
Closed

Clarification on example in iOS instant notifications #465

jpmens opened this issue Nov 4, 2022 · 1 comment · Fixed by #466
Labels
question This is a question

Comments

@jpmens
Copy link
Contributor

jpmens commented Nov 4, 2022

The example of what is transferred to ntfy.sh in #300 is slightly confusing, and I hope you can clarify this for me.

The example shows what the self-hosted server forwards to the upstream server:

curl -X POST -H "X-Poll-ID: s4PdJozxM8na" https://ntfy.sh/6de73be8dfb7d69e32fb2c00c23fe7adbd8b5504406e3068c273aa24cef4055b
{"id":"4HsClFEuCIcs","time":1654087955,"event":"poll_request","topic":"6de73be8dfb7d69e32fb2c00c23fe7adbd8b5504406e3068c273aa24cef4055b","message":"New message","poll_id":"s4PdJozxM8na"}

Is the attribute message really contained in what is sent upstream? IMO that would defeat the actual purpose of hiding the published data.

@binwiederhier
Copy link
Owner

It literally sends the message "New message" for every message. Even if your message is "Some other message", the message will always be "New message". This is so that if iOS cannot talk to the selfhosted server (in time, or at all), it'll show "New message" as a popup.

newMessageBody = "New message" // Used in poll requests as generic message

func newPollRequestMessage(topic, pollID string) *message {

m = newPollRequestMessage(t.ID, m.PollID)

@binwiederhier binwiederhier added the question This is a question label Nov 5, 2022
jpmens added a commit to jpmens/ntfy that referenced this issue Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is a question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants