mirror of
https://github.com/zulip/zulip.git
synced 2026-07-06 21:18:58 +08:00
Consider the following messages JSON (taken from real data, redacted):
```json
[
{
"subtype": "bot_message",
"text": "",
"attachments": [
{
"fallback": "Open Slack to cast your vote in this Simple Poll",
"title": "Should we do a thing?",
"id": 1,
"color": "6ecadc",
"fields": [
{
"title": "",
"value": "1️⃣ Yes 👍\n\n"",
"short": false
},
{
"title": "",
"value": "2️⃣ No 👎\n\n",
"short": false
},
{
"title": "",
"value": "3️⃣ Abstain :spock-hand:\n\n",
"short": false
}
],
"mrkdwn_in": [
"fields"
]
},
{
"callback_id": "12345678-1234-1234-1234-123456789abc",
"fallback": "Open Slack to cast your vote in this Simple Poll",
"id": 2,
"color": "6ecadc",
"actions": [
{
"id": "1",
"name": "vote",
"text": "1️⃣",
"type": "button",
"value": "1",
"style": ""
},
{
"id": "2",
"name": "vote",
"text": "2️⃣",
"type": "button",
"value": "2",
"style": ""
},
{
"id": "3",
"name": "vote",
"text": "3️⃣",
"type": "button",
"value": "3",
"style": ""
},
{
"id": "4",
"name": "delete-v2",
"text": "Delete Poll",
"type": "button",
"value": "",
"style": "danger",
"confirm": {
"text": "Are you sure you want to delete the Poll?",
"title": "Delete Poll?",
"ok_text": "Yes",
"dismiss_text": "No"
}
}
]
},
{
"callback_id": "12345678-1234-1234-1234-123456789abc",
"fallback": "Open Slack to cast your vote in this Simple Poll",
"footer": "Simple Poll <https:\/\/simplepoll.rocks\/dashboard\/redacted\/settings\/|Edit Settings>",
"id": 3,
"footer_icon": "https:\/\/simplepoll.rocks\/static\/main\/favicon.png",
"color": "6ecadc"
}
],
"type": "message",
"ts": "1234567890.123456",
"bot_id": "B1ABCDEF1",
"thread_ts": "1234567890.123456",
"reply_count": 1,
"reply_users_count": 1,
"latest_reply": "1234567890.765432",
"reply_users": [
"U1ABC1234"
],
"replies": [
{
"user": "U1ABC1234",
"ts": "1234567890.765432"
}
],
"is_locked": false,
"subscribed": false
},
{
"user": "U1ABC1234",
"type": "message",
"ts": "1234567890.765432",
"text": "Maybe do qux instead",
"team": "T1AB23456",
"user_team": "T1AB23456",
"source_team": "T1AB23456",
"user_profile": {
"avatar_hash": "a123456789ab",
"image_72": "https:\/\/avatars.slack-edge.com\/2017-01-01\/123456789abc_def123456789abcdef12_72.jpg",
"first_name": "Alice",
"real_name": "Alice Smith",
"display_name": "a.smith",
"team": "T1AB23456",
"name": "a.smith",
"is_restricted": false,
"is_ultra_restricted": false
},
"thread_ts": "1234567890.123456",
"blocks": [
{
"type": "rich_text",
"block_id": "EoBdt",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Maybe do qux instead"
}
]
}
]
}
]
}
]
```
|
||
|---|---|---|
| .. | ||
| actions | ||
| data_import | ||
| lib | ||
| management | ||
| migrations | ||
| models | ||
| openapi | ||
| tests | ||
| tornado | ||
| transaction_tests | ||
| views | ||
| webhooks | ||
| worker | ||
| __init__.py | ||
| apps.py | ||
| context_processors.py | ||
| decorator.py | ||
| filters.py | ||
| forms.py | ||
| logging_handlers.py | ||
| middleware.py | ||
| signals.py | ||