matrix-org / sygnal

Sygnal: reference Push Gateway for Matrix
Apache License 2.0
165 stars 147 forks source link

Fix error when encountering web pushkeys with missing `endpoint`s #288

Closed squahtx closed 2 years ago

squahtx commented 2 years ago

Fixes #257

squahtx commented 2 years ago

Is endpoint defined anywhere in the spec (or our documentation)? Is it marked as required?

devices.data is pusher-specific according to the spec. Our documentation notes that endpoint and auth are expected: https://github.com/matrix-org/sygnal/blob/main/docs/applications.md#push-key-and-expected-push-data

...and I've just noticed that there is already a check for endpoint and auth down below. The PR needs reworking.