From 08cf01b635e683a4cbe90cf3121e3316307d6c2e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 14 2016 10:05:57 +0000 Subject: Notify user of their own action if they asked for it Fixes https://pagure.io/pagure/issue/1400 --- diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py index 4f6ef18..190bd85 100644 --- a/pagure/lib/notify.py +++ b/pagure/lib/notify.py @@ -83,7 +83,9 @@ def _clean_emails(emails, user): This avoids receiving emails about action you do. ''' # Remove the user doing the action from the list of person to email - if user and user.emails: + # unless they actively asked for it + if user and user.emails \ + and not user.settings.get('cc_me_to_my_actions', False): for email in user.emails: if email.email in emails: emails.remove(email.email)