A platform for community discussion. Free, open, simple.
DEV: no need to track status of a deleted user (#22836)
Andrei Prigorshnev3ee77c29a5d6
diff --git a/plugins/chat/assets/javascripts/discourse/initializers/chat-sidebar.js b/plugins/chat/assets/javascripts/discourse/initializers/chat-sidebar.jsindex 24b7bf80a8e..c2dcb5e15ec 100644--- a/plugins/chat/assets/javascripts/discourse/initializers/chat-sidebar.js+++ b/plugins/chat/assets/javascripts/discourse/initializers/chat-sidebar.js@@ -210,7 +210,10 @@ export default {this.chatService = chatService;if (this.oneOnOneMessage) {- this.channel.chatable.users[0].trackStatus();+ const user = this.channel.chatable.users[0];+ if (user.username !== I18n.t("chat.deleted_chat_username")) {+ user.trackStatus();+ }}}diff --git a/plugins/chat/config/locales/client.en.yml b/plugins/chat/config/locales/client.en.ymlindex e94052b4ae8..5d39b7b69d5 100644--- a/plugins/chat/config/locales/client.en.yml+++ b/plugins/chat/config/locales/client.en.yml@@ -25,6 +25,7 @@ en:chat_users_count: "Chat Users"chat:+ deleted_chat_username: deleteddates:time_tiny: "h:mm"all_loaded: "Showing all messages"