mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 23:19:10 +00:00
Make audible notifications a tunable.
This decouples from Chrome notifications, which gives us cross-platform support in at least modern browsers. We log this action so its replayable in our message logs. This implements the model change indicated by the previous schema commit. (imported from commit b21213cdde54f43670bbb0bf1f607147fc732b38)
This commit is contained in:
@@ -549,6 +549,14 @@ def do_change_enable_desktop_notifications(user_profile, enable_desktop_notifica
|
||||
'user': user_profile.email,
|
||||
'enable_desktop_notifications': enable_desktop_notifications})
|
||||
|
||||
def do_change_enable_sounds(user_profile, enable_sounds, log=True):
|
||||
user_profile.enable_sounds = enable_sounds
|
||||
user_profile.save(update_fields=["enable_sounds"])
|
||||
if log:
|
||||
log_event({'type': 'enable_sounds_changed',
|
||||
'user': user_profile.email,
|
||||
'enable_sounds': enable_sounds})
|
||||
|
||||
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