diff --git a/src/services/webhook-manager.ts b/src/services/webhook-manager.ts index e97c500..2d8605b 100644 --- a/src/services/webhook-manager.ts +++ b/src/services/webhook-manager.ts @@ -23,12 +23,7 @@ export class WebhookManager { private static readonly REQUIRED_EVENTS = [ 'APPLICATION_STARTUP', 'messages.upsert', - 'messages.update', - 'messages.delete', 'groups.update', - 'presence.update', - 'contacts.update', - 'chats.update', ]; private static validateConfig() { @@ -76,12 +71,12 @@ export class WebhookManager { static async registerWebhook(): Promise { this.validateConfig(); - + const config = this.getConfig(); const apiUrl = this.getApiUrl(); - + const logSafeUrl = (url: string) => url ? `${url.substring(0, 20)}...` : 'invalid-url'; - + console.log('ℹ️ Attempting to register webhook:', { apiUrl, config: { @@ -104,7 +99,7 @@ export class WebhookManager { try { const errorBody = await response.text(); errorDetails += ` - ${errorBody}`; - } catch {} + } catch { } throw new Error(`Failed to register webhook: ${errorDetails}`); }