Skip to content

fix: add message ack handling and sent message webhooks#178

Open
Singh1106 wants to merge 1 commit into
rmyndharis:mainfrom
Singh1106:fix/sent-messages-webhook
Open

fix: add message ack handling and sent message webhooks#178
Singh1106 wants to merge 1 commit into
rmyndharis:mainfrom
Singh1106:fix/sent-messages-webhook

Conversation

@Singh1106
Copy link
Copy Markdown

@Singh1106 Singh1106 commented Jun 2, 2026

  • Update onMessageAck engine callback to accept full IncomingMessage instead of just message ID and ack
  • Implement onMessageAck handler in SessionService to log acks, update session activity, and dispatch webhook events
  • Add webhook dispatch for all outgoing messages in MessageService
  • Refine onMessage handler in SessionService to properly distinguish sent vs received messages
  • Add WebhookModule dependency to MessageModule
  • Clean up peer dependency metadata in package-lock.json

Description

Fixes the missing message.sent webhook event reported in #93. Even with all webhook configurations enabled and message.sent subscribed, no webhook was being fired for outgoing messages. The root cause was that MessageService never dispatched a webhook after sending, and SessionService's onMessage handler wasn't distinguishing sent vs received messages. This PR adds the webhook dispatch for outgoing messages, updates the onMessageAck callback to carry the full message payload, and wires WebhookModule into MessageModule.

Type of Change

  • Bug fix

Checklist

  • Tests added/updated
  • Documentation updated
  • Lint passes
  • Self-reviewed

Screenshots (if applicable)

Related Issues

Closes #93

- Update onMessageAck engine callback to accept full IncomingMessage instead of just message ID and ack
- Implement onMessageAck handler in SessionService to log acks, update session activity, and dispatch webhook events
- Add webhook dispatch for all outgoing messages in MessageService
- Refine onMessage handler in SessionService to properly distinguish sent vs received messages
- Add WebhookModule dependency to MessageModule
- Clean up peer dependency metadata in package-lock.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Message Sent Webhook Not Working

1 participant