feat: wire embeds into all message query and creation paths
Integrate embed infrastructure into the complete message flow: - messages.ts: batch-fetch embeds in GET, resolve on POST, re-resolve on PATCH - dm.ts: same pattern for DM messages with isDm=true - search.ts: include embeds in all 4 search/around endpoints - events.ts: embed resolution in WS message create/edit for both space and DM - Fix embedClassifier.ts type errors (regex match undefined → null) - Add embeds: [] to all inline MessageWithUser/DmMessageWithUser constructions - Add embeds: [] to chatStore optimistic message
This commit is contained in:
@@ -25,15 +25,15 @@ function extractYouTubeId(url: URL): string | null {
|
||||
|
||||
// /shorts/ID
|
||||
const shortsMatch = path.match(/^\/shorts\/([A-Za-z0-9_-]+)/);
|
||||
if (shortsMatch) return shortsMatch[1];
|
||||
if (shortsMatch) return shortsMatch[1] ?? null;
|
||||
|
||||
// /embed/ID
|
||||
const embedMatch = path.match(/^\/embed\/([A-Za-z0-9_-]+)/);
|
||||
if (embedMatch) return embedMatch[1];
|
||||
if (embedMatch) return embedMatch[1] ?? null;
|
||||
|
||||
// /v/ID (legacy)
|
||||
const vMatch = path.match(/^\/v\/([A-Za-z0-9_-]+)/);
|
||||
if (vMatch) return vMatch[1];
|
||||
if (vMatch) return vMatch[1] ?? null;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user