Fixed error on local client enter

canary
WolverinDEV 2020-09-26 23:17:01 +02:00 committed by WolverinDEV
parent 644f3e02b3
commit 08eb5b90ac
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ export interface ChannelTreeEvents {
},
notify_client_moved: {
client: ClientEntry,
oldChannel: ChannelEntry,
oldChannel: ChannelEntry | undefined,
newChannel: ChannelEntry
}
notify_client_leave_view: {

View File

@ -330,7 +330,7 @@ export class ConversationManager extends AbstractChatManager<ConversationUIEvent
connection.events().one("notify_handler_initialized", () => this.uiEvents.on("notify_destroy", connection.channelTree.events.on("notify_client_moved", event => {
if(event.client instanceof LocalClientEntry) {
this.findOrCreateConversation(event.oldChannel.channelId).localClientSwitchedChannel("leave");
event.oldChannel && this.findOrCreateConversation(event.oldChannel.channelId).localClientSwitchedChannel("leave");
this.findOrCreateConversation(event.newChannel.channelId).localClientSwitchedChannel("join");
}
})));