1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-06 19:02:33 +01:00

Fix typo in commit 277b28c

This commit is contained in:
Madeline 2022-01-13 18:45:23 +11:00 committed by Erkin Alp Güney
parent cc698225a0
commit 41fca13db2

View File

@ -82,7 +82,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
if (opts.message_reference) { if (opts.message_reference) {
permission.hasThrow("READ_MESSAGE_HISTORY"); permission.hasThrow("READ_MESSAGE_HISTORY");
// code below has to be redone when we add custom message routing and cross-channel replies // code below has to be redone when we add custom message routing and cross-channel replies
const guild = await Guild.findOneOrFail({ id: guild_id }); const guild = await Guild.findOneOrFail({ id: channel.guild_id });
if (!guild.features.includes("CROSS_CHANNEL_REPLIES")) { if (!guild.features.includes("CROSS_CHANNEL_REPLIES")) {
if (opts.message_reference.guild_id !== channel.guild_id) throw new HTTPError("You can only reference messages from this guild"); if (opts.message_reference.guild_id !== channel.guild_id) throw new HTTPError("You can only reference messages from this guild");
if (opts.message_reference.channel_id !== opts.channel_id) throw new HTTPError("You can only reference messages from this channel"); if (opts.message_reference.channel_id !== opts.channel_id) throw new HTTPError("You can only reference messages from this channel");