How to reproduce:
const app = new App({
skipAuth: true, // not needed, just for easier local testing
});
app.on("message", async ({ send }) => {
await send("Hello there!");
});
app.start();
With the above setup, activities of type message will be handled as expected by the handler we defined via app.on. However, for any other kind of activity (like, for example, installationUpdate) the request will hang indefinitely.
I believe the cause is here:
|
if (routes.length === 0) { |
|
return { status: 200 }; |
|
} |
By exiting
process early, there's never a chance for
onActivityResponse to be called here:
|
this.onActivityResponse(sender, { |
|
...ref, |
|
sender, |
|
activity, |
|
response: res, |
|
}); |
And without
onActivityResponse being called, the
HttpPlugin never sends a response, leading the request to hang indefinitely, which I don't think was desired.
How to reproduce:
With the above setup, activities of type message will be handled as expected by the handler we defined via
app.on. However, for any other kind of activity (like, for example,installationUpdate) the request will hang indefinitely.I believe the cause is here:
teams.ts/packages/apps/src/app.process.ts
Lines 133 to 135 in 13334d6
By exiting
processearly, there's never a chance foronActivityResponseto be called here:teams.ts/packages/apps/src/app.process.ts
Lines 175 to 180 in 13334d6
And without
onActivityResponsebeing called, theHttpPluginnever sends a response, leading the request to hang indefinitely, which I don't think was desired.