Update RemoveBlockedUsers.plugin.js
This commit is contained in:
parent
3d3a189770
commit
cb228e0d76
|
@ -2,7 +2,7 @@
|
|||
* @name RemoveBlockedUsers
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 1.5.0
|
||||
* @version 1.5.1
|
||||
* @description Removes blocked Messages/Users
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,13 +17,8 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "RemoveBlockedUsers",
|
||||
"author": "DevilBro",
|
||||
"version": "1.5.0",
|
||||
"version": "1.5.1",
|
||||
"description": "Removes blocked Messages/Users"
|
||||
},
|
||||
"changeLog": {
|
||||
"fixed": {
|
||||
"Voice Notifications": "Fixed an Issue where nonblocked Users or yourself would stop making noices on join/leave after some occurences"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -81,6 +76,7 @@ module.exports = (_ => {
|
|||
replies: {value: true, description: "Replies"},
|
||||
mentions: {value: true, description: "Mentions"},
|
||||
reactions: {value: true, description: "Reactions"},
|
||||
threads: {value: true, description: "Threads"},
|
||||
autocompletes: {value: true, description: "Autocomplete Entries"},
|
||||
memberList: {value: true, description: "Members in List"},
|
||||
voiceList: {value: true, description: "Members in Voice List"},
|
||||
|
@ -111,6 +107,7 @@ module.exports = (_ => {
|
|||
Messages: "type",
|
||||
SearchResultsInner: "default",
|
||||
Reactions: "render",
|
||||
ActiveThread: "type",
|
||||
ConnectedChannelMembers: "default",
|
||||
MemberListItem: "render",
|
||||
NowPlayingItem: "default",
|
||||
|
@ -369,6 +366,15 @@ module.exports = (_ => {
|
|||
if (this.settings.places.reactions && BDFDB.ArrayUtils.is(e.instance.props.reactors)) e.instance.props.reactors = e.instance.props.reactors.filter(n => !n || !BDFDB.LibraryModules.RelationshipStore.isBlocked(n.id));
|
||||
}
|
||||
|
||||
processActiveThread (e) {
|
||||
if (!this.settings.places.threads) return;
|
||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {filter: n => n && n.type && n.type.toString().indexOf(".getMostRecentMessage") > -1});
|
||||
if (index > -1 && children[index].props && children[index].props.channel) {
|
||||
let message = BDFDB.LibraryModules.MessageStore.getMessage(children[index].props.channel.id, children[index].props.channel.lastMessageId);
|
||||
if (message && BDFDB.LibraryModules.RelationshipStore.isBlocked(message.author.id)) children[index] = null;
|
||||
}
|
||||
}
|
||||
|
||||
processConnectedChannelMembers (e) {
|
||||
if (!this.settings.places.memberList) return;
|
||||
let channelMembers = BDFDB.ReactUtils.findChild(e.returnvalue, {name: "ChannelMembers"});
|
||||
|
|
Loading…
Reference in New Issue