summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorErkin Alp Güney <erkinalp9035@gmail.com>2022-04-08 11:05:19 +0300
committerGitHub <noreply@github.com>2022-04-08 11:05:19 +0300
commitbe3f796f3462ce925c445d710e848425ac1f9d94 (patch)
treea9a84bfd08eb0c3eec783214d12e594dd8c2ae33 /api
parentenforce the rights (diff)
downloadserver-be3f796f3462ce925c445d710e848425ac1f9d94.tar.xz
remove todos that are implemented
Diffstat (limited to 'api')
-rw-r--r--api/src/util/handlers/Message.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/api/src/util/handlers/Message.ts b/api/src/util/handlers/Message.ts
index f0ecf416..5a5ac666 100644
--- a/api/src/util/handlers/Message.ts
+++ b/api/src/util/handlers/Message.ts
@@ -75,7 +75,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
 	}
 	
 	const permission = await getPermission(opts.author_id, channel.guild_id, opts.channel_id);
-	permission.hasThrow("SEND_MESSAGES"); // TODO: add the rights check
+	permission.hasThrow("SEND_MESSAGES");
 	if (permission.cache.member) {
 		message.member = permission.cache.member;
 	}
@@ -83,7 +83,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
 	if (opts.tts) permission.hasThrow("SEND_TTS_MESSAGES");
 	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
+		// code below has to be redone when we add custom message routing
 		if (message.guild_id !== null) {
 			const guild = await Guild.findOneOrFail({ id: channel.guild_id });
 			if (!guild.features.includes("CROSS_CHANNEL_REPLIES")) {
@@ -91,7 +91,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
 				if (opts.message_reference.channel_id !== opts.channel_id) throw new HTTPError("You can only reference messages from this channel");
 			}
 		}
-		// TODO: should be checked if the referenced message exists?
+		// Q: should be checked if the referenced message exists? ANSWER: NO
 		// @ts-ignore
 		message.type = MessageType.REPLY;
 	}