ThreadBroadcastMessageEvent is missing `files`, `upload`, `display_as_bot` and `parent_user_id`
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- api
Hướng nghiên cứu
Giao diện là ThreadBroadcastMessageEvent trong packages/types/src/events/message.ts, khoảng dòng 276-296. Sao chép các trường tùy chọn files, upload, display_as_bot và parent_user_id từ FileShareMessageEvent và GenericMessageEvent trong cùng tệp, giữ nguyên kiểu dữ liệu của chúng. Hoàn thành khi giao diện khai báo đủ bốn trường và ví dụ event.files trong issue vượt qua kiểm tra kiểu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Package
@slack/types
SDK Version
@slack/[email protected]
Node.js Version
N/A (type definition issue)
Operating System
No response
Steps to Reproduce
- Set up an app subscribed to the
message.channelsevent. - Start a thread in a channel where the app is a member.
- Reply in that thread. Attach a file and check "Also send to #channel".
- Inspect the payload of the
messageevent the app receives.
In TypeScript, the following code does not compile:
import type { ThreadBroadcastMessageEvent } from "@slack/types";
function handle(event: ThreadBroadcastMessageEvent) {
event.files; // error TS2339: Property 'files' does not exist on type 'ThreadBroadcastMessageEvent'
}
Expected Result
ThreadBroadcastMessageEvent defines files?: File[], upload?: boolean, display_as_bot?: boolean and parent_user_id?: string. Slack sends these fields, so we can access them without a type assertion.
Actual Result
Slack sends a message event with subtype: "thread_broadcast". The event includes files, upload, display_as_bot and parent_user_id:
{
"type": "message",
"subtype": "thread_broadcast",
"user": "U0XXXXXXX",
"text": "broadcast with a file",
"ts": "1791448977.697319",
"thread_ts": "1791447929.601119",
"channel": "C0XXXXXXX",
"channel_type": "channel",
"event_ts": "1791448977.697319",
"client_msg_id": "...",
"parent_user_id": "U0XXXXXXX",
"display_as_bot": false,
"upload": false,
"files": [{ "id": "F0XXXXXXX", "name": "image.png", "filetype": "png", ... }],
"root": { ... },
"blocks": [ ... ]
}
However, ThreadBroadcastMessageEvent does not define any of these four fields:
In the same file, GenericMessageEvent defines files and parent_user_id, and FileShareMessageEvent defines all four.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.4k
- Fork
- 688
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 18
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/node-slack-sdk
-
ThreadBroadcastMessageEvent is missing `bot_id`Có thể đã có người làm @sean0407 đã nhận 7 ngày trước. Đang mởuntriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
slackapi/node-slack-sdk#2766 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SocketModeClient crashes on Events API payloads without an inner eventCó thể đã có người làm @kyungyeon-byun-imweb-me đã nhận 19 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
slackapi/node-slack-sdk#2753 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support assistant.search.* APIsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởauto-triage-skip enhancement pkg:web-api
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
slackapi/node-slack-sdk#2607 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`SlackListsItem FieldMessage.message` type does not match API response shapeCó thể đã có người làm @AjTheSpidey đã nhận 158 ngày trước. Đang mởarea:typescript auto-triage-skip bug pkg:web-api
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
slackapi/node-slack-sdk#2598 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Missing TypeScript response type for files.uploadV2Có thể đã có người làm @dajiaohuang đã nhận 25 ngày trước. Đang mởarea:typescript auto-triage-skip bug pkg:web-api
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
slackapi/node-slack-sdk#2459 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của slackapi/node-slack-sdk
Issue tương tự
-
fix(cursor): align Grok 4.7 context window to 256k/500k and drop unsupported max effort tierĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
diegosouzapw/OmniRoute#17386 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/dashboard kind/bug kind/bug-qa QA/dev-automation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
vybestack/llxprt-code#3917 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
api-parity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
IBM/carbon-components-ember#1157 ·
Maintainer thường phản hồi trong vòng 1 ngày