Long threaded reply leaks out of a topic/thread chat: reply_to dropped on chunks after the first
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia in lark_channel/channel/outbound/sender.py, all’interno di OutboundSender._send_text, e verifica come viene applicato reply_to quando i messaggi superano text_chunk_limit. Riproduci il problema con un gruppo in modalità topic e un messaggio Markdown lungo usando SendOpts(reply_to=..., reply_in_thread=True); il lavoro è completato quando ogni chunk rimane nel thread, mentre le risposte non in un thread mantengono il comportamento attuale.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 18
- Fork
- 9
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 larksuite/channel-sdk-python
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
-
webhook: signature verification silently no-ops without encrypt_key; no timestamp-freshness or replay checksForse già presa @Xuxchloris l’ha presa 69 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
merge_streaming_text drops characters for pure-delta streaming producersForse già presa @Xuxchloris l’ha presa 69 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
Tutte le issue di larksuite/channel-sdk-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
khuisman/mcp-gee-sweet#1166 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
lugassawan/swe-workbench#823 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
gramaziokohler/compas_timber#870 ·
-
security-scan-failure
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
semantica-agi/semantica#2089 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
autowarefoundation/autoware_carla_scenario#500 ·
I maintainer di solito rispondono entro 1 giorno