fix: wire DM file attachments through the full send/fetch/broadcast chain

DM uploads silently failed because the 5-point chain (types, frontend,
POST, GET, WS broadcast) was never wired for attachments. Added
buildDmMessageWithUser/getDmMessageWithUser helpers mirroring the server
channel pattern, and plumbed attachmentIds + replyToId through all DM
code paths.
This commit is contained in:
Jannis Braun
2026-02-24 00:08:45 +01:00
parent 900eb67869
commit b6adf310fc
4 changed files with 224 additions and 69 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ export const useChatStore = create<ChatState>((set, get) => ({
try {
if (isDm) {
await api.dm.sendMessage(channelId, { content });
await api.dm.sendMessage(channelId, { content, attachments: attachmentIds, replyToId });
} else {
await api.channels.sendMessage(channelId, { content, attachments: attachmentIds, replyToId });
}