mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
send_email: Change clear_scheduled_emails to only take one user.
No codepath except tests passes in more than one user_profile -- and doing so is what makes the deduplication necessary. Simplify the API by making it only take one user_profile id.
This commit is contained in:
committed by
Tim Abbott
parent
6fbe7ad61e
commit
ebaafb32f3
@@ -1214,7 +1214,7 @@ def do_deactivate_user(
|
||||
change_user_is_active(user_profile, False)
|
||||
|
||||
delete_user_sessions(user_profile)
|
||||
clear_scheduled_emails([user_profile.id])
|
||||
clear_scheduled_emails(user_profile.id)
|
||||
|
||||
event_time = timezone_now()
|
||||
RealmAuditLog.objects.create(
|
||||
@@ -5036,7 +5036,7 @@ def do_change_notification_settings(
|
||||
|
||||
# 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 = {
|
||||
|
||||
Reference in New Issue
Block a user