slack-go / slack

Slack API in Go, originally by @nlopes; Maintainers needed, contact @parsley42
https://pkg.go.dev/github.com/slack-go/slack
BSD 2-Clause "Simplified" License
4.65k stars 1.13k forks source link

Add blocks in slackevents.MessageEvent #1227

Closed invzhi closed 7 months ago

invzhi commented 1 year ago

Now message event received by events API will contain blocks.

This is a example. So I add the blocks in slackevents.MessageEvent.

{
    "client_msg_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "type": "message",
    "text": "tt",
    "user": "Uxxxxxxxxx",
    "ts": "1692759855.085859",
    "blocks": [
        {
            "type": "rich_text",
            "block_id": "S7Cm",
            "elements": [
                {
                    "type": "rich_text_section",
                    "elements": [
                        {
                            "type": "text",
                            "text": "tt"
                        }
                    ]
                }
            ]
        }
    ],
    "team": "Txxxxxxxxx",
    "channel": "Cxxxxxxxxxxx",
    "event_ts": "1692759855.085859",
    "channel_type": "channel"
}
vryazanov commented 7 months ago

@parsley42 could you please review this?