MessageLogger: Add setting to toggle deleted attachments logging (#4556)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
ada5cfeb80
commit
ce4e84277e
1 changed files with 8 additions and 1 deletions
|
|
@ -81,6 +81,12 @@ const settings = definePluginSettings({
|
|||
description: "Whether to log edited messages",
|
||||
default: true,
|
||||
},
|
||||
logDeletedAttachments: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Whether to log deleted attachments",
|
||||
default: true,
|
||||
restartNeeded: true,
|
||||
},
|
||||
inlineEdits: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Whether to display edit history as part of message content",
|
||||
|
|
@ -89,7 +95,7 @@ const settings = definePluginSettings({
|
|||
ignoreBots: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Whether to ignore messages by bots",
|
||||
default: false
|
||||
default: true
|
||||
},
|
||||
ignoreSelf: {
|
||||
type: OptionType.BOOLEAN,
|
||||
|
|
@ -482,6 +488,7 @@ export default definePlugin({
|
|||
// just mark deleted attachments as deleted on MESSAGE_UPDATE
|
||||
{
|
||||
match: /attachments:(\i)\.attachments\?\?\[\],/,
|
||||
predicate: () => settings.store.logDeletedAttachments,
|
||||
replace: "attachments: $self.handleUpdateAttachments($1),"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue