Skip to content

Add message bridge module with webhook support and subscription loader #1060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

pedrofrxncx
Copy link
Collaborator

  • Introduced manifest.gen.ts for module configuration.
  • Created mod.ts to define the Message Bridge application structure.
  • Implemented WhatsApp webhook handling in whatsapp.ts.
  • Added subscription functionality in subscribe.ts.
  • Included a basic README for the app template.

What is this Contribution About?

Please provide a brief description of the changes or enhancements you are proposing in this pull request.

Issue Link

Please link to the relevant issue that this pull request addresses:

Loom Video

Record a quick screencast describing your changes to help the team understand and review your contribution. This will greatly assist in the review process.

Demonstration Link

Provide a link to a branch or environment where this pull request can be tested and seen in action.

- Introduced `manifest.gen.ts` for module configuration.
- Created `mod.ts` to define the Message Bridge application structure.
- Implemented WhatsApp webhook handling in `whatsapp.ts`.
- Added subscription functionality in `subscribe.ts`.
- Included a basic README for the app template.
Copy link
Contributor

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 0.65.2 update
  • 🎉 for Minor 0.66.0 update
  • 🚀 for Major 1.0.0 update

…nd update WhatsApp webhook handling

- Added toBridgeMessage function to State and Props interfaces.
- Updated MessageBridge component to accept toBridgeMessage as a prop.
- Modified WhatsApp webhook to utilize the new bridgeMessage structure for sending messages.
…handling

- Changed BridgeMessage interface to be exported for broader use.
- Updated Props interface in WhatsApp webhook to accept a generic message type.
- Adjusted the message handling logic to utilize the updated toBridgeMessage function from the context.
- Introduced BridgeConnector interface for better message handling.
- Updated BridgeRequest interface to replace BridgeMessage.
- Modified MessageBridge component to remove unused props and adjust state.
- Enhanced WhatsApp webhook to process messages and handle errors more effectively.
- Implemented atomic subscription logic in the subscribe function for better error handling.
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.

1 participant