Message text can be null
paurkedal opened this issue · comments
I hit another undocumented detail of the Slack protocol: The "text" field of a message from the channels history can be null
. Here is the (anonymised) entry:
{
"ok": true,
"latest": "1527804000",
"oldest": "1527717600",
"messages": [
{
"bot_id": "BXXXXXXXX",
"attachments": [
{
"fallback": "<removed-link>: removed-text",
"ts": 1527753303,
"author_name": "removed",
"author_link": "removed-link",
"author_icon": "removed-link",
"author_subname": "@removed",
"pretext": "<removed-link>",
"text": "removed-text",
"service_name": "twitter",
"service_url": "https://twitter.com/",
"from_url": "removed-link",
"image_url": "removed-link",
"image_width": 999,
"image_height": 999,
"image_bytes": 99999,
"id": 1,
"footer": "Twitter",
"footer_icon": "removed-link"
}
],
"text": null,
"type": "message",
"subtype": "bot_message",
"ts": "1527753304.000028",
"reactions": [
{
"name": "100",
"users": [
"UXXXXXXXX"
],
"count": 1
}
]
}
],
"has_more": false,
"is_limited": true
}
That works, thanks!
Sure, let me know if you find any more discrepancies between this and Slack itself.