notifications: properly inject the custom email headers into templates.

This commit is contained in:
Daniel Dourvaris 2020-07-24 09:51:14 +02:00
parent 3584ea7cc2
commit a20d45c20e
2 changed files with 10 additions and 2 deletions

View file

@ -644,7 +644,7 @@ def load_rcextensions(root_path):
rcextensions = None
if rcextensions:
log.debug('Found rcextensions module loaded %s...', rcextensions)
log.info('Loaded rcextensions from %s...', rcextensions)
rhodecode.EXTENSIONS = rcextensions
# Additional mappings that are not present in the pygments lexers

View file

@ -384,7 +384,15 @@ class EmailNotificationModel(BaseModel):
instance_url = h.route_url('home')
_kwargs = {
'instance_url': instance_url,
'whitespace_filter': self.whitespace_filter
'whitespace_filter': self.whitespace_filter,
'email_pr_update_subject_template': EMAIL_PR_UPDATE_SUBJECT_TEMPLATE,
'email_pr_review_subject_template': EMAIL_PR_REVIEW_SUBJECT_TEMPLATE,
'email_pr_comment_subject_template': EMAIL_PR_COMMENT_SUBJECT_TEMPLATE,
'email_pr_comment_status_change_subject_template': EMAIL_PR_COMMENT_STATUS_CHANGE_SUBJECT_TEMPLATE,
'email_pr_comment_file_subject_template': EMAIL_PR_COMMENT_FILE_SUBJECT_TEMPLATE,
'email_comment_subject_template': EMAIL_COMMENT_SUBJECT_TEMPLATE,
'email_comment_status_change_subject_template': EMAIL_COMMENT_STATUS_CHANGE_SUBJECT_TEMPLATE,
'email_comment_file_subject_template': EMAIL_COMMENT_FILE_SUBJECT_TEMPLATE,
}
_kwargs.update(kwargs)
return _kwargs