Skip to content

Commit cb4f85d

Browse files
committed
only allow edits of certain message types
1 parent 4ecc6ba commit cb4f85d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/webpage/message.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ class Message extends SnowFlake {
7171
},
7272
},
7373
);
74-
74+
const editTypes = new Set([0, 19]);
7575
Message.contextmenu.addButton(
7676
() => I18n.getTranslation("message.edit"),
7777
function (this: Message) {
7878
this.setEdit();
7979
},
8080
{
8181
visable: function () {
82-
return this.author.id === this.localuser.user.id;
82+
return this.author.id === this.localuser.user.id && editTypes.has(this.type);
8383
},
8484

8585
icon: {

0 commit comments

Comments
 (0)