From 0b5954feeeece452d1cb9f49ca4ac44190ca08d8 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sat, 13 May 2017 12:14:25 -0700 Subject: [PATCH] Increase initial messages on user creation from 100 to 1000. This makes the new user experience in an active community like chat.zulip.org substantially nicer, since the new user will have the same level of initial messages to populate topics (etc.) as an existing user who is caught up. Without this, there was an undue level of fading-for-inactivity in the default streams. --- zerver/lib/actions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index fbd0221002..896fbf8082 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -266,7 +266,7 @@ def notify_new_user(user_profile, internal=False): def add_new_user_history(user_profile, streams): # type: (UserProfile, Iterable[Stream]) -> None - """Give you the last 100 messages on your public streams, so you have + """Give you the last 1000 messages on your public streams, so you have something to look at in your home view once you finish the tutorial.""" one_week_ago = timezone_now() - datetime.timedelta(weeks=1) @@ -275,7 +275,7 @@ def add_new_user_history(user_profile, streams): if not stream.invite_only]) recent_messages = Message.objects.filter(recipient_id__in=recipients, pub_date__gt=one_week_ago).order_by("-id") - message_ids_to_use = list(reversed(recent_messages.values_list('id', flat=True)[0:100])) + message_ids_to_use = list(reversed(recent_messages.values_list('id', flat=True)[0:1000])) if len(message_ids_to_use) == 0: return