mirror of https://github.com/zulip/zulip.git
onboarding: Update initial messages and stream descriptions.
This commit is contained in:
parent
52fb22277b
commit
6c2c351894
|
@ -3547,7 +3547,9 @@ def do_create_realm(string_id: str, name: str,
|
|||
realm.save()
|
||||
|
||||
# Create stream once Realm object has been saved
|
||||
notifications_stream = ensure_stream(realm, Realm.DEFAULT_NOTIFICATION_STREAM_NAME)
|
||||
notifications_stream = ensure_stream(
|
||||
realm, Realm.DEFAULT_NOTIFICATION_STREAM_NAME,
|
||||
stream_description="Everyone is added to this stream by default. Welcome! :octopus:")
|
||||
realm.notifications_stream = notifications_stream
|
||||
|
||||
# With the current initial streams situation, the only public
|
||||
|
|
|
@ -65,31 +65,34 @@ 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,
|
||||
'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,)},
|
||||
{'stream': Realm.INITIAL_PRIVATE_STREAM_NAME,
|
||||
'topic': "private streams",
|
||||
'content': "This is a private stream. Only admins and people you invite "
|
||||
"to the stream will be able to see that this stream exists."},
|
||||
'content': "This is a private stream, as indicated by the "
|
||||
"lock icon next to the stream name. Private streams are only visible to stream members. "
|
||||
"\n\nTo manage this stream, go to [Stream settings](#streams/subscribed) and click on "
|
||||
"`%(initial_private_stream_name)s`."},
|
||||
{'stream': Realm.DEFAULT_NOTIFICATION_STREAM_NAME,
|
||||
'topic': "topic demonstration",
|
||||
'content': "Here is a message in one topic. Replies to this message will go to this topic."},
|
||||
'content': "This is a message on stream #**%(default_notification_stream_name)s** with the "
|
||||
"topic `topic demonstration`."},
|
||||
{'stream': Realm.DEFAULT_NOTIFICATION_STREAM_NAME,
|
||||
'topic': "topic demonstration",
|
||||
'content': "A second message in this topic. With [turtles](/static/images/cute/turtle.png)!"},
|
||||
{'stream': Realm.DEFAULT_NOTIFICATION_STREAM_NAME,
|
||||
'topic': "second topic",
|
||||
'content': "This is a message in a second topic.\n\nTopics are similar to email subjects, "
|
||||
"in that each conversation should get its own topic. Keep them short, though; one "
|
||||
"or two words will do it! "
|
||||
"Type `c` or click on `New Topic` at the bottom of the "
|
||||
"screen to start a new topic."},
|
||||
'content': "Topics are a lightweight tool to keep conversations organized. "
|
||||
"You can learn more about topics at [Streams and topics](/help/about-streams-and-topics). "},
|
||||
{'stream': realm.DEFAULT_NOTIFICATION_STREAM_NAME,
|
||||
'topic': "swimming turtles",
|
||||
'content': "This is a message on stream #**%(default_notification_stream_name)s** with the "
|
||||
"topic `swimming turtles`. "
|
||||
"\n\n[](/static/images/cute/turtle.png)"
|
||||
"\n\n[Start a new topic](/help/start-a-new-topic) any time you're not replying to a "
|
||||
"previous message."},
|
||||
] # type: List[Dict[str, str]]
|
||||
messages = [internal_prep_stream_message_by_name(
|
||||
realm, welcome_bot, message['stream'],
|
||||
message['topic'], message['content']
|
||||
realm, welcome_bot, message['stream'], message['topic'],
|
||||
message['content'] % {
|
||||
'initial_private_stream_name': Realm.INITIAL_PRIVATE_STREAM_NAME,
|
||||
'default_notification_stream_name': Realm.DEFAULT_NOTIFICATION_STREAM_NAME,
|
||||
}
|
||||
) for message in welcome_messages]
|
||||
message_ids = do_send_messages(messages)
|
||||
|
||||
|
|
|
@ -1708,7 +1708,7 @@ class RealmCreationTest(ZulipTestCase):
|
|||
|
||||
# Check welcome messages
|
||||
for stream_name, text, message_count in [
|
||||
(Realm.DEFAULT_NOTIFICATION_STREAM_NAME, 'with the topic', 4),
|
||||
(Realm.DEFAULT_NOTIFICATION_STREAM_NAME, 'with the topic', 3),
|
||||
(Realm.INITIAL_PRIVATE_STREAM_NAME, 'private stream', 1)]:
|
||||
stream = get_stream(stream_name, realm)
|
||||
recipient = get_stream_recipient(stream.id)
|
||||
|
|
Loading…
Reference in New Issue