fix it the other way arround

This commit is contained in:
MathMan05
2026-02-13 02:24:35 +01:00
committed by Rory&
parent 8528863270
commit f02d1a7a76
2 changed files with 16 additions and 2 deletions
+15 -1
View File
@@ -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" },
});
+1 -1
View File
@@ -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;
}),