'from' details missing when sending responses to Bot Framework
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start at the buildServicePayload method mentioned in the report and trace the incoming request data used to construct the Bot Framework response. Use the Bot Framework Emulator flow described in the issue to verify that the response includes the required from name and id and that “Hello!” is accepted instead of returning HTTP 400.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- PHP
- Stars
- 9
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from botman/driver-botframework
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 1/5 Under an hour Newbie friendliness 50/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in botman/driver-botframework
Similar issues
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Automattic/blocks-engine#2161 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/static-site-importer#1824 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
0. Needs triage 35-feedback bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100