[extensions-web] review: Add In-Reply-To, References headers for threading



commit be86a57c17ada7310abd007b6aff16bfebcdf198
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Apr 3 12:00:54 2012 -0400

    review: Add In-Reply-To, References headers for threading

 sweettooth/review/views.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index 6e5e094..9657137 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -326,7 +326,11 @@ def render_mail(version, template, data):
     subject = render_to_string(subject_template, data, Context(autoescape=False))
     body = render_to_string(body_template, data, Context(autoescape=False))
 
-    return EmailMessage(subject=subject.strip(), body=body.strip())
+    references = "<%s-review-v%d extensions gnome org>" % (extension.uuid, version.version)
+    headers = {'In-Reply-To': references,
+               'References': references}
+
+    return EmailMessage(subject=subject.strip(), body=body.strip(), headers=headers)
 
 def send_email_submitted(request, version):
     extension = version.extension



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]