Don't reject mirrored stream messages because they don't have a recipient field

(imported from commit 1677ad91dc2e470c02a01a553d9d07789199a8d9)
This commit is contained in:
Zev Benjamin 2012-11-13 17:38:49 -05:00 committed by Tim Abbott
parent 42a5ea9d2e
commit 150a800b95
1 changed files with 5 additions and 3 deletions

View File

@ -481,9 +481,11 @@ def create_mirrored_message_users(request, user_profile):
sender_data['email']):
return (False, None)
if "recipient" not in request.POST:
return (False, None)
pm_recipients = extract_recipients(request)
pm_recipients = []
if request.POST['type'] == 'private':
if "recipient" not in request.POST:
return (False, None)
pm_recipients = extract_recipients(request)
# Then, check that all private message recipients are in our realm:
for recipient in pm_recipients: