Long threaded reply leaks out of a topic/thread chat: reply_to dropped on chunks after the first
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu trong lark_channel/channel/outbound/sender.py tại OutboundSender._send_text và kiểm tra cách reply_to được áp dụng khi các tin nhắn vượt quá text_chunk_limit. Tái hiện với một nhóm ở chế độ topic và một tin nhắn Markdown dài bằng cách sử dụng SendOpts(reply_to=..., reply_in_thread=True); hoàn tất khi mọi chunk vẫn nằm trong thread, còn các reply không ở trong thread vẫn giữ nguyên hành vi hiện tại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
In a Feishu/Lark thread (topic) chat, the tail of a long threaded reply leaks out of the thread into the main chat.
Root cause
lark_channel/channel/outbound/sender.py — OutboundSender._send_text splits a message longer than text_chunk_limit into multiple bodies, but applies reply_to only to the first chunk:
# Only apply `reply_to` to the first chunk; subsequent chunks are
# fresh messages so they all render in the original chat.
effective_reply_to = reply_to if idx == 0 else None
For a normal reply, "fresh messages render in the original chat" holds. But in a thread/topic chat, a message sent without a reply parent does not render in the thread — it drops into the main chat. So with reply_in_thread=True, every chunk after the first leaks out of the thread.
Reproduction
- In a topic-mode group, send a markdown message longer than
text_chunk_limit(default 3500) withSendOpts(reply_to=<root_message_id>, reply_in_thread=True). - Observed: the first chunk is a threaded reply under the root; the remaining chunks appear as top-level messages in the main group.
- Expected: all chunks stay in the thread.
Suggested fix
Keep reply_to on every chunk when threading:
effective_reply_to = reply_to if (idx == 0 or reply_in_thread) else None
Replying each chunk to the same root with reply_in_thread=True keeps all pieces in the thread; non-thread replies keep the current first-chunk-only behavior.
Observed on 1.1.0 and current main (lines ~388–390). A PR with this change is opened separately.
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 larksuite/channel-sdk-python
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
-
webhook: signature verification silently no-ops without encrypt_key; no timestamp-freshness or replay checksCó thể đã có người làm @Xuxchloris đã nhận 73 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
merge_streaming_text drops characters for pure-delta streaming producersCó thể đã có người làm @Xuxchloris đã nhận 73 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
Tất cả issue của larksuite/channel-sdk-python
Issue tương tự
-
Link Checker ReportĐang mởautomated issue linkchecker report
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
QuantEcon/lecture-python.myst#1098 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
[Bug]: Processing errors missing from Docker logs due to incorrect console-handler detectionĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
podly-pure-podcasts/podly_pure_podcasts#279 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
New template proposal: ljpĐang mởtemplate-proposal
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
OpenShot/openshot-qt#6230 ·
Maintainer thường phản hồi trong vòng 1 ngày