QuickReply & Up Key: Do not attempt to edit/reply to logged deleted message

This commit is contained in:
Vendicated 2023-04-02 22:14:58 +02:00
parent 8378638ee4
commit 8c47b7080d
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
2 changed files with 15 additions and 3 deletions

View file

@ -209,6 +209,11 @@ export default definePlugin({
" m" +
")" +
".update($3"
},
{
// fix up key (edit last message) attempting to edit a deleted message
match: /(?<=getLastEditableMessage=.{0,200}\.find\(\(function\((\i)\)\{)return/,
replace: "return !$1.deleted &&"
}
]
},