diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-08-14 10:37:09 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-08-14 10:37:09 -0400 |
commit | 5f966ab241ddcc27f6d94ad0116f52a661ac1778 (patch) | |
tree | 8e0fe84efe62dc87965848084c103b6079a932aa | |
parent | eed22e3009d5373edac3f9298e44173a34f24409 (diff) | |
download | askbot-5f966ab241ddcc27f6d94ad0116f52a661ac1778.tar.gz askbot-5f966ab241ddcc27f6d94ad0116f52a661ac1778.tar.bz2 askbot-5f966ab241ddcc27f6d94ad0116f52a661ac1778.zip |
emails to groups result in questions posted into the groups
-rw-r--r-- | askbot/mail/__init__.py | 14 | ||||
-rw-r--r-- | askbot/mail/lamson_handlers.py | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/askbot/mail/__init__.py b/askbot/mail/__init__.py index e653a0e3..01ffb6f0 100644 --- a/askbot/mail/__init__.py +++ b/askbot/mail/__init__.py @@ -325,7 +325,8 @@ def process_parts(parts, reply_code = None): def process_emailed_question( - from_address, subject, body_text, stored_files, tags = None + from_address, subject, body_text, stored_files, + tags=None, group_id=None ): """posts question received by email or bounces the message""" #a bunch of imports here, to avoid potential circular import issues @@ -375,11 +376,12 @@ def process_emailed_question( user.post_question( - title = title, - tags = tagnames.strip(), - body_text = stripped_body_text, - by_email = True, - email_address = from_address + title=title, + tags=tagnames.strip(), + body_text=stripped_body_text, + by_email=True, + email_address=from_address, + group_id=group_id ) else: raise ValidationError() diff --git a/askbot/mail/lamson_handlers.py b/askbot/mail/lamson_handlers.py index 8de3bd71..6bafbc3f 100644 --- a/askbot/mail/lamson_handlers.py +++ b/askbot/mail/lamson_handlers.py @@ -205,7 +205,7 @@ def ASK(message, host = None, addr = None): ) mail.process_emailed_question( from_address, subject, body_text, stored_files, - tags = [group_tag.name, ] + group_id = group_tag.id ) except Tag.DoesNotExist: #do nothing because this handler will match all emails |