From a7b75e5014b6b32722973afdac7acac87aee9dcc Mon Sep 17 00:00:00 2001 From: Michael Terry <mterry@edx.org> Date: Tue, 16 Mar 2021 08:50:34 -0400 Subject: [PATCH] feat: mark forum response notifications transactional The user opts into them when making a post / through the forums UI. They are not truly a marketing email or similar. --- lms/djangoapps/discussion/tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/discussion/tasks.py b/lms/djangoapps/discussion/tasks.py index 6e0a6b864a3..58a149d3994 100644 --- a/lms/djangoapps/discussion/tasks.py +++ b/lms/djangoapps/discussion/tasks.py @@ -57,7 +57,9 @@ def update_discussions_map(context): class ResponseNotification(BaseMessageType): - pass + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.options['transactional'] = True @shared_task(base=LoggedTask) -- GitLab