diff --git a/app/routes/broadcast.py b/app/routes/broadcast.py index 2380c9f..3d5e608 100644 --- a/app/routes/broadcast.py +++ b/app/routes/broadcast.py @@ -76,6 +76,8 @@ def send(): errors.append('Title must be 255 characters or fewer.') if not body: errors.append('Message body is required.') + elif len(body) > 500: + errors.append('Message must be 500 characters or fewer.') valid_roles = [r for r in target_roles if r in BROADCAST_ROLES] if not valid_roles: errors.append('Select at least one target role.') diff --git a/app/templates/admin/broadcast.html b/app/templates/admin/broadcast.html index ddfbc91..a7fabad 100644 --- a/app/templates/admin/broadcast.html +++ b/app/templates/admin/broadcast.html @@ -48,9 +48,12 @@ Message * -
The full message body shown in the notification and in-app inbox.
+
+ The full message body shown in the notification and in-app inbox. + 0 / 500 +
@@ -149,4 +152,22 @@
+ +{% block scripts %} + {% endblock %}