summary refs log tree commit diff
path: root/src/api/util/handlers
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-17 11:28:29 +0100
committerRory& <root@rory.gay>2025-12-17 11:28:29 +0100
commit915000ee40784254b93d85d9a074b6b4e0ea52ec (patch)
treeefa8c69e371dbc7f7f330c137cf51f08128ed8c5 /src/api/util/handlers
parentMerge remote-tracking branch 'mathium05/greetFix' (diff)
parentRun ESLint (diff)
downloadserver-ts-915000ee40784254b93d85d9a074b6b4e0ea52ec.tar.xz
Merge remote-tracking branch 'DEVTomatoCake/fix/getPublicUser-no-defaults'
Diffstat (limited to 'src/api/util/handlers')
-rw-r--r--src/api/util/handlers/Message.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts

index 65583f53..915fe292 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts
@@ -158,7 +158,9 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> { } if (opts.author_id) { - message.author = await User.getPublicUser(opts.author_id); + message.author = await User.findOneOrFail({ + where: { id: opts.author_id }, + }); const rights = await getRights(opts.author_id); rights.hasThrow("SEND_MESSAGES"); }