Change admin email subject
This commit is contained in:
parent
c23154fbab
commit
dfd1ea41d8
1 changed files with 4 additions and 4 deletions
|
@ -87,7 +87,7 @@ def new_comment(data):
|
||||||
|
|
||||||
# send email
|
# send email
|
||||||
# TODO subject should embed a key
|
# 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)
|
mail(site.admin_email, subject, email_body)
|
||||||
|
|
||||||
# TODO support subscription
|
# TODO support subscription
|
||||||
|
@ -108,9 +108,9 @@ def reply_comment_email(data):
|
||||||
message = part['content']
|
message = part['content']
|
||||||
break
|
break
|
||||||
|
|
||||||
m = re.search('\[(\w+)\:(\d+)\]', subject)
|
m = re.search('\[(\d+)\:(\w+)\]', subject)
|
||||||
token = m.group(1)
|
comment_id = int(m.group(1))
|
||||||
comment_id = int(m.group(2))
|
token = m.group(2)
|
||||||
|
|
||||||
# retrieve site and comment rows
|
# retrieve site and comment rows
|
||||||
comment = Comment.select().where(Comment.id == comment_id).get()
|
comment = Comment.select().where(Comment.id == comment_id).get()
|
||||||
|
|
Loading…
Add table
Reference in a new issue