Revert "Update RemoveBlockedMessages.plugin.js"
This reverts commit 3f22c42cc7
.
This commit is contained in:
parent
3f22c42cc7
commit
51feb20806
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue