Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

email-notifs: Concatenate topic subject lines only in Jinja.

Josh Klar69c042bff60a
diff --git a/templates/zerver/emails/missed_message.subject.txt b/templates/zerver/emails/missed_message.subject.txt
index 7986af94b00..2ee788166e7 100644
--- a/templates/zerver/emails/missed_message.subject.txt
+++ b/templates/zerver/emails/missed_message.subject.txt
@@ -1,7 +1,7 @@
{% if show_message_content %}
{% if group_pm %} {% trans %}Group PMs with {{ huddle_display_name }}{% endtrans %}
{% elif private_message %} {% trans %}PMs with {{ sender_str }}{% endtrans %}
- {% elif stream_email_notify or mention %} #{{ stream_header }}
+ {% elif stream_email_notify or mention %} #{{ stream_name }} > {{ topic_name }}
{% endif %}
{% else %}
{% trans %}New messages{% endtrans %}
diff --git a/zerver/lib/email_notifications.py b/zerver/lib/email_notifications.py
index ab994e042f4..d2ca64b2ba4 100644
--- a/zerver/lib/email_notifications.py
+++ b/zerver/lib/email_notifications.py
@@ -481,10 +481,10 @@ def do_send_missedmessage_events_reply_in_zulip(
)
message = missed_messages[0]["message"]
stream = Stream.objects.only("id", "name").get(id=message.recipient.type_id)
- stream_header = f"{stream.name} > {message.topic_name()}"
+ topic_name = message.topic_name()
context.update(
stream_name=stream.name,
- stream_header=stream_header,
+ topic_name=topic_name,
)
else:
raise AssertionError("Invalid messages!")