matrix-org / sygnal

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

Don't attempt delivery of notification if we have rejected pushkey #315

Closed H-Shay closed 2 years ago

H-Shay commented 2 years ago

Previously we decided to reject pushkeys if default_payload was malformed (i.e. not a dict) but went ahead and attempted delivery with the rejected pushkey anyway. This PR fixes that and changes the code so we do not attempt delivery with a pushkey we have rejected.

While I was in the area I also downgraded the logging error messages to a warning, to reduce sentry spam. This fixes #314. I also amended the warnings to give a little more information on why the pushkey was being rejected.

H-Shay commented 2 years ago

Merged, thanks for the review!