List who sent a message in CSV download

This is useful if you have lots of people sending messages and want to
report on who’s doing what.

Needs the API updating to return `created_by_name` in its response.
This commit is contained in:
Chris Hill-Scott
2018-09-06 14:41:55 +01:00
parent 29f5a86ff6
commit 20e71499f0
4 changed files with 79 additions and 34 deletions

View File

@@ -366,6 +366,7 @@ def notification_json(
template_type=None,
reply_to_text=None,
client_reference=None,
created_by_name=None,
):
if template is None:
template = template_json(service_id, str(generate_uuid()), type_=template_type)
@@ -415,6 +416,7 @@ def notification_json(
'notification_type': template_type,
'reply_to_text': reply_to_text,
'client_reference': client_reference,
'created_by_name': created_by_name,
} for i in range(rows)],
'total': rows,
'page_size': 50,