mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
send_email: Add ScheduledEmail support for multiple recipients.
Follow up on 92dc363. This modifies the ScheduledEmail model
and send_future_email to properly support multiple recipients.
Tweaked by tabbott to add some useful explanatory comments and fix
issues with the migration.
This commit is contained in:
committed by
Tim Abbott
parent
8e1dff708e
commit
89351cdd19
@@ -731,7 +731,7 @@ def do_deactivate_user(user_profile: UserProfile,
|
||||
user_profile.save(update_fields=["is_active"])
|
||||
|
||||
delete_user_sessions(user_profile)
|
||||
clear_scheduled_emails(user_profile.id)
|
||||
clear_scheduled_emails([user_profile.id])
|
||||
|
||||
event_time = timezone_now()
|
||||
RealmAuditLog.objects.create(realm=user_profile.realm, modified_user=user_profile,
|
||||
@@ -3585,7 +3585,7 @@ def do_change_notification_settings(user_profile: UserProfile, name: str, value:
|
||||
|
||||
# Disabling digest emails should clear a user's email queue
|
||||
if name == 'enable_digest_emails' and not value:
|
||||
clear_scheduled_emails(user_profile.id, ScheduledEmail.DIGEST)
|
||||
clear_scheduled_emails([user_profile.id], ScheduledEmail.DIGEST)
|
||||
|
||||
user_profile.save(update_fields=[name])
|
||||
event = {'type': 'update_global_notifications',
|
||||
|
||||
Reference in New Issue
Block a user