DEV: no need to track status of a deleted user (#22836)
It is hard to catch and debug potential bugs related to live updates of user status (though, we haven't seen many such bugs so far). We have a `console.warn` statement that should help us to catch one class of such bugs. Recently, we noticed that this warning gets printed when a user had a chat with a user that was then deleted. This is not a bug, since there is nothing to track for a deleted user, but we don't want this noise on the console. This PR makes sure we don't print a warning in such cases.
This commit is contained in:
parent
b59f1ad4ee
commit
3ee77c29a5
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ en:
|
|||
chat_users_count: "Chat Users"
|
||||
|
||||
chat:
|
||||
deleted_chat_username: deleted
|
||||
dates:
|
||||
time_tiny: "h:mm"
|
||||
all_loaded: "Showing all messages"
|
||||
|
|
Loading…
Reference in New Issue