Skip to content
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

'from' details missing when sending responses to Bot Framework #18

Open
neilherbertuk opened this issue Oct 9, 2020 · 0 comments
Open

Comments

@neilherbertuk
Copy link

I've not gotten as far as trying this with Microsoft teams but I've setup a new copy of Botman Studio with the Bot Framework driver and am testing it with the Bot Framework Emulator.

So using the out of the box routes and such, I'm getting a 400 response from the callback being sent to the emulator when sending the message "Hi" from the emulator. I'm expecting botman to reply with "Hello!"

{
"error": {
"code": "ServiceError",
"message": "Cannot read property 'name' of undefined"
}
}

It looks like the payload being sent is missing fields.

Botman is sending the following payload as a response which results in the 400 from the emulator

{"payload":{"type":"message","text":"Hello!"}}

Manually adding a from the id and bot name to the payload within the buildServicePayload method allows the message to be received

        $additionalParameters = [
            'from' => [
                'name' => 'Bot',
                'id' => '*ID*FROM*REQUEST*',
            ],
        ];

Payload sent to callback url

{"payload":{"type":"message","from":{"name":"Bot","id":"IDFROMREQUEST"},"text":"Hello!"}}

I'm fairly new to BotMan so not familiar enough with the flow of everything to fix this yet.

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

No branches or pull requests

1 participant