summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathMan05 <mathmanrm@gmail.com>2026-02-12 19:17:07 -0600
committerRory& <root@rory.gay>2026-02-13 02:24:35 +0100
commitf02d1a7a7611cffa36ed6c339a58c07ecbb5c9cc (patch)
treef6565538decee530022fc3f8076b14b80c702a62
parentfix pins (diff)
downloadserver-ts-f02d1a7a7611cffa36ed6c339a58c07ecbb5c9cc.tar.xz
fix it the other way arround
-rw-r--r--src/api/routes/channels/#channel_id/pins.ts16
-rw-r--r--src/util/entities/Message.ts2
2 files changed, 16 insertions, 2 deletions
diff --git a/src/api/routes/channels/#channel_id/pins.ts b/src/api/routes/channels/#channel_id/pins.ts

index 37021676..899d2d43 100644 --- a/src/api/routes/channels/#channel_id/pins.ts +++ b/src/api/routes/channels/#channel_id/pins.ts
@@ -174,7 +174,21 @@ router.get( const pins = await Message.find({ where: { channel_id: channel_id, pinned_at: Not(IsNull()) }, - relations: { author: true }, + relations: { + author: true, + webhook: true, + application: true, + mentions: true, + mention_roles: true, + mention_channels: true, + sticker_items: true, + attachments: true, + thread: { + recipients: { + user: true, + }, + }, + }, order: { pinned_at: "DESC" }, }); diff --git a/src/util/entities/Message.ts b/src/util/entities/Message.ts
index 0957bcf2..71364673 100644 --- a/src/util/entities/Message.ts +++ b/src/util/entities/Message.ts
@@ -243,7 +243,7 @@ export class Message extends BaseClass { member_id: undefined, webhook_id: this.webhook_id ?? undefined, application_id: undefined, - mentions: this.mentions?.map((user) => { + mentions: this.mentions.map((user) => { if (user && !user.toPublicUser) console.trace("toPublic user missing!!!"); return user?.toPublicUser?.() ?? user ?? undefined; }),