feat: replace Embed.tsx with AttachmentRenderer + EmbedRenderer in Message

Switches Message.tsx from client-side URL metadata fetching (old Embed.tsx)
to server-driven embed objects via message.embeds[]. Delegates attachment
rendering to AttachmentRenderer. Removes firstUrl extraction and urlRegex.
This commit is contained in:
Jannis Braun
2026-03-20 23:47:16 +01:00
parent 5a670bc6ad
commit 95762a1974
3 changed files with 14 additions and 131 deletions
@@ -134,7 +134,7 @@ export function MessageList({ channelId, jumpToMessageId, onJumpComplete }: Mess
if (el) {
el.scrollIntoView({ block: 'start' });
const dist = container.scrollHeight - container.scrollTop - container.clientHeight;
const near = dist < 5000;
const near = dist < 150;
setIsNearBottom(near);
isNearBottomRef.current = near;
return;
@@ -218,7 +218,7 @@ export function MessageList({ channelId, jumpToMessageId, onJumpComplete }: Mess
// Check if near bottom
const distanceFromBottom = container.scrollHeight - container.scrollTop - container.clientHeight;
const nearBottom = distanceFromBottom < 5000;
const nearBottom = distanceFromBottom < 150;
setIsNearBottom(nearBottom);
isNearBottomRef.current = nearBottom;