From 127f8177b8dae7e5ecf0f5cc4e3d44a52d31e926 Mon Sep 17 00:00:00 2001 From: undefined Date: Tue, 7 Jan 2025 16:19:19 +0000 Subject: [PATCH] fix(satori): add compatibility support for `parsed.body.proxyUrls` (#333) Co-authored-by: Shigma --- adapters/satori/src/ws.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adapters/satori/src/ws.ts b/adapters/satori/src/ws.ts index 8ff8862f..f8935b3b 100644 --- a/adapters/satori/src/ws.ts +++ b/adapters/satori/src/ws.ts @@ -101,12 +101,12 @@ export class SatoriAdapter 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) {