arkhitech / redmine_mentions

Allows users to mention team members in their notes/comments.
MIT License
94 stars 88 forks source link

Set X-Redmine-Project email header #61

Open s-andy opened 6 years ago

s-andy commented 6 years ago

Redmine sets a couple of special X-Redmine- headers in native email messages. These headers can then be used by email clients to filter messages.

It would be great, if Mentions plugin did the same. Especially, I'm interested in X-Redmine-Project.

teranex commented 5 years ago

I was also looking for the X-Redmine-Project header

s-andy commented 5 years ago

@teranex, just for your information, I managed to add such header via monkey-patching, something like:

alias_method_chain :notify_mentioning, :redmine_headers
...
def notify_mentioning_with_redmine_headers(issue, journal, user)
    redmine_headers 'Project' => issue.project.identifier,
                    'Issue-Id' => issue.id
    notify_mentioning_without_redmine_headers(issue, journal, user)
end
teranex commented 5 years ago

@s-andy thanks a lot!