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:
Luke Faraone
2013-05-03 12:49:01 -07:00
parent 69c9ed6c0d
commit 6bc2d21b87
7 changed files with 48 additions and 8 deletions

View File

@@ -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"])