matrix-bot-sdk icon indicating copy to clipboard operation
matrix-bot-sdk copied to clipboard

Support binding the appservice listener to an existing express app.

Open Half-Shot opened this issue 4 years ago • 2 comments

Ideally, I'd like for the bot-sdk to export a Router object, which I could then bind via expressApp.use to my existing express instance. The need is for hookshot to support several different listeners on the same port.

Half-Shot avatar Jan 04 '22 17:01 Half-Shot

There's quite a lot of middleware which goes into running an appservice, and express is not guaranteed. The app instance is exposed by the bot-sdk as a short term solution.

turt2live avatar Jan 04 '22 17:01 turt2live

Okay, alternatively I need a way to pass in HTTP requests from my code into the appservice class somehow. Because of the same middleware, it's not easy to bind to the existing app instance.

Half-Shot avatar Jan 04 '22 17:01 Half-Shot

Looks like this was fixed by https://github.com/turt2live/matrix-bot-sdk/pull/349?

AndrewFerr avatar Nov 17 '23 19:11 AndrewFerr

It was already technically supported, but buggy.

turt2live avatar Nov 17 '23 20:11 turt2live