Files
notifications-api/app/broadcast_message/broadcast_message_schema.py
Chris Hill-Scott 7c6ae40034 Normalise broadcast content before validating length
This changes the content length validation of the internal API to match
the validation of the public broadcast API[1].

This removes the length check from JSONSchema, which isn’t sophisticated
enough to deal with things like normalising newlines or handling
different encodings.

The admin app should catch these errors before they’re raised here, but
it’s best to be belt and braces.

1.7ab0403ae7/app/v2/broadcast/post_broadcast.py (L53-L63)
2021-04-22 14:42:54 +01:00

2.2 KiB