MSC2782: Pushers with the full event content#2782
MSC2782: Pushers with the full event content#2782Sorunome wants to merge 2 commits intomatrix-org:old_masterfrom
Conversation
| @@ -0,0 +1,58 @@ | |||
| # MSC2782: HTTP Pushers with the full event content | |||
There was a problem hiding this comment.
Isn't this already covered by the spec?
It says:
When pushing notifications for events, the homeserver is expected to include all of the event-related fields in the
/notifyrequest. When the homeserver is performing a push where theformatis"event_id_only", only theevent_id,room_id,counts, anddevicesare required to be populated.
(https://matrix.org/docs/spec/push_gateway/r0.1.1#homeserver-behaviour)
So it sounds like by just omitting data.format (which isn't a required field) when creating the pusher, push notifications are expected to include all of the keys listed in this proposal - and after a quick look it looks like Synapse implements that correctly as well.
There was a problem hiding this comment.
Yes, synapse behaviour on this is even documented in the introduction section.
It doesn't seem clear to soru that the spec implies this behaviour, which has lead to the creation of this MSC.
Perhaps it should be re-worded then to introduce full_event format and make the format required?
There was a problem hiding this comment.
This part:
When pushing notifications for events, the homeserver is expected to include all of the event-related fields in the /notify request
sonds pretty clear to me in that, unless told otherwise, the HS is expected to send everything.
There was a problem hiding this comment.
Perhaps it should be re-worded then to introduce full_event format and make the format required?
meow?
There was a problem hiding this comment.
I don't feel like this is necessary but happy for this question to gather more opinions.
There was a problem hiding this comment.
Actually I'm thinking about it again now, and I've changed my mind and think this is a good idea. The spec as it is is a bit confusing on that point. However, I think the proposal should also make the format mandatory when registering an http pusher, to eliminate any confusion around what happens if you register a pusher with no format.
| ## Potential issues | ||
|
|
||
| None |
There was a problem hiding this comment.
Unfortunately both APNs and FCM have a 4KB limit on the payload size for notifications:
For use cases such as instant messaging, a message can transfer a payload of up to 4096 bytes to a client app.
-- https://firebase.google.com/docs/cloud-messaging
For Voice over Internet Protocol (VoIP) notifications, the maximum payload size is 5 KB (5120 bytes).
For all other remote notifications, the maximum payload size is 4 KB (4096 bytes).
-- https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification
Which means that some portion of events would not be able to be sent in full to clients (they may need to somehow fallback to event_id_only).
Rendered
Signed-off-by: Sorunome mail@sorunome.de