AppMentionEvent may have attachments, if referenced by another bot.
Example payload:
{
"api_app_id": "xxxx",
"authorizations": [
{
"enterprise_id": "xxx",
"is_bot": true,
"is_enterprise_install": false,
"team_id": "xxx",
"user_id": "xxx"
}
],
"enterprise_id": "xxx",
"event": {
"attachments": [
{
"blocks": [
{
"block_id": "HNku",
"text": {
"text": "My test event CC <@MYBOTID>",
"type": "mrkdwn",
"verbatim": false
},
"type": "section"
}
],
"color": "#29AF7B",
"fallback": "[no preview available]",
"id": 1
}
],
"bot_id": "xxx",
"bot_profile": {
"app_id": "xxx",
"deleted": false,
"icons": {
"image_36": "https://slack-files2.s3-us-west-2.amazonaws.com/avatars/xxx"
},
"id": "xxx",
"name": "xxx",
"team_id": "xxx",
"updated": 1562687282
},
"channel": "xxx",
"edited": {
"ts": "1628260114.000000",
"user": "xxx"
},
"event_ts": "1628259917.003000",
"team": "xxx",
"text": "",
"ts": "1628259917.003000",
"type": "app_mention",
"user": "xxx"
},
"event_context": "xxx",
"event_id": "xxx",
"event_time": 1628259917,
"is_ext_shared_channel": false,
"team_id": "xxx",
"token": "xxx",
"type": "event_callback"
}
Currently using ParseEvent can only parse inner events (AppMentionEvent) in the format:
{
"api_app_id": "xxx",
"authorizations": [
{
"enterprise_id": "xxx",
"is_bot": true,
"is_enterprise_install": false,
"team_id": "xxx",
"user_id": "xxx"
}
],
"enterprise_id": "xxx",
"event": {
"bot_id": "xxx",
"channel": "xxx",
"event_ts": "1628260061.003900",
"subtype": "bot_message",
"text": "CC <@BOTID> test",
"ts": "1628260061.003900",
"type": "app_mention",
"username": "xxx"
},
"event_context": "xxx",
"event_id": "xxx",
"event_time": 1628260061,
"is_ext_shared_channel": false,
"team_id": "xxx",
"token": "xxx",
"type": "event_callback"
}
AppMentionEvent may have attachments, if referenced by another bot.
Example payload:
slack/slackevents/inner_events.go
Lines 18 to 33 in 93fe17c
Currently using ParseEvent can only parse inner events (AppMentionEvent) in the format: