fix: Correct static method binding in webhook handler

main
borja (aider) 3 months ago
parent 57efb00929
commit 1b89c845ef

@ -84,7 +84,7 @@ export class WebhookServer {
// groupId: payload.data?.key?.remoteJid,
// message: payload.data?.message?.conversation
// });
await this.handleMessageUpsert(payload.data);
await WebhookServer.handleMessageUpsert(payload.data);
break;
// Other events will be added later
}
@ -222,7 +222,7 @@ export class WebhookServer {
const server = Bun.serve({
port: parseInt(PORT),
fetch: WebhookServer.handleRequest
fetch: (request) => WebhookServer.handleRequest(request)
});
console.log(`Server running on port ${PORT}`);
return server;

Loading…
Cancel
Save