summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathMan05 <mathmanrm@gmail.com>2026-02-17 12:55:56 -0600
committerMathMan05 <mathmanrm@gmail.com>2026-02-17 12:55:56 -0600
commit7d0a5f5d96f77e1af80d2980b59924fbdbff71ed (patch)
tree51ff3dd0665c0b1dc6dbe290ca49e34449f716e4
parentfix (diff)
downloadserver-ts-7d0a5f5d96f77e1af80d2980b59924fbdbff71ed.tar.xz
fix post data
-rw-r--r--src/api/routes/channels/#channel_id/post-data.ts17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/api/routes/channels/#channel_id/post-data.ts b/src/api/routes/channels/#channel_id/post-data.ts

index f1727109..f58a27cf 100644 --- a/src/api/routes/channels/#channel_id/post-data.ts +++ b/src/api/routes/channels/#channel_id/post-data.ts
@@ -61,7 +61,21 @@ router.post( where: { id: In(threads.map(({ id }) => id)), }, - relations: ["author"], + relations: { + author: true, + webhook: true, + application: true, + mentions: true, + mention_roles: true, + mention_channels: true, + sticker_items: true, + attachments: true, + thread: { + recipients: { + user: true, + }, + }, + }, }), Member.find({ where: { @@ -69,6 +83,7 @@ router.post( }, }), ]); + await Message.fillReplies(messages); const objRet: { threads: Record<string, { first_message: null | Message; owner: null | Member }> } = { threads: {} }; for (const thread of threads) { const owner = members.find(({ id }) => id === thread.owner_id)?.toJSON() || null;