From 51feb2080623e9dc0aff1b5bb67e1f0e33d290cc Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 15 Oct 2020 18:41:44 +0200 Subject: [PATCH] Revert "Update RemoveBlockedMessages.plugin.js" This reverts commit 3f22c42cc72d15e53fc9ccce023604c916a28541. --- .../RemoveBlockedMessages.plugin.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Plugins/RemoveBlockedMessages/RemoveBlockedMessages.plugin.js b/Plugins/RemoveBlockedMessages/RemoveBlockedMessages.plugin.js index 59c50c5de9..f6eca1f870 100644 --- a/Plugins/RemoveBlockedMessages/RemoveBlockedMessages.plugin.js +++ b/Plugins/RemoveBlockedMessages/RemoveBlockedMessages.plugin.js @@ -5,12 +5,12 @@ module.exports = (_ => { "info": { "name": "RemoveBlockedMessages", "author": "DevilBro", - "version": "1.0.9", + "version": "1.0.8", "description": "Completely removes blocked messages." }, "changeLog": { "fixed": { - "Hide Users": "Also hides user icons in the voice channel overview & in the autocomplete menu", + "Hide Users": "Also hides user icons in the voice channel overview", "Role Group Count": "Fixes role group count for hidden banned users" } } @@ -69,8 +69,6 @@ module.exports = (_ => { VoiceUser: "render" } }; - - this.patchPriority = 10; } onStart() { @@ -98,10 +96,6 @@ module.exports = (_ => { } }}); - if (BDFDB.LibraryModules.AutocompleteOptions && BDFDB.LibraryModules.AutocompleteOptions.AUTOCOMPLETE_OPTIONS) BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.AutocompleteOptions.AUTOCOMPLETE_OPTIONS.MENTIONS, "queryResults", {after: e => { - if (settings.removeUsers) e.returnValue.users = e.returnValue.users.filter(n => !n.user || !BDFDB.LibraryModules.FriendUtils.isBlocked(n.user.id)); - }}); - this.forceUpdateAll(); } @@ -152,7 +146,7 @@ module.exports = (_ => { let messages = messagesIns.props.messages; messagesIns.props.messages = new BDFDB.DiscordObjects.Messages(messages); for (let key in messages) messagesIns.props.messages[key] = messages[key]; - messagesIns.props.messages._array = [].concat(messagesIns.props.messages._array.filter(n => !n.author || !BDFDB.LibraryModules.FriendUtils.isBlocked(n.author.id))); + messagesIns.props.messages._array = [].concat(messagesIns.props.messages._array.filter(n => n.author && !BDFDB.LibraryModules.FriendUtils.isBlocked(n.author.id))); if (messagesIns.props.oldestUnreadMessageId && messagesIns.props.messages._array.every(n => n.id != messagesIns.props.oldestUnreadMessageId)) messagesIns.props.oldestUnreadMessageId = null; } }