Force drop crown when user leaves channel
This commit is contained in:
parent
a78e188788
commit
bb0516b367
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue