diff --git a/js/main.js b/js/main.js index d2bed581..30182fb9 100644 --- a/js/main.js +++ b/js/main.js @@ -331,7 +331,7 @@ Core.prototype.initObserver = function () { voiceMode.obsCallback(); if (typeof pluginModule !== "undefined") pluginModule.channelSwitch(); } - if (mutation.addedNodes.length && mutation.addedNodes[0] instanceof Element && mutation.addedNodes[0].classList.contains("message") && !mutation.addedNodes[0].classList.contains("message-sending")) { + if (mutation.addedNodes.length && mutation.addedNodes[0] instanceof Element && ((mutation.addedNodes[0].classList.contains("message-group") && !mutation.addedNodes[0].querySelector(".message-sending")) || (mutation.addedNodes[0].classList.contains("message") && !mutation.addedNodes[0].classList.contains("message-sending")))) { console.log("onMessage"); if (typeof pluginModule !== "undefined") pluginModule.newMessage(); }