diff --git a/src/channel/Channel.ts b/src/channel/Channel.ts index cc5bbd1..93b079d 100644 --- a/src/channel/Channel.ts +++ b/src/channel/Channel.ts @@ -410,6 +410,13 @@ export class Channel extends EventEmitter { if (p) { this.ppl.splice(this.ppl.indexOf(p), 1); + + if (this.crown) { + if (this.crown.participantId == p.id) { + // Channel owner left, reset crown timeout + this.chown(); + } + } } // Broadcast bye diff --git a/src/ws/Socket.ts b/src/ws/Socket.ts index 496eac7..d14e4c0 100644 --- a/src/ws/Socket.ts +++ b/src/ws/Socket.ts @@ -142,7 +142,6 @@ export class Socket extends EventEmitter { // Does channel exist? if (channel) { - logger.debug("Found channel:", channel.getID()); // Exists, join normally (async () => { await this.loadUser();