Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compose: Update status text in placeholder instantly after it's updated.
Riken Shahe5b216fc647c
diff --git a/frontend_tests/node_tests/dispatch.js b/frontend_tests/node_tests/dispatch.jsindex 8134870f6af..c4cf3238894 100644--- a/frontend_tests/node_tests/dispatch.js+++ b/frontend_tests/node_tests/dispatch.js@@ -87,6 +87,7 @@ const message_store = zrequire("message_store");const people = zrequire("people");const starred_messages = zrequire("starred_messages");const user_status = zrequire("user_status");+const compose_pm_pill = zrequire("compose_pm_pill");const emoji = zrequire("../shared/js/emoji");@@ -934,6 +935,7 @@ run_test("user_status", ({override}) => {{const stub = make_stub();override(activity, "redraw_user", stub.f);+ override(compose_pm_pill, "get_user_ids", () => [event.user_id]);dispatch(event);assert.equal(stub.num_calls, 1);const args = stub.get_args("user_id");diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.jsindex a083d87e75a..8563bb9047d 100644--- a/static/js/server_events_dispatch.js+++ b/static/js/server_events_dispatch.js@@ -9,7 +9,9 @@ import * as attachments_ui from "./attachments_ui";import * as blueslip from "./blueslip";import * as bot_data from "./bot_data";import * as compose from "./compose";+import * as compose_actions from "./compose_actions";import * as compose_fade from "./compose_fade";+import * as compose_pm_pill from "./compose_pm_pill";import * as composebox_typeahead from "./composebox_typeahead";import * as emoji_picker from "./emoji_picker";import * as giphy from "./giphy";@@ -710,6 +712,11 @@ export function dispatch_normal_event(event) {status_text: event.status_text,});activity.redraw_user(event.user_id);++ // Update the status text in compose box placeholder when opened to self.+ if (compose_pm_pill.get_user_ids().includes(event.user_id)) {+ compose_actions.update_placeholder_text();+ }}if (event.emoji_name !== undefined) {