stuff
This commit is contained in:
parent
4117669080
commit
7c11d449bb
|
@ -2009,17 +2009,14 @@
|
|||
let MessagesIns = BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.app), {name:"Messages", unlimited:true});
|
||||
let MessagesPrototype = BDFDB.ReactUtils.getValue(MessagesIns, "_reactInternalFiber.type.prototype");
|
||||
if (MessagesIns && MessagesPrototype) {
|
||||
let patchCancel = BDFDB.ModuleUtils.patch({name:"tempPatch"}, MessagesPrototype, "render", {after:e => {
|
||||
let patchCancel = BDFDB.ModuleUtils.patch({name:"tempPatch"}, MessagesPrototype, "render", {after: e => {
|
||||
patchCancel();
|
||||
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnValue, {props: ["message", "channel"]});
|
||||
if (index > -1) {
|
||||
for (let i in children) children[i].props.message = new BDFDB.DiscordObjects.Message({author: new BDFDB.DiscordObjects.User({})});
|
||||
BDFDB.ReactUtils.forceUpdate(e.thisObject);
|
||||
}
|
||||
if (index > -1) for (let ele of children) if (ele.props.message) ele.props.message = new BDFDB.DiscordObjects.Message(ele.props.message);
|
||||
}});
|
||||
BDFDB.ReactUtils.forceUpdate(MessagesIns);
|
||||
}
|
||||
}, 3000);
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
BDFDB.UserUtils = {};
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue