aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/messageLogger/index.tsx
diff options
context:
space:
mode:
authorkb <47297843+kbd0t@users.noreply.github.com>2023-06-16 19:35:35 +0200
committerGitHub <noreply@github.com>2023-06-16 19:35:35 +0200
commit55af40ee747fbf872eb5bb07a49ea4cd276e8c34 (patch)
treeed36e7e8f99f092469218c7b01334615f9bf7aed /src/plugins/messageLogger/index.tsx
parenta1fabcdf0aa665c7ee0254c1d7f257e5262a954d (diff)
downloadVencord-55af40ee747fbf872eb5bb07a49ea4cd276e8c34.tar.gz
Vencord-55af40ee747fbf872eb5bb07a49ea4cd276e8c34.tar.bz2
Vencord-55af40ee747fbf872eb5bb07a49ea4cd276e8c34.zip
MessageLogger: Add user ignore list (#1275)
Co-authored-by: V <vendicated@riseup.net>
Diffstat (limited to 'src/plugins/messageLogger/index.tsx')
-rw-r--r--src/plugins/messageLogger/index.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx
index 2da7c2e..2041f70 100644
--- a/src/plugins/messageLogger/index.tsx
+++ b/src/plugins/messageLogger/index.tsx
@@ -147,6 +147,11 @@ export default definePlugin({
type: OptionType.BOOLEAN,
description: "Whether to ignore messages by yourself",
default: false
+ },
+ ignoreUsers: {
+ type: OptionType.STRING,
+ description: "Comma-separated list of user IDs to ignore",
+ default: ""
}
},
@@ -154,7 +159,7 @@ export default definePlugin({
try {
if (cache == null || (!isBulk && !cache.has(data.id))) return cache;
- const { ignoreBots, ignoreSelf } = Settings.plugins.MessageLogger;
+ const { ignoreBots, ignoreSelf, ignoreUsers } = Settings.plugins.MessageLogger;
const myId = UserStore.getCurrentUser().id;
function mutate(id: string) {
@@ -165,7 +170,8 @@ export default definePlugin({
const shouldIgnore = data.mlDeleted ||
(msg.flags & EPHEMERAL) === EPHEMERAL ||
ignoreBots && msg.author?.bot ||
- ignoreSelf && msg.author?.id === myId;
+ ignoreSelf && msg.author?.id === myId ||
+ ignoreUsers.includes(msg.author?.id);
if (shouldIgnore) {
cache = cache.remove(id);