Use topic_name() helper in more places.

This commit is contained in:
Steve Howell
2018-11-01 15:18:20 +00:00
committed by Tim Abbott
parent 55afadc286
commit 2fd0cfe708
5 changed files with 6 additions and 6 deletions

View File

@@ -192,9 +192,9 @@ def build_message_list(user_profile: UserProfile, messages: List[Message]) -> Li
stream = Stream.objects.only('id', 'name').get(id=message.recipient.type_id)
header = "%s > %s" % (stream.name, message.topic_name())
stream_link = stream_narrow_url(user_profile.realm, stream)
topic_link = topic_narrow_url(user_profile.realm, stream, message.subject)
topic_link = topic_narrow_url(user_profile.realm, stream, message.topic_name())
header_html = "<a href='%s'>%s</a> > <a href='%s'>%s</a>" % (
stream_link, stream.name, topic_link, message.subject)
stream_link, stream.name, topic_link, message.topic_name())
return {"plain": header,
"html": header_html,
"stream_message": message.recipient.type_name() == "stream"}