summaryrefslogtreecommitdiffstats
path: root/askbot/mail
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-04-24 03:08:35 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-04-24 03:08:35 -0400
commitcef6a23e58cb81e28be2dc2f77fd35eac89c3060 (patch)
tree539df104b042df64d7da4ab72fd7038bf3a69628 /askbot/mail
parent7fb2c2c91867891e105c6bbd370e4aecdd98c7f1 (diff)
downloadaskbot-cef6a23e58cb81e28be2dc2f77fd35eac89c3060.tar.gz
askbot-cef6a23e58cb81e28be2dc2f77fd35eac89c3060.tar.bz2
askbot-cef6a23e58cb81e28be2dc2f77fd35eac89c3060.zip
a change in posting by email
Diffstat (limited to 'askbot/mail')
-rw-r--r--askbot/mail/__init__.py8
-rw-r--r--askbot/mail/lamson_handlers.py6
2 files changed, 7 insertions, 7 deletions
diff --git a/askbot/mail/__init__.py b/askbot/mail/__init__.py
index 352711b6..d72cc890 100644
--- a/askbot/mail/__init__.py
+++ b/askbot/mail/__init__.py
@@ -312,7 +312,13 @@ def extract_user_signature(text, reply_code):
while tail and (tail[0].startswith('>') or tail[0].strip() == ''):
tail.pop(0)
- return '\n'.join(tail)
+ signature = '\n'.join(tail)
+
+ #patch signature to a sentinel value if it is truly empty, because we
+ #cannot allow empty signature field, which indicates no
+ #signature at all and in that case we ask user to create one
+ if signature == '':
+ signature = 'empty signature'
else:
return None
diff --git a/askbot/mail/lamson_handlers.py b/askbot/mail/lamson_handlers.py
index 0bc828c5..5008918e 100644
--- a/askbot/mail/lamson_handlers.py
+++ b/askbot/mail/lamson_handlers.py
@@ -229,12 +229,6 @@ def VALIDATE_EMAIL(
try:
content, stored_files, signature = mail.process_parts(parts, reply_code)
- #patch signature to a sentinel value if it is truly empty, because we
- #cannot allow empty signature field, which indicates no
- #signature at all and in that case we ask user to create one
- if signature == '':
- signature = 'empty signature'
-
user = reply_address_object.user
if signature != user.email_signature: