summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-01-13 18:45:23 +1100
committerErkin Alp Güney <erkinalp9035@gmail.com>2022-01-13 10:49:26 +0300
commit853789f0acb26ef90183b044ae5fbbc93a15b5e2 (patch)
tree532e5e160a7b29a28cfad56ad47f1274ce92a9da /api
parentupdate defaults (diff)
downloadserver-853789f0acb26ef90183b044ae5fbbc93a15b5e2.tar.xz
Fix typo in commit 277b28c
Diffstat (limited to 'api')
-rw-r--r--api/src/util/handlers/Message.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/util/handlers/Message.ts b/api/src/util/handlers/Message.ts
index 92bb2335..21664368 100644
--- a/api/src/util/handlers/Message.ts
+++ b/api/src/util/handlers/Message.ts
@@ -82,7 +82,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
 	if (opts.message_reference) {
 		permission.hasThrow("READ_MESSAGE_HISTORY");
 		// 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 (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");