mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
create_user: Disable stream desktop notifications by default.
This feature intended to be disabled by default months ago, but due to the override code deleted in this commit, was actually still on by default.
This commit is contained in:
@@ -31,15 +31,12 @@ def create_user_profile(realm, email, password, active, bot_type, full_name,
|
||||
now = timezone.now()
|
||||
email = UserManager.normalize_email(email)
|
||||
|
||||
enable_stream_desktop_notifications = (realm.domain != 'zulip.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=bool(bot_type), bot_type=bot_type,
|
||||
is_mirror_dummy=is_mirror_dummy,
|
||||
tos_version=tos_version,
|
||||
enable_stream_desktop_notifications=enable_stream_desktop_notifications,
|
||||
onboarding_steps=ujson.dumps([]),
|
||||
default_language=realm.default_language)
|
||||
if bot_owner is not None:
|
||||
|
||||
@@ -198,6 +198,7 @@ class LoginTest(ZulipTestCase):
|
||||
self.assert_max_length(queries, 69)
|
||||
user_profile = get_user_profile_by_email('test@zulip.com')
|
||||
self.assertEqual(get_session_dict_user(self.client.session), user_profile.id)
|
||||
self.assertFalse(user_profile.enable_stream_desktop_notifications)
|
||||
|
||||
def test_register_deactivated(self):
|
||||
# type: () -> None
|
||||
|
||||
Reference in New Issue
Block a user