diff --git a/services/frontend/src/features/messages/messages-panel.tsx b/services/frontend/src/features/messages/messages-panel.tsx index 64a34e7..fc6a600 100644 --- a/services/frontend/src/features/messages/messages-panel.tsx +++ b/services/frontend/src/features/messages/messages-panel.tsx @@ -370,18 +370,47 @@ export function MessagesPanel({ guildId }: { guildId: string }) { ) : viewTab === "images" ? (
- {imageMessages.map((msg) => ( -
- {msg.content && ( -
- {msg.username}: {msg.content} -
- )} -
- ))} + {imageMessages.map((msg) => { + // Extract image URLs from metadata + let imageUrl: string | null = null; + try { + const meta = JSON.parse(msg.metadata ?? "{}"); + const attachments: Array<{ url: string; contentType?: string }> = + meta.attachments ?? []; + const img = attachments.find((a) => + a.contentType?.startsWith("image/"), + ); + imageUrl = img?.url ?? null; + } catch { + // metadata is malformed + } + + return ( +
+ {imageUrl ? ( + {msg.content + ) : ( +
+ No image +
+ )} + {msg.content && ( +
+ {msg.username}: {msg.content} +
+ )} +
+ ); + })}
) : ( /* Review tab */