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

Events get stuck when no conversation context is found #185

Closed
3 tasks done
aoberoi opened this issue May 6, 2019 · 0 comments · Fixed by #187
Closed
3 tasks done

Events get stuck when no conversation context is found #185

aoberoi opened this issue May 6, 2019 · 0 comments · Fixed by #187
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented

Comments

@aoberoi
Copy link
Contributor

aoberoi commented May 6, 2019

Description

In the conversation context middleware, which is included by default (and only turned off when the convoStore: false option is used for App initialization), events which have no channel context found result in the propagation ending. This can be seen by inspecting the middleware function itself, and noticing that in the else case, next() is never called.

https://github.com/slackapi/bolt/blob/7596366d6e6fc763b6e855f6259d19056605e4cf/src/conversation-store.ts#L54-L76

This is a bug. The expected behavior is that events which have no conversation context should continue to be processed by the next middleware.

Notably, the middleware is working correctly for events which do have a conversation context, but no existing conversation data was found for that conversationId. In those cases, an updateConversation() function is added to the context, which would initialize the conversation data.

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

package version: 1.0.1

node version: all

OS version(s): all

Steps to reproduce:

  1. Initialize an App with default options
  2. Subscribe to an event that isn't related to a channel, and add a listener for that event. For example, team_join.
  3. Attempt to trigger the event.

Expected result:

Listener should be triggered

Actual result:

Listener is not triggered

@aoberoi aoberoi added the bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented label May 6, 2019
aoberoi added a commit to aoberoi/bolt that referenced this issue May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant