1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-25 11:42:30 +01:00

fix minor bug with merged member load

if guild is not found for a member, instead of continuing it would break and never set the app to ready
This commit is contained in:
Puyodead1 2024-03-03 13:58:28 -05:00
parent 4a79ae5b6b
commit 5847ed2df0
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC

View File

@ -374,14 +374,11 @@ export default class GatewayConnectionStore {
}
};
this.initialHeartbeatTimeout = setTimeout(
() => {
this.initialHeartbeatTimeout = null;
this.heartbeater = setInterval(heartbeaterFn, this.heartbeatInterval!);
heartbeaterFn();
},
Math.floor(Math.random() * this.heartbeatInterval!),
);
this.initialHeartbeatTimeout = setTimeout(() => {
this.initialHeartbeatTimeout = null;
this.heartbeater = setInterval(heartbeaterFn, this.heartbeatInterval!);
heartbeaterFn();
}, Math.floor(Math.random() * this.heartbeatInterval!));
};
/**
@ -494,7 +491,7 @@ export default class GatewayConnectionStore {
const guild = this.app.guilds.get(m.guild_id);
if (!guild) {
this.logger.warn(`[Ready] Guild ${m.guild_id} not found for member ${m.id}`);
return;
continue;
}
guild.members.add(m);
}