# HG changeset patch # User Thomas De Schampheleire # Date 1476200740 -7200 # Node ID c25392980f91f2a68a2dbd4e63a1a73077ff89ee # Parent 716e53c085ffe0b10d21edbf8b99ca23121e30b8 email: add X-Kallithea-Notification-Type header To simplify email filtering, add a header indicating the type of email being sent. The 'type_' value corresponds to one of the types defined in class Notification in kallithea/model/db.py, e.g. 'cs_comment', 'pull_request', 'pull_request_comment', ... diff -r 716e53c085ff -r c25392980f91 kallithea/model/notification.py --- a/kallithea/model/notification.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/model/notification.py Tue Oct 11 17:45:40 2016 +0200 @@ -114,9 +114,10 @@ #don't send email to person who created this comment rec_objs = set(recipients_objs).difference(set([created_by_obj])) - headers = None + headers = {} + headers['X-Kallithea-Notification-Type'] = type_ if 'threading' in email_kwargs: - headers = {'References': ' '.join('<%s>' % x for x in email_kwargs['threading'])} + headers['References'] = ' '.join('<%s>' % x for x in email_kwargs['threading']) # send email with notification to all other participants for rec in rec_objs: