Skip to content

🤔 [ISSUE] - Refactor processMessage() to Use EnvelopeFactory for Native Blocks #898

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

Open
medchedli opened this issue Apr 7, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@medchedli
Copy link
Contributor

medchedli commented Apr 7, 2025

Description

The current implementation of processMessage() in the BlockService handles the creation of outgoing message envelopes for various block types (text, quick replies, buttons, attachments, content, and plugin-based custom blocks). While the EnvelopeFactory is used in other parts of the service (e.g., processText() and processTokenReplacements()), it is not directly utilized within the main processMessage() logic for native Hexabot blocks. This leads to scattered logic for envelope creation and processing within the function.

This issue proposes an enhancement to refactor the processMessage() logic to leverage the EnvelopeFactory for all block types, including the native ones. This will promote a more consistent and maintainable approach to message envelope generation.

@medchedli medchedli added the enhancement New feature or request label Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant