You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add attachment_mention rich text element (currently parsed as RichTextUnknownElement, losing url and text) #1657
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-…
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.
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. 🙇
Thanks for the clear report! Confirmed: attachment_mention falls through to RichTextUnknownElement in GsonRichTextElementFactory (or throws when failOnUnknownProperties is on), so the url/text fields are dropped. We'll work on adding RichTextSectionElement.AttachmentMention with 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.
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