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) {
|
if (p) {
|
||||||
this.ppl.splice(this.ppl.indexOf(p), 1);
|
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
|
// Broadcast bye
|
||||||
|
|
|
@ -142,7 +142,6 @@ export class Socket extends EventEmitter {
|
||||||
|
|
||||||
// Does channel exist?
|
// Does channel exist?
|
||||||
if (channel) {
|
if (channel) {
|
||||||
logger.debug("Found channel:", channel.getID());
|
|
||||||
// Exists, join normally
|
// Exists, join normally
|
||||||
(async () => {
|
(async () => {
|
||||||
await this.loadUser();
|
await this.loadUser();
|
||||||
|
|
Loading…
Reference in New Issue