Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Long threaded reply leaks out of a topic/thread chat: reply_to dropped on chunks after the first

Aperta
#5 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@Ydz0616 ci sta già lavorando.

Dal 8/7/2026.

  • #6 di @Ydz0616 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api

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
  1. In a topic-mode group, send a markdown message longer than text_chunk_limit (default 3500) with SendOpts(reply_to=<root_message_id>, reply_in_thread=True).
  2. Observed: the first chunk is a threaded reply under the root; the remaining chunks appear as top-level messages in the main group.
  3. 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di larksuite/channel-sdk-python

Tutte le issue di larksuite/channel-sdk-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.