Add attachment_mention rich text element (currently parsed as RichTextUnknownElement, losing url and text)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 75/100
Direzione di ricerca
Start in GsonRichTextElementFactory, which has no case for attachment_mention and so falls back to RichTextUnknownElement, and follow the existing Canvas element as the pattern for a typed rich text element. Add an AttachmentMention model with url, text, app_id, entity_id, icon_url and the other fields in the issue's JSON sample, register it in the factory, then add a JSON parse test. Done when the sample message parses to the typed element and serializes back with its fields intact.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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: https://github.com/slackapi/python-slack-sdk/pull/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.
- Lingua principale
- Java
- Stelle
- 602
- Fork
- 235
- Merge medio
- 2g 1h
- PR unite (30g)
- 7
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di slackapi/java-slack-sdk
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
slackapi/java-slack-sdk#1653 · 2 commenti ·
-
Upgrade JettyForse già presa @skrcode l’ha presa 48 giorni fa. Apertaauto-triage-skip dependencies good first issue
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
slackapi/java-slack-sdk#1567 · 4 commenti ·
-
auto-triage-skip discussion enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
slackapi/java-slack-sdk#1535 · 5 commenti ·
-
auto-triage-skip question untriaged
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
slackapi/java-slack-sdk#1528 · 7 commenti ·
-
Update okhttp to 5.xApertaauto-triage-skip dependencies project:slack-api-client project:slack-app-backend
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
slackapi/java-slack-sdk#1500 · 11 commenti · 1 reazione ·
Tutte le issue di slackapi/java-slack-sdk
Issue simili
-
[Bug] dubbo.protocol.triple.max-message-size is only read from OS environment variablesForse già presa @CCCLL l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
hierynomus/sshj#1070 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
intellij-elixir/intellij-elixir#4492 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
-
[Server] OpenAPI 3.1 YAML specs generate Object fields: resolveToJSON drops every schema typeAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
quarkiverse/quarkus-openapi-generator#1796 · 1 commento ·