From 118238f03085f03b9ab446d2e8addebd561d4fa9 Mon Sep 17 00:00:00 2001 From: NguyenND Date: Wed, 24 Jun 2026 13:34:53 -0400 Subject: [PATCH] Jun 24 - Set broadcast message limit to 500 characters --- app/routes/broadcast.py | 2 ++ app/templates/admin/broadcast.html | 25 +++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) 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 %}