Add attachment_mention rich text element (currently parsed as RichTextUnknownElement, losing url and text)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 75/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Java
- Star
- 602
- Fork
- 235
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của slackapi/java-slack-sdk
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
slackapi/java-slack-sdk#1653 · 2 bình luận ·
-
Upgrade JettyCó thể đã có người làm @skrcode đã nhận 45 ngày trước. Đang mởauto-triage-skip dependencies good first issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
slackapi/java-slack-sdk#1567 · 4 bình luận ·
-
auto-triage-skip discussion enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
slackapi/java-slack-sdk#1535 · 5 bình luận ·
-
Workflows, Slack Apps and formsĐang mởauto-triage-skip question untriaged
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
slackapi/java-slack-sdk#1528 · 7 bình luận ·
-
Update okhttp to 5.xĐang mởauto-triage-skip dependencies project:slack-api-client project:slack-app-backend
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
slackapi/java-slack-sdk#1500 · 11 bình luận · 1 reaction ·
Tất cả issue của slackapi/java-slack-sdk
Issue tương tự
-
Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
MinecraftForge/MinecraftForge#10902 · 1 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
refinedmods/refinedstorage2#1421 ·
-
StepExamBenchmarkTest runs a loop and prints a timing but asserts nothingCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởjules
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
open-learning-exchange/myplanet#18199 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
wikipathways/GPML2RDF#126 ·
-
Authorization 'Artifacts' is shown under category Run instead of Job in Authorization matrixĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày