mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-15 07:18:58 -04:00
Merge pull request #3422 from alphagov/fix-sms-preview-activity
Fix preview of text messages on activity page
This commit is contained in:
@@ -16,7 +16,7 @@ from notifications_python_client.errors import HTTPError
|
||||
from notifications_utils.template import (
|
||||
EmailPreviewTemplate,
|
||||
LetterPreviewTemplate,
|
||||
SMSPreviewTemplate,
|
||||
SMSBodyPreviewTemplate,
|
||||
)
|
||||
|
||||
from app import (
|
||||
@@ -421,11 +421,9 @@ def get_preview_of_content(notification):
|
||||
return notification['client_reference']
|
||||
|
||||
if notification['template']['template_type'] == 'sms':
|
||||
return str(SMSPreviewTemplate(
|
||||
return str(SMSBodyPreviewTemplate(
|
||||
notification['template'],
|
||||
notification['personalisation'],
|
||||
redact_missing_personalisation=True,
|
||||
show_prefix=False,
|
||||
))
|
||||
|
||||
if notification['template']['template_type'] == 'email':
|
||||
|
||||
Reference in New Issue
Block a user