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

Message event type does not support bot-generated messages #16

Open
JadedEvan opened this issue Oct 9, 2022 · 0 comments
Open

Message event type does not support bot-generated messages #16

JadedEvan opened this issue Oct 9, 2022 · 0 comments
Assignees

Comments

@JadedEvan
Copy link
Contributor

The current implementation for the Message variant for the EventCallbackType does not support messages that were sent via Slackbots. The current enum implementation requires a user attribute which does not exist in this type of callback event - you can see the documentation in the bot_message docs. Instead of user you have username.

As an example - this payload will fail when deserialized

{
    "token": "some-token",
    "team_id": "XVFU4HSB0",
    "api_app_id": "A0454AVL9L0",
    "event": {
        "type": "message",
        "subtype": "bot_message",
        "text": "message text",
        "ts": "1665341482.399349",
        "username": "My Slackbot",
        "bot_id": "B04488SU0P8",
        "app_id": "A088TG2RTDF",
        "channel": "C044T73TB17",
        "event_ts": "1665341482.399349",
        "channel_type": "channel"
    },
    "type": "event_callback",
    "event_id": "Ev0464MAU18R",
    "event_time": 1665341482,
    "authorizations": [
        {
            "enterprise_id": null,
            "team_id": "TCFU9GHJR",
            "user_id": "U044ELFUMMG",
            "is_bot": true,
            "is_enterprise_install": false
        }
    ],
    "is_ext_shared_channel": false,
    "event_context": "4-eyJldCI6Im1lc3NhZ2UiLCJ0aWQiOiJUQ0ZVOUhTQjAiLCJhaWQiOiJBMDQ1NEFWTDlMMCIsImNpZCI6IkMwNDRUNzNUQjE3In0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants