only allow edits of certain message types

This commit is contained in:
MathMan05 2025-04-29 14:48:35 -05:00
parent 4ecc6ba2fe
commit cb4f85df0f

View file

@ -71,7 +71,7 @@ class Message extends SnowFlake {
}, },
}, },
); );
const editTypes = new Set([0, 19]);
Message.contextmenu.addButton( Message.contextmenu.addButton(
() => I18n.getTranslation("message.edit"), () => I18n.getTranslation("message.edit"),
function (this: Message) { function (this: Message) {
@ -79,7 +79,7 @@ class Message extends SnowFlake {
}, },
{ {
visable: function () { visable: function () {
return this.author.id === this.localuser.user.id; return this.author.id === this.localuser.user.id && editTypes.has(this.type);
}, },
icon: { icon: {