From 6b1adf11f7c5e08da55a1978e7cfee335e5bf0a8 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Tue, 30 Sep 2014 17:17:11 -0700 Subject: [PATCH] Disable stream desktop notifications for new Dropbox users. (imported from commit 42deed48a2d475912041829a700fea4217868e9e) --- zerver/lib/create_user.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zerver/lib/create_user.py b/zerver/lib/create_user.py index 44cfa8542a..9b6a68d943 100644 --- a/zerver/lib/create_user.py +++ b/zerver/lib/create_user.py @@ -24,11 +24,15 @@ def create_user_profile(realm, email, password, active, bot, full_name, short_name, bot_owner, is_mirror_dummy): now = timezone.now() email = UserManager.normalize_email(email) + + enable_stream_desktop_notifications = (realm.domain != 'dropbox.com') + user_profile = UserProfile(email=email, is_staff=False, is_active=active, full_name=full_name, short_name=short_name, last_login=now, date_joined=now, realm=realm, pointer=-1, is_bot=bot, bot_owner=bot_owner, is_mirror_dummy=is_mirror_dummy, + enable_stream_desktop_notifications=enable_stream_desktop_notifications, onboarding_steps=ujson.dumps([])) if bot or not active: