Giter Site home page Giter Site logo

Comments (3)

simonsayscode avatar simonsayscode commented on August 20, 2024

This is probably way too late but a few things:

Assumptions:
That your app is correctly listening to a port, which I guess can be inferred by the fact that your function is hit by Slack events.
That MemoryStore is accessing the memory store file that's in slapp.

Major:
In your context, you never call next() which means that it will just hang in your context and not continue. This follows the express middleware pattern in that you need to explicitly call next(). This explains why your middleware and the subsequent routes aren't hit. Also, since Slack tries to retry several times if it gets no response, this also explains why you get repeated attempts/hits to context.

Minor:
This is probably just a proof of concept but I would recommend not having the db connect done in the context since that function is called on each Slack call. You don't want to have the connect and shutdown each call since that'd be extremely inefficient as opposed to initiating the connect once and having the pool live across the server duration.
You have a typo in reaction_added

from bolt-js.

nbst84 avatar nbst84 commented on August 20, 2024

Thank you for your response. I have indeed moved on and implemented directly against the Slack API but hopefully this will be useful information for other people.

Thanks

from bolt-js.

mbrevoort avatar mbrevoort commented on August 20, 2024

Thanks @simonsayscode! @nicolasbrigodiot sorry we let this slip by! The key issue was not calling next() in the context function.

from bolt-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.