Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Fix github notifications #94

Open
yelizariev opened this issue May 30, 2017 · 0 comments
Open

Fix github notifications #94

yelizariev opened this issue May 30, 2017 · 0 comments

Comments

@yelizariev
Copy link
Contributor

yelizariev commented May 30, 2017

The patch below fix a bug with receivng notification from github.
The problem is that github send strange headers

To: odoo/odoo [email protected]
Cc: Subscribed [email protected]

and actual recepient (e.g. [email protected]) is available only in custom header X-GitHub-Recipient-Address)

index 8dcc391..6fbd8da 100644
--- a/addons/mail/mail_thread.py
+++ b/addons/mail/mail_thread.py
@@ -1054,6 +1054,7 @@ class mail_thread(osv.AbstractModel):
              ','.join([decode_header(message, 'Delivered-To'),
                        decode_header(message, 'To'),
                        decode_header(message, 'Cc'),
+                       decode_header(message, 'X-GitHub-Recipient-Address'),
                        decode_header(message, 'Resent-To'),
                        decode_header(message, 'Resent-Cc')])
         local_parts = [e.split('@')[0] for e in tools.email_split(rcpt_tos)]


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant