Skip to content

app.message listeners do not catch messages with subtype: thread_broadcast #488

Closed

Description

@seratch

When an end-user posts a new message in a thread with "Also send to #channel" checked, the message's event payload has "subtype": "thread_broadcast". In this scenario, bolt-python's app.message listeners are not called even if the text matches with the listener constraints.

This issue was originally reported by @kanny -- thank you!
https://community.slack.com/archives/CHY642221/p1633662076075800

Notes on other Bolt frameworks:

  • bolt-js invokes a message listener for the pattern without any issues
  • bolt-java's message listener is different from other bolt frameworks (to support the language's static types, a single message listener does not handle multiple subtypes; the recommended way is to use multiple app.event listeners)

Reproducible in:

Any

The slack_bolt version

~ v1.9.2

Python runtime version

Any

OS info

Any

Steps to reproduce:

from slack_bolt import App

app = App()

@app.message("Hi there!")
def handle_messages(event, logger):
    logger.info(event)
  1. Start a new thread
  2. Post a reply including "Hi there!" in the thread with "Also send to #channel" checked

Expected result:

The logger prints the event payload

Actual result:

The event is not handled

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Activity

  1. added this to the 1.9.3 milestone on Oct 8, 2021
  2. self-assigned this
    on Oct 8, 2021
  3. added a commit that references this issue on Oct 13, 2021
    d2d9ffd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions