Update EditChannels.plugin.js
This commit is contained in:
parent
91497815ad
commit
9d1dc332fe
|
@ -105,6 +105,7 @@ module.exports = (_ => {
|
||||||
ChannelEditorContainer: "render",
|
ChannelEditorContainer: "render",
|
||||||
TextChannelEmptyMessage: "default",
|
TextChannelEmptyMessage: "default",
|
||||||
ThreadEmptyMessage: "default",
|
ThreadEmptyMessage: "default",
|
||||||
|
SystemMessageWrapper: "type",
|
||||||
AutocompleteChannelResult: "render",
|
AutocompleteChannelResult: "render",
|
||||||
AuditLog: "render",
|
AuditLog: "render",
|
||||||
SettingsInvites: "render",
|
SettingsInvites: "render",
|
||||||
|
@ -117,6 +118,8 @@ module.exports = (_ => {
|
||||||
MessageContent: "type"
|
MessageContent: "type"
|
||||||
},
|
},
|
||||||
after: {
|
after: {
|
||||||
|
ThreadMessageAccessories: "default",
|
||||||
|
ThreadCreated: "default",
|
||||||
AutocompleteChannelResult: "render",
|
AutocompleteChannelResult: "render",
|
||||||
AuditLog: "render",
|
AuditLog: "render",
|
||||||
HeaderBarContainer: "render",
|
HeaderBarContainer: "render",
|
||||||
|
@ -291,6 +294,31 @@ module.exports = (_ => {
|
||||||
if (e.instance.props.channel && changedChannels[e.instance.props.channel.id] && this.settings.places.chatWindow) e.instance.props.channel = this.getChannelData(e.instance.props.channel.id);
|
if (e.instance.props.channel && changedChannels[e.instance.props.channel.id] && this.settings.places.chatWindow) e.instance.props.channel = this.getChannelData(e.instance.props.channel.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
processSystemMessageWrapper (e) {
|
||||||
|
if (e.instance.props.channel && changedChannels[e.instance.props.channel.id] && this.settings.places.chatWindow) e.instance.props.channel = this.getChannelData(e.instance.props.channel.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
processThreadCreated (e) {
|
||||||
|
if (e.instance.props.message && e.instance.props.message.messageReference && e.instance.props.message.messageReference.channel_id && changedChannels[e.instance.props.message.messageReference.channel_id] && this.settings.places.chatWindow) {
|
||||||
|
let channelName = BDFDB.ObjectUtils.get(e, "returnvalue.props.children.2.props.children.0");
|
||||||
|
if (changedChannels[e.instance.props.message.messageReference.channel_id].name) channelName.props.children = [changedChannels[e.instance.props.message.messageReference.channel_id].name];
|
||||||
|
this.changeChannelColor(channelName, e.instance.props.message.messageReference.channel_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
processThreadMessageAccessories (e) {
|
||||||
|
if (e.returnvalue.props.channel && changedChannels[e.returnvalue.props.channel.id] && this.settings.places.chatWindow) {
|
||||||
|
e.returnvalue.props.channel = this.getChannelData(e.returnvalue.props.channel.id);
|
||||||
|
let type = e.returnvalue.type;
|
||||||
|
e.returnvalue.type = BDFDB.TimeUtils.suppress((...args) => {
|
||||||
|
let returnValue = type(...args);
|
||||||
|
let channelName = BDFDB.ReactUtils.findChild(returnValue, {props: [["className", BDFDB.disCN.messagesystemname]]});
|
||||||
|
this.changeChannelColor(channelName, e.instance.props.message.messageReference.channel_id);
|
||||||
|
return returnValue;
|
||||||
|
}, "", this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
processAutocompleteChannelResult (e) {
|
processAutocompleteChannelResult (e) {
|
||||||
if (e.instance.props.channel && this.settings.places.autocompletes) {
|
if (e.instance.props.channel && this.settings.places.autocompletes) {
|
||||||
if (!e.returnvalue) {
|
if (!e.returnvalue) {
|
||||||
|
|
Loading…
Reference in New Issue