Skip to content

Conversation

@TomsFreitas
Copy link
Contributor

This will add support for interactive messages like these ones:
image

{
    "type": "block_actions",
    "user": {
        "id": "[REDACTED_USER_ID]",
        "username": "[REDACTED_USERNAME]",
        "name": "[REDACTED_NAME]",
        "team_id": "[REDACTED_TEAM_ID]"
    },
    "api_app_id": "[REDACTED_APP_ID]",
    "token": "[REDACTED_TOKEN]",
    "container": {
        "type": "message",
        "message_ts": "[REDACTED_TIMESTAMP]",
        "channel_id": "[REDACTED_CHANNEL_ID]",
        "is_ephemeral": "false",
        "thread_ts": "[REDACTED_THREAD_TS]"
    },
    "trigger_id": "[REDACTED_TRIGGER_ID]",
    "team": {
        "id": "[REDACTED_TEAM_ID]",
        "domain": "[REDACTED_DOMAIN]",
        "enterprise_id": "[REDACTED_ENTERPRISE_ID]",
        "enterprise_name": "[REDACTED_ENTERPRISE_NAME]"
    },
    "enterprise": {
        "id": "[REDACTED_ENTERPRISE_ID]",
        "name": "[REDACTED_ENTERPRISE_NAME]"
    },
    "is_enterprise_install": "false",
    "channel": {
        "id": "[REDACTED_CHANNEL_ID]",
        "name": "[REDACTED_CHANNEL_NAME]"
    },
    "message": {
        "user": "[REDACTED_BOT_USER_ID]",
        "type": "message",
        "ts": "[REDACTED_TIMESTAMP]",
        "bot_id": "[REDACTED_BOT_ID]",
        "app_id": "[REDACTED_APP_ID]",
        "text": "Please provide feedback on your InfoSec support experience.",
        "team": "[REDACTED_TEAM_ID]",
        "thread_ts": "[REDACTED_THREAD_TS]",
        "parent_user_id": "[REDACTED_PARENT_USER_ID]",
        "blocks": [
            {
                "type": "section",
                "block_id": "JkhMD",
                "text": {
                    "type": "mrkdwn",
                    "text": "Thank you for using InfoSec support! Please help us improve by providing feedback on your experience.",
                    "verbatim": "false"
                }
            },
            {
                "type": "actions",
                "block_id": "g+g+N",
                "elements": [
                    {
                        "type": "button",
                        "action_id": "issue_fixed_true",
                        "text": {
                            "type": "plain_text",
                            "text": "Issue Fixed",
                            "emoji": True
                        },
                        "style": "primary",
                        "value": "true"
                    },
                    {
                        "type": "button",
                        "action_id": "issue_fixed_false",
                        "text": {
                            "type": "plain_text",
                            "text": "Issue Not Fixed",
                            "emoji": True
                        },
                        "style": "danger",
                        "value": "false"
                    }
                ]
            },
            {
                "type": "actions",
                "block_id": "YmdJg",
                "elements": [
                    {
                        "type": "button",
                        "action_id": "accurately_routed_true",
                        "text": {
                            "type": "plain_text",
                            "text": "Accurately Routed",
                            "emoji": True
                        },
                        "style": "primary",
                        "value": "true"
                    },
                    {
                        "type": "button",
                        "action_id": "accurately_routed_false",
                        "text": {
                            "type": "plain_text",
                            "text": "Not Accurately Routed",
                            "emoji": True
                        },
                        "style": "danger",
                        "value": "false"
                    }
                ]
            },
            {
                "type": "actions",
                "block_id": "6GYP4",
                "elements": [
                    {
                        "type": "button",
                        "action_id": "issues_on_execution_false",
                        "text": {
                            "type": "plain_text",
                            "text": "No Issues on Execution",
                            "emoji": True
                        },
                        "style": "primary",
                        "value": "false"
                    },
                    {
                        "type": "button",
                        "action_id": "issues_on_execution_true",
                        "text": {
                            "type": "plain_text",
                            "text": "Issues on Execution",
                            "emoji": True
                        },
                        "style": "danger",
                        "value": "true"
                    }
                ]
            }
        ]
    },
    "state": {
        "values": {}
    },
    "response_url": "[REDACTED_RESPONSE_URL]",
    "actions": [
        {
            "action_id": "accurately_routed_true",
            "block_id": "YmdJg",
            "text": {
                "type": "plain_text",
                "text": "Accurately Routed",
                "emoji": True
            },
            "value": "true",
            "style": "primary",
            "type": "button",
            "action_ts": "[REDACTED_ACTION_TIMESTAMP]"
        }
    ]
}

@TomsFreitas TomsFreitas requested a review from a team as a code owner October 15, 2025 10:06
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 24.00000% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.88%. Comparing base (5f7d98a) to head (49dfbe6).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
slackbot/management/commands/run_bot.py 15.00% 17 Missing ⚠️
slackbot/base.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
- Coverage   73.49%   70.88%   -2.62%     
==========================================
  Files          12       12              
  Lines         449      474      +25     
==========================================
+ Hits          330      336       +6     
- Misses        119      138      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TomsFreitas TomsFreitas merged commit 41e2b53 into main Oct 15, 2025
4 of 7 checks passed
@TomsFreitas TomsFreitas deleted the add_interactive_messages_support branch October 15, 2025 12:46
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

Successfully merging this pull request may close these issues.

3 participants