-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Clarify what fields are required when deleting a pusher #1321
Conversation
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is technically not concerning this msc but the topic: is there a reason why this weird way of unsetting/explicit null is user over a REST DELETE endpoint?
(sorry the android mobile app doesn't allow me to do threads apparently. I hoped this would cause a thread)
Required if `kind` is not `null`. A dictionary of information | ||
for the pusher implementation itself. If `kind` is `http`, | ||
this should contain `url` which is the URL to use to send | ||
notifications to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is necessarily required in principle, although in practice all (both) types of pusher need some information here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Synapse requires the field to be present: https://github.com/matrix-org/synapse/blob/develop/synapse/rest/client/pusher.py#L95-L106
Is there really data required for an email
pusher? The spec doesn't say so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, no, there's no reason any data would be required for email. I'm not super keen on adding synapse's behaviour to the spec here since that could cause other HS impls to also start requiring it which will make the situation worse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that mean that it should also not be required on the GET /_matrix/client/v3/pushers
endpoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm - probably: I'd expect most to include it anyway to guard against lazy clients, but that doesn't mean the spec should force them to. What do others think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly, I think that making data
optional here is even more of a divergence from the established spec, and harder to justify without an MSC. We can make an exception if kind
is null
, because (a) it's clearly nonsense to require a data
in that case and (b) that's what synapse has done forever, but going beyond that seems a stretch.
If we want to relax the requirements for data
when kind
is not null
, let's make it a separate change.
Required if `kind` is not `null`. A dictionary of information | ||
for the pusher implementation itself. If `kind` is `http`, | ||
this should contain `url` which is the URL to use to send | ||
notifications to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly, I think that making data
optional here is even more of a divergence from the established spec, and harder to justify without an MSC. We can make an exception if kind
is null
, because (a) it's clearly nonsense to require a data
in that case and (b) that's what synapse has done forever, but going beyond that seems a stretch.
If we want to relax the requirements for data
when kind
is not null
, let's make it a separate change.
It's not an MSC.
No. That is the topic of #233. |
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Thanks!
The required fields match those used by Synapse, Dendrite and Conduit to delete existing pushers.
Related: #233
Signed-off-by: Kévin Commaille zecakeh@tedomum.fr
Preview: https://pr1321--matrix-spec-previews.netlify.app