mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 06:52:06 -05:00
Add a column for a service to set SMS prefixing
In future changes, services will be able to control whether their text messages will be prefixed with the name of their service. This commit: - adds a column to store the value of that setting - makes the service model take notice of it, if it were to have a value set It doesn’t: - provide a way of setting the value of this column Currently the column can have three values: - `None` – ignore it (this is what all current services will start as) and continue to determine whether to prefix messages by looking at the sender - `True` – always the service name to the start of text messages - `False` – never add the service name to the start of text messages In the future we’ll migrate all services to be either `True` or `False`, the `None` will go away and all services will have direct control over the setting.
This commit is contained in:
@@ -67,7 +67,8 @@ def create_service(
|
||||
research_mode=False,
|
||||
active=True,
|
||||
do_create_inbound_number=True,
|
||||
email_from=None
|
||||
email_from=None,
|
||||
prefix_sms=None,
|
||||
):
|
||||
service = Service(
|
||||
name=service_name,
|
||||
@@ -76,6 +77,7 @@ def create_service(
|
||||
email_from=email_from if email_from else service_name.lower().replace(' ', '.'),
|
||||
created_by=user or create_user(email='{}@digital.cabinet-office.gov.uk'.format(uuid.uuid4())),
|
||||
sms_sender=sms_sender,
|
||||
prefix_sms=prefix_sms,
|
||||
)
|
||||
|
||||
dao_create_service(service, service.created_by, service_id, service_permissions=service_permissions)
|
||||
|
||||
Reference in New Issue
Block a user