sygnal icon indicating copy to clipboard operation
sygnal copied to clipboard

Web push improvements

Open bwindels opened this issue 3 years ago • 2 comments

  • [x] Don't reject push key on every 4xx code
  • [x] Trim message body so we don't exceed 4096 characters
  • [x] Log when returned TTL header is lower than request
  • [x] 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.
  • [x] Set Urgency header based on prio field in notification:
    • "high" or absent => "normal"
    • "low" => "low"
  • [x] 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 avatar Mar 26 '21 13:03 bwindels

https://autopush.readthedocs.io/en/latest/http.html#error-codes

bwindels avatar Apr 01 '21 17:04 bwindels

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

H-Shay avatar Jan 12 '22 18:01 H-Shay