From dfd1ea41d83e2ae4e38bc2e3686eec1ac8475ce0 Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Sun, 17 May 2015 19:26:19 +0200 Subject: [PATCH] Change admin email subject --- app/services/processor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/services/processor.py b/app/services/processor.py index f89774d..0176627 100644 --- a/app/services/processor.py +++ b/app/services/processor.py @@ -87,7 +87,7 @@ def new_comment(data): # send email # TODO subject should embed a key - subject = '%s: [%s:%d]' % (site.name, token, comment.id) + subject = '%s: [%d:%s]' % (site.name, comment.id, token) mail(site.admin_email, subject, email_body) # TODO support subscription @@ -108,9 +108,9 @@ def reply_comment_email(data): message = part['content'] break - m = re.search('\[(\w+)\:(\d+)\]', subject) - token = m.group(1) - comment_id = int(m.group(2)) + m = re.search('\[(\d+)\:(\w+)\]', subject) + comment_id = int(m.group(1)) + token = m.group(2) # retrieve site and comment rows comment = Comment.select().where(Comment.id == comment_id).get()