mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
If other huddle recipients don't exist, make them.
(imported from commit 5b9d8faf67657dd2ecca117aef136bc2a03f4abf)
This commit is contained in:
parent
76c1dfc1ed
commit
1c03419cbf
@ -188,8 +188,18 @@ def forge_zephyr(request):
|
||||
if huddle_val in huddle_dedup:
|
||||
# This is a duplicate huddle message, deduplicate!
|
||||
return json_success()
|
||||
else:
|
||||
huddle_dedup[huddle_val] = True
|
||||
|
||||
huddle_dedup[huddle_val] = True
|
||||
|
||||
# Now confirm all the other recipients exist in our system
|
||||
for user_email in request.POST["recipient"].split(","):
|
||||
try:
|
||||
User.objects.get(email=user_email)
|
||||
except User.DoesNotExist:
|
||||
# forge a user for this person
|
||||
create_user(user_email, "test", user_profile.realm,
|
||||
user_email.split('@')[0],
|
||||
user_email.split('@')[0])
|
||||
|
||||
return zephyr_backend(request, user)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user