MessageLogger: fix attachment ignore (#1989)

main
AutumnVN 1 year ago committed by GitHub
parent c080a0eaac
commit 6578eb487e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -302,6 +302,7 @@ export default definePlugin({
match: /attachments:(\i)\((\i)\)/, match: /attachments:(\i)\((\i)\)/,
replace: replace:
"attachments: $1((() => {" + "attachments: $1((() => {" +
" if ($self.shouldIgnore($2)) return $2;" +
" let old = arguments[1]?.attachments;" + " let old = arguments[1]?.attachments;" +
" if (!old) return $2;" + " if (!old) return $2;" +
" let new_ = $2.attachments?.map(a => a.id) ?? [];" + " let new_ = $2.attachments?.map(a => a.id) ?? [];" +

Loading…
Cancel
Save