From cb4f85df0fd45528f661b3b778be5e0c38bda00c Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Tue, 29 Apr 2025 14:48:35 -0500 Subject: [PATCH] only allow edits of certain message types --- src/webpage/message.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webpage/message.ts b/src/webpage/message.ts index 775a831..7d5f7a7 100644 --- a/src/webpage/message.ts +++ b/src/webpage/message.ts @@ -71,7 +71,7 @@ class Message extends SnowFlake { }, }, ); - + const editTypes = new Set([0, 19]); Message.contextmenu.addButton( () => I18n.getTranslation("message.edit"), function (this: Message) { @@ -79,7 +79,7 @@ class Message extends SnowFlake { }, { visable: function () { - return this.author.id === this.localuser.user.id; + return this.author.id === this.localuser.user.id && editTypes.has(this.type); }, icon: {