From 1d11e2cce027e5ee84ad0bb7a8d68e0235e114bb Mon Sep 17 00:00:00 2001 From: Jessica McKellar Date: Mon, 16 Dec 2013 16:26:04 -0500 Subject: [PATCH] digest: don't show new users for MIT. (imported from commit b7453cb30e6fcf5b36a5e3e53f67faeb17e74048) --- zerver/lib/digest.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/zerver/lib/digest.py b/zerver/lib/digest.py index d8a2d7a37d..24382a4403 100644 --- a/zerver/lib/digest.py +++ b/zerver/lib/digest.py @@ -81,9 +81,12 @@ def gather_hot_conversations(user_profile, stream_messages): def gather_new_users(user_profile, threshold): # Gather information on users in the realm who have recently # joined. - new_users = list(UserProfile.objects.filter( - realm=user_profile.realm, date_joined__gt=threshold, - is_bot=False)) + if user_profile.realm.domain == "mit.edu": + new_users = [] + else: + new_users = list(UserProfile.objects.filter( + realm=user_profile.realm, date_joined__gt=threshold, + is_bot=False)) user_names = [user.full_name for user in new_users] return len(user_names), user_names