Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
notifications: Extract sender name removal from recipients list.
Daniil Fadeev8b8f95b6f5ca
diff --git a/web/src/notifications.js b/web/src/notifications.jsindex a8c6b989323..e69f786d8aa 100644--- a/web/src/notifications.js+++ b/web/src/notifications.js@@ -258,6 +258,12 @@ function get_notification_key(message) {return key;}+function remove_sender_from_list_of_recipients(message) {+ return `, ${message.display_reply_to}, `+ .replace(`, ${message.sender_full_name}, `, ", ")+ .slice(", ".length, -", ".length);+}+export function process_notification(notification) {let notification_object;const message = notification.message;@@ -273,9 +279,7 @@ export function process_notification(notification) {if (message.type === "private" || message.type === "test-notification") {// Remove the sender from the list of other recipients- other_recipients = `, ${message.display_reply_to}, `- .replace(`, ${message.sender_full_name}, `, ", ")- .slice(", ".length, -", ".length);+ other_recipients = remove_sender_from_list_of_recipients(message);}if (notice_memory.has(key)) {