feat(WebsocketManager): retroactive token setting (#10418)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
DD
2024-07-31 14:46:39 +03:00
committed by GitHub
parent 8f97d2bacf
commit de94eaf351
3 changed files with 35 additions and 8 deletions

View File

@@ -33,7 +33,6 @@ export interface IContextFetchingStrategy {
}
export async function managerToFetchingStrategyOptions(manager: WebSocketManager): Promise<FetchingStrategyOptions> {
/* eslint-disable @typescript-eslint/unbound-method */
const {
buildIdentifyThrottler,
buildStrategy,
@@ -44,10 +43,10 @@ export async function managerToFetchingStrategyOptions(manager: WebSocketManager
rest,
...managerOptions
} = manager.options;
/* eslint-enable @typescript-eslint/unbound-method */
return {
...managerOptions,
token: manager.token,
gatewayInformation: await manager.fetchGatewayInformation(),
shardCount: await manager.getShardCount(),
};