mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 07:52:19 +00:00
Add unsubscribe links to digest e-mails.
(imported from commit 4e2a324decf4bc694752cc24b9085361338a08a5)
This commit is contained in:
@@ -1223,6 +1223,19 @@ def do_change_enable_offline_push_notifications(user_profile, offline_push_notif
|
||||
'user': user_profile.email,
|
||||
'enable_offline_push_notifications': offline_push_notifications})
|
||||
|
||||
def do_change_enable_digest_emails(user_profile, enable_digest_emails, log=True):
|
||||
user_profile.enable_digest_emails = enable_digest_emails
|
||||
user_profile.save(update_fields=["enable_digest_emails"])
|
||||
|
||||
if not enable_digest_emails:
|
||||
# Remove any digest emails that have been enqueued.
|
||||
clear_followup_emails_queue(user_profile.email)
|
||||
|
||||
if log:
|
||||
log_event({'type': 'enable_digest_emails',
|
||||
'user': user_profile.email,
|
||||
'enable_digest_emails': enable_digest_emails})
|
||||
|
||||
def do_change_enter_sends(user_profile, enter_sends):
|
||||
user_profile.enter_sends = enter_sends
|
||||
user_profile.save(update_fields=["enter_sends"])
|
||||
|
||||
Reference in New Issue
Block a user