mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-22 15:22:43 +00:00
fix: find the user instead of creating it when replying to a message
This commit is contained in:
1 parent
a66d6f0086
commit
fd4dd5499e
1 file changed
+2
-3
@@ -346,9 +346,8 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
|
||||
});
|
||||
if (referencedMessage && referencedMessage.author_id !== message.author_id) {
|
||||
message.mentions.push(
|
||||
User.create({
|
||||
id: referencedMessage.author_id,
|
||||
}),
|
||||
// @ts-expect-error it does not like the .toPublicUser() lol
|
||||
(await User.findOne({ where: { id: referencedMessage.author_id } }))!.toPublicUser(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user