Describe the bug
After creating a before_outgoing_middleware hook to change the bot's avatar based on a validation, the avatar doesn't change until the user sends a message. Potentially, the avatar might not change at all unless the user replies.
To Reproduce
Steps to reproduce the behavior:
Create a hook in before_outgoing_middleware that changes the web avatar url based on a condition
Start a conversation and meet that condition through the flow (e.g. if event.payload.text === "help")
The avatar will stay the same until the user replies with a message of their own
The next message sent by the bot will have the correct avatar, despite the condition being met since step 2
Expected behavior
The avatar should change immediately as soon as the condition is met without the user having to send another message.
Screenshots
The avatar should have changed since the first 'Hi Customer.' message.
Environment
OS: Windows 10
Browser: Chrome
Browser Version 103.0.5060.134 (Official Build) (64-bit) (cohort: Stable)
Botpress Version 12.27.0
NodeJS v12.18.1
Additional context
Other than when the avatar changes, everything else works as expected. Avatar change doesn't carry over to new session or flow restart.
Describe the bug After creating a
before_outgoing_middleware
hook to change the bot's avatar based on a validation, the avatar doesn't change until the user sends a message. Potentially, the avatar might not change at all unless the user replies.To Reproduce Steps to reproduce the behavior:
before_outgoing_middleware
that changes the web avatar url based on a conditionExpected behavior The avatar should change immediately as soon as the condition is met without the user having to send another message.
Screenshots The avatar should have changed since the first 'Hi Customer.' message.
Environment
Additional context Other than when the avatar changes, everything else works as expected. Avatar change doesn't carry over to new session or flow restart.