mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 10:57:58 +00:00
Add a custom template filter for formatting displaying lists of items in emails.
We do this operation several times in the digest e-mails. (imported from commit 7b906bad582c628d4461637dc7af374df349e09a)
This commit is contained in:
@@ -18,12 +18,6 @@ from zerver.models import UserProfile, UserMessage, Recipient, Stream, \
|
||||
# 4. Interesting stream traffic, as determined by the longest and most
|
||||
# diversely comment upon topics.
|
||||
|
||||
def and_n_others(things, limit):
|
||||
# A helper for the commonly appended "and N other(s)" string, with
|
||||
# the appropriate pluralization.
|
||||
return " and %d other%s" % (len(things) - limit,
|
||||
"" if len(things) == limit + 1 else "s")
|
||||
|
||||
def gather_hot_conversations(user_profile, stream_messages):
|
||||
# Gather stream conversations of 2 types:
|
||||
# 1. long conversations
|
||||
|
||||
Reference in New Issue
Block a user