Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions gateway/stream_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1625,6 +1625,13 @@ async def _send_or_edit(
# Record this (and any continuation fragments from an
# oversized first send) for fresh-final cleanup.
self._track_preview_ids_from_result(result)
# When send() split content across multiple 4096-char
# chunks (legacy path), treat it like an edit overflow:
# the content was fully delivered so the got_done block
# must not fire a second finalize edit (which would
# re-split into a duplicate chunk).
if getattr(result, "continuation_message_ids", None):
self._last_edit_overflowed = True
else:
self._edit_supported = False
self._already_sent = True
Expand Down
Loading