onboarding: Change default notifications stream to #general.

This commit is contained in:
Rishi Gupta 2019-02-23 14:14:31 -08:00 committed by Tim Abbott
parent 7d050ab0cf
commit d46b125bf2
3 changed files with 6 additions and 6 deletions

View File

@ -62,7 +62,7 @@ def send_initial_pms(user: UserProfile) -> None:
def setup_initial_streams(realm: Realm) -> None:
stream_dicts = [
{'name': "general"},
{'name': "announce"},
{'name': "new members",
'description': "For welcoming and onboarding new members. If you haven't yet, "
"introduce yourself in a new thread using your name as the topic!"},
@ -78,7 +78,7 @@ def send_initial_realm_messages(realm: Realm) -> None:
# Order corresponds to the ordering of the streams on the left sidebar, to make the initial Home
# view slightly less overwhelming
welcome_messages = [
{'stream': Realm.DEFAULT_NOTIFICATION_STREAM_NAME,
{'stream': "announce",
'topic': "welcome",
'content': "This is a message on stream `%s` with the topic `welcome`. We'll use this stream "
"for system-generated notifications." % (Realm.DEFAULT_NOTIFICATION_STREAM_NAME,)},

View File

@ -235,7 +235,7 @@ class Realm(models.Model):
default_twenty_four_hour_time = models.BooleanField(default=False) # type: bool
default_language = models.CharField(default=u'en', max_length=MAX_LANGUAGE_ID_LENGTH) # type: str
DEFAULT_NOTIFICATION_STREAM_NAME = u'announce'
DEFAULT_NOTIFICATION_STREAM_NAME = u'general'
INITIAL_PRIVATE_STREAM_NAME = u'core team'
notifications_stream = models.ForeignKey('Stream', related_name='+', null=True, blank=True, on_delete=CASCADE) # type: Optional[Stream]
signup_notifications_stream = models.ForeignKey('Stream', related_name='+', null=True, blank=True, on_delete=CASCADE) # type: Optional[Stream]

View File

@ -1065,7 +1065,7 @@ class DefaultStreamTest(ZulipTestCase):
"Carrot Cake": {"description": "A delicious treat", "invite_only": False}
} # type: Dict[str, Dict[str, Any]]
expected_names = list(stream_dict.keys())
expected_names.append("announce")
expected_names.append("general")
expected_descriptions = [i["description"] for i in stream_dict.values()] + [""]
set_default_streams(realm, stream_dict)
stream_names_set = self.get_default_stream_names(realm)
@ -2001,7 +2001,7 @@ class SubscriptionAPITest(ZulipTestCase):
"""
realm = do_create_realm("testrealm", "Test Realm")
notifications_stream = Stream.objects.get(name='announce', realm=realm)
notifications_stream = Stream.objects.get(name='general', realm=realm)
realm.notifications_stream = notifications_stream
realm.save()
@ -2355,7 +2355,7 @@ class SubscriptionAPITest(ZulipTestCase):
but not create those streams, only realm admins can
"""
member = self.example_user("AARON")
result = self.common_subscribe_to_streams(member.email, ["announce"])
result = self.common_subscribe_to_streams(member.email, ["general"])
self.assert_json_success(result)
streams_raw = [{