feat(messaging): support receiving proactive messages #5728
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement support for event added in botpress/messaging#266. When a converstation is started with a user, messaging emits a
conversation.started
event that botpress that botpress listens on. We send a event of typeproactive-trigger
to the event engine that can then be used in a hook to send a proactive message. This now works with any channel.Based on this documentation https://botpress.com/docs/tutorials/proactive
It would be possible to also add a conversation.visit event to messaging, to get the same type of event that the webchat has with the user visit. This migth not be supported by a lot of channel though.
Closes DEV-2071
Closes DEV-1623