mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-28 13:54:08 +00:00
Merge remote-tracking branch 'DEVTomatoCake/fix/getPublicUser-no-defaults'
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user