Update RemoveBlockedUsers.plugin.js

This commit is contained in:
Mirco Wittrien 2022-05-15 08:04:15 +02:00
parent 98db4469af
commit 07caed11ee
1 changed files with 2 additions and 1 deletions

View File

@ -130,7 +130,8 @@ module.exports = (_ => {
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.ChannelStore, "getChannel", {after: e => {
if (e.returnValue && e.returnValue.isGroupDM()) return new BDFDB.DiscordObjects.Channel(Object.assign({}, e.returnValue, {rawRecipients: e.returnValue.rawRecipients.filter(n => !n || !BDFDB.LibraryModules.RelationshipStore.isBlocked(n.id)), recipients: e.returnValue.recipients.filter(id => !id || !BDFDB.LibraryModules.RelationshipStore.isBlocked(id))}))
}});
BDFDB.PatchUtils.patch(this, BDFDB.ModuleUtils.findByProperties("getMutableParticipants"), "getMutableParticipants", {after: e => {
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.StageChannelUtils, "getMutableParticipants", {after: e => {
e.returnValue = e.returnValue.filter(n => !n.user || !BDFDB.LibraryModules.RelationshipStore.isBlocked(n.user.id));
}});