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:
Jannis Braun
2026-03-20 23:41:53 +01:00
parent 5fe25fb077
commit 01ee7ab67a
6 changed files with 93 additions and 13 deletions
+1
View File
@@ -267,6 +267,7 @@ export const useChatStore = create<ChatState>((set, get) => ({
createdAt: Date.now(),
user: currentUser,
attachments: [],
embeds: [],
reactions: [],
replyTo: get().replyTo ?? undefined,
};