Skip to content

Commit

Permalink
chore: fix parsed.body.proxyUrls doesn't exisst
Browse files Browse the repository at this point in the history
  • Loading branch information
undefined-moe authored Jan 3, 2025
1 parent 719d666 commit c470fb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adapters/satori/src/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ export class SatoriAdapter<C extends Context = Context> extends Adapter.WsClient
for (const login of parsed.body.logins) {
this.getBot(login.platform, login.user.id, login)
}
this._metaDispose = this.ctx.satori.proxyUrls.add(...parsed.body.proxyUrls)
this._metaDispose = this.ctx.satori.proxyUrls.add(...(parsed.body.proxyUrls || []))
}

if (parsed.op === Universal.Opcode.META) {
this._metaDispose?.()
this._metaDispose = this.ctx.satori.proxyUrls.add(...parsed.body.proxyUrls)
this._metaDispose = this.ctx.satori.proxyUrls.add(...(parsed.body.proxyUrls || []))
}

if (parsed.op === Universal.Opcode.EVENT) {
Expand Down

0 comments on commit c470fb1

Please sign in to comment.