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

Web push improvements #186

Open
6 tasks done
bwindels opened this issue Mar 26, 2021 · 2 comments
Open
6 tasks done

Web push improvements #186

bwindels opened this issue Mar 26, 2021 · 2 comments

Comments

@bwindels
Copy link
Contributor

bwindels commented Mar 26, 2021

  • Don't reject push key on every 4xx code
  • Trim message body so we don't exceed 4096 characters
  • Log when returned TTL header is lower than request
  • Support events_only flag on push data, as web push clients can't clear all notifications in response to a push message; the standard says that a notification should always be visible after processing a push event when the page is in the background, if not the browser shows a generic one for you.
    So in the case where you tap notification, close the page again, and the unread=0 notification arrives because the room is marked as read somewhere, you'll receive the unread=0 notification and you don't have the previous notification visible any more, you'll have no choice to either show a generic notification or let the browser show its generic notification in response to the event, where you really don't want to show anything. For this case, you can set events_only: true in the push data and these kind of push messages won't be forwarded, so you don't have the problem.
  • Set Urgency header based on prio field in notification:
    • "high" or absent => "normal"
    • "low" => "low"
  • Support push messages within a room replacing previous ones if immediate delivery is not possible by setting the Topic header to a hash of the room id. This should be enabled with a flag in the push data.
@bwindels
Copy link
Contributor Author

bwindels commented Apr 1, 2021

erikjohnston pushed a commit that referenced this issue Apr 8, 2021
Part of #186:
 - Only reject push key on 404 or 410 response codes
 - Trim message body so we don't exceed 4096 characters
 - Log when returned TTL header is lower than request
 - Support events_only flag on push data, to avoid bogus notifications in browser.
@H-Shay
Copy link
Contributor

H-Shay commented Jan 12, 2022

Looks like these tasks are done, can we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants