1
0
mirror of https://github.com/chylex/Discord-History-Tracker.git synced 2025-04-10 17:15:43 +02:00

Fix not seeing messages after a Discord update

Closes 
This commit is contained in:
chylex 2022-06-18 13:54:31 +02:00
parent 845ac1b0fa
commit b9a5664740
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548

View File

@ -91,11 +91,13 @@ class DISCORD {
static getMessageElementProps(ele) {
const props = DOM.getReactProps(ele);
if (props.children && props.children.length >= 4) {
const childProps = props.children[3].props;
if ("message" in childProps && "channel" in childProps) {
return childProps;
if (props.children && props.children.length) {
for (let i = 3; i < props.children.length; i++) {
const childProps = props.children[i].props;
if (childProps && "message" in childProps && "channel" in childProps) {
return childProps;
}
}
}