Repository navigation
Description
Summary
Messages that contain an app-unfurled link (e.g. a Jira Cloud issue link) carry an attachment_mention element inside the rich_text block. GsonRichTextElementFactory has no case for it, so it is deserialized as RichTextUnknownElement. The SDK keeps only type; url, text and the other fields are lost. The element is documented here: https://docs.slack.dev/reference/block-kit/block-elements/attachment-mention-element
Reproduce
Fetch a message that contains a pasted Jira issue link:
GET https://slack.com/api/conversations.replies?channel=C…&ts=…&limit=1
Authorization: Bearer xoxb-…
The raw response contains:
{
"type": "rich_text",
"elements": [{
"type": "rich_text_section",
"elements": [
{ "type": "text", "text": "read this => " },
{
"type": "attachment_mention",
"url": "https://example.atlassian.net/browse/ABC-5",
"text": "Issue title",
"app_id": "A…",
"entity_id": "W:A…:…",
"icon_url": "https://product-integrations-cdn.atl-paas.net/jira-issuetype/large/new/task.png",
"icon_name": "brand-jira-filled",
"product_name": "Jira Cloud",
"channel_id": "C…",
"ts": "…"
}
]
}]
}With slack-api-model 1.52.0 the element is parsed as RichTextUnknownElement and serializes back as {"type":"attachment_mention"}. message.text still contains <https://example.atlassian.net/browse/ABC-5|Issue title>, but nothing in blocks carries the link.
Expected
A typed RichTextSectionElement.AttachmentMention (url, text, app_id, entity_id, icon_url, ...) registered in GsonRichTextElementFactory, like Canvas.
Notes
slack_sdk(Python) 3.45.0 and@slack/types3.2.0 don't model it either. The Python SDK has an open draft PR: feat(models): add AttachmentMention rich text element python-slack-sdk#1948- I'm happy to open a PR with the model class, the factory entry and a JSON parse test if this is something you'd accept.
Category (place an x in each of the [ ])
- bolt (Bolt for Java)
- bolt-{sub modules} (Bolt for Java - optional modules)
- slack-api-client (Slack API Clients)
- slack-api-model (Slack API Data Models)
- slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
- slack-app-backend (The primitive layer of Bolt for Java)
Requirements
-
Please make sure if this topic is specific to this SDK. For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇
-
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.
Activity
cchensh commentedon Oct 14, 2026
Thanks for the clear report! Confirmed:
attachment_mentionfalls through toRichTextUnknownElementinGsonRichTextElementFactory(or throws whenfailOnUnknownPropertiesis on), so theurl/textfields are dropped. We'll work on addingRichTextSectionElement.AttachmentMentionwith a factory case and a parse test, and keep the field names in sync with the Python SDK (slackapi/python-slack-sdk#1948). We'll update this issue when it's ready.cchensh commentedon Oct 14, 2026
cc @WilliamBergamin about this