digest: don't include automated messages in hot conversation accounting.

(imported from commit ab8db46c644b3cf66a4bc654d204d870b8fae91f)
This commit is contained in:
Jessica McKellar 2013-12-31 16:45:21 -05:00
parent 8091634814
commit 30367d0c0f
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,10 @@ def gather_hot_conversations(user_profile, stream_messages):
conversation_length = defaultdict(int)
conversation_diversity = defaultdict(set)
for user_message in stream_messages:
if not user_message.message.sent_by_human():
# Don't include automated messages in the count.
continue
key = (user_message.message.recipient.type_id,
user_message.message.subject)
conversation_diversity[key].add(