fix(gateway): include replied-to media attachments (#46107)

This commit is contained in:
Teknium
2026-06-14 04:51:50 -07:00
committed by GitHub
parent a27d7e68cc
commit efbe1635dd
4 changed files with 151 additions and 1 deletions
+7 -1
View File
@@ -4973,7 +4973,13 @@ class DiscordAdapter(BasePlatformAdapter):
auto_threaded_channel = thread
self._threads.mark(thread_id)
all_attachments = list(message.attachments) + snapshot_attachments
referenced_attachments = []
reference = getattr(message, "reference", None)
resolved_reference = getattr(reference, "resolved", None) if reference else None
if resolved_reference is not None:
referenced_attachments = list(getattr(resolved_reference, "attachments", []) or [])
all_attachments = list(message.attachments) + snapshot_attachments + referenced_attachments
# Determine message type
msg_type = MessageType.TEXT