Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPP-3932: Move developer mode logging inside complaint loop #5114

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions emails/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1839,15 +1839,17 @@ def _handle_complaint(message_json: AWS_SNSMessageJSON) -> HttpResponse:

_disable_masks_for_complaint(message_json, user)

if flag_is_active_in_task("developer_mode", user):
# MPP-3932: We need more information to match complaints to masks
dev_action = DeveloperModeAction(mask_id="unknown", action="log")
_log_dev_notification(
"_handle_complaint: MPP-3932", dev_action, message_json
)

if not complaint_data:
# Data when there are no identified recipients
complaint_data = [{"user_match": "no_recipients", "relay_action": "no_action"}]

if flag_is_active_in_task("developer_mode", user):
# MPP-3932: We need more information to match complaints to masks
dev_action = DeveloperModeAction(mask_id="unknown", action="log")
_log_dev_notification("_handle_complaint: MPP-3932", dev_action, message_json)

for data in complaint_data:
tags = {
"complaint_subtype": subtype or "none",
Expand Down