Skip to content

Commit

Permalink
fix(satori): add compatibility support for parsed.body.proxyUrls (#333
Browse files Browse the repository at this point in the history
)

Co-authored-by: Shigma <[email protected]>
  • Loading branch information
undefined-moe and shigma authored Jan 7, 2025
1 parent 3b5956c commit 127f817
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 127f817

Please sign in to comment.