mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-14 16:15:18 +00:00
fix: find the user instead of creating it when replying to a message
This commit is contained in:
@@ -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