mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-17 10:42:25 -05:00
Message limit added and all tests passing.
This commit is contained in:
@@ -338,6 +338,12 @@ def send_notification(notification_type):
|
||||
}
|
||||
), 400
|
||||
|
||||
if template_object.replaced_content_count > current_app.config.get('SMS_CHAR_COUNT_LIMIT'):
|
||||
return jsonify(
|
||||
result="error",
|
||||
message={'content': ['Content has a character count greater than the limit of {}'.format(
|
||||
current_app.config.get('SMS_CHAR_COUNT_LIMIT'))]}), 400
|
||||
|
||||
if service.restricted and not allowed_to_send_to(
|
||||
notification['to'],
|
||||
itertools.chain.from_iterable(
|
||||
|
||||
Reference in New Issue
Block a user