Fixed error on local client enter
This commit is contained in:
parent
317c37303f
commit
aed30b805b
2 changed files with 2 additions and 2 deletions
|
@ -70,7 +70,7 @@ export interface ChannelTreeEvents {
|
||||||
},
|
},
|
||||||
notify_client_moved: {
|
notify_client_moved: {
|
||||||
client: ClientEntry,
|
client: ClientEntry,
|
||||||
oldChannel: ChannelEntry,
|
oldChannel: ChannelEntry | undefined,
|
||||||
newChannel: ChannelEntry
|
newChannel: ChannelEntry
|
||||||
}
|
}
|
||||||
notify_client_leave_view: {
|
notify_client_leave_view: {
|
||||||
|
|
|
@ -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 => {
|
connection.events().one("notify_handler_initialized", () => this.uiEvents.on("notify_destroy", connection.channelTree.events.on("notify_client_moved", event => {
|
||||||
if(event.client instanceof LocalClientEntry) {
|
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");
|
this.findOrCreateConversation(event.newChannel.channelId).localClientSwitchedChannel("join");
|
||||||
}
|
}
|
||||||
})));
|
})));
|
||||||
|
|
Loading…
Add table
Reference in a new issue