Skip to content
Snippets Groups Projects
Unverified Commit dec2dfa0 authored by Gabe Mulley's avatar Gabe Mulley Committed by GitHub
Browse files

Merge pull request #17754 from edx/mulby/email-send-noninteraction

mark email sent events as non-interactions
parents 5dc13d06 83b24e04
No related merge requests found
......@@ -85,7 +85,8 @@ def _track_notification_sent(message, context):
'uuid': unicode(message.uuid),
'send_uuid': unicode(message.send_uuid),
'thread_id': context['thread_id'],
'thread_created_at': date.deserialize(context['thread_created_at'])
'thread_created_at': date.deserialize(context['thread_created_at']),
'nonInteraction': 1,
}
analytics.track(
user_id=context['thread_author_id'],
......
......@@ -298,6 +298,8 @@ class TaskTestCase(ModuleStoreTestCase):
for key, entry in test_props.items():
setattr(message, key, entry)
test_props['nonInteraction'] = True
with mock.patch('analytics.track') as mock_analytics_track:
_track_notification_sent(message, context)
mock_analytics_track.assert_called_once_with(
......
......@@ -216,6 +216,7 @@ def _track_message_sent(site, user, msg):
'language': msg.language,
'uuid': unicode(msg.uuid),
'send_uuid': unicode(msg.send_uuid),
'nonInteraction': 1,
}
course_ids = msg.context.get('course_ids', [])
properties['num_courses'] = len(course_ids)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment