Use /v3/Account/GetToken to renew the app token

This commit is contained in:
Samuel Elliott
2022-04-08 22:13:43 +01:00
parent e138f67969
commit 53a15bbb99
4 changed files with 24 additions and 10 deletions

View File

@@ -432,9 +432,10 @@ export class ZncNotifications extends Loop {
// Token expired
debug('Renewing token');
const data = await this.nso.renewToken(this.token);
const data = await this.nso.renewToken(this.token, this.data.user);
const existingToken: SavedToken = {
user: this.data.user,
...data,
expires_at: Date.now() + (data.credential.expiresIn * 1000),
};