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.

compose: Add url to 'scroll down' sent banner.

evykassirerfbad0b273bec
diff --git a/static/js/notifications.js b/static/js/notifications.js
index 0e28bc9f060..6cd7d6ea155 100644
--- a/static/js/notifications.js
+++ b/static/js/notifications.js
@@ -611,11 +611,19 @@ export function notify_local_mixes(messages, need_user_to_scroll) {
let reason = get_local_notify_mix_reason(message);
const above_composebox_narrow_url = get_above_composebox_narrow_url(message);
+ const link_msg_id = message.id;
if (!reason) {
if (need_user_to_scroll) {
- reason = $t({defaultMessage: "Sent! Scroll down to view your message."});
- notify_above_composebox(reason, "", above_composebox_narrow_url, null, "");
+ reason = $t({defaultMessage: "Sent!"});
+ const link_text = $t({defaultMessage: "Scroll down to view your message."});
+ notify_above_composebox(
+ reason,
+ "compose_notification_scroll_to_message",
+ above_composebox_narrow_url,
+ link_msg_id,
+ link_text,
+ );
setTimeout(() => {
$("#out-of-view-notification").hide();
}, 3000);
@@ -626,7 +634,6 @@ export function notify_local_mixes(messages, need_user_to_scroll) {
continue;
}
- const link_msg_id = message.id;
const link_class = "compose_notification_narrow_by_topic";
const link_text = $t(
{defaultMessage: "Narrow to {message_recipient}"},