summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <myrainbowdash949@gmail.com>2023-12-08 19:48:04 +0000
committerRory& <myrainbowdash949@gmail.com>2023-12-08 19:48:04 +0000
commit583d9ff4076b2a9916297bdcf82129aff7d2f2bb (patch)
tree576ee58432de8bb722e821a8e9d6e7d75e1a3685
parentadd components to message create schema (diff)
downloadserver-583d9ff4076b2a9916297bdcf82129aff7d2f2bb.tar.xz
Fix reacting with custom emojis from same guild requiring USE_EXTERNAL_EMOJIS
-rw-r--r--src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts b/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts
index 5efa0f14..c2222b0a 100644
--- a/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts
+++ b/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts
@@ -215,7 +215,8 @@ router.put(
 			const external_emoji = await Emoji.findOneOrFail({
 				where: { id: emoji.id },
 			});
-			if (!already_added) req.permission?.hasThrow("USE_EXTERNAL_EMOJIS");
+			if (!already_added && channel.guild_id != external_emoji.guild_id)
+				req.permission?.hasThrow("USE_EXTERNAL_EMOJIS");
 			emoji.animated = external_emoji.animated;
 			emoji.name = external_emoji.name;
 		}