summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-08-14 13:28:55 -0600
committerAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-08-14 13:28:55 -0600
commit1cfdfa2dc4c882232926d385eeefd86c1a1ff9dc (patch)
treeb750eb1ccdf6130ed98db642aac0f7f9ff3efa4f
parentcb9ca52d3549eaf686a9079212ce26976f147dfa (diff)
parentb053deeb0e139687e634422b5c2049aa4ec845d6 (diff)
downloadaskbot-1cfdfa2dc4c882232926d385eeefd86c1a1ff9dc.tar.gz
askbot-1cfdfa2dc4c882232926d385eeefd86c1a1ff9dc.tar.bz2
askbot-1cfdfa2dc4c882232926d385eeefd86c1a1ff9dc.zip
Merge branch 'user-groups' of github.com:ASKBOT/askbot-devel into user-groups
-rw-r--r--askbot/mail/__init__.py14
-rw-r--r--askbot/mail/lamson_handlers.py2
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