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.
This commit is contained in:
Tim Abbott 2017-05-13 12:14:25 -07:00
parent 34ffda9a1e
commit 0b5954feee

View File

@ -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