changes for onMessage

This commit is contained in:
Zack Rauen 2017-10-30 03:46:13 -04:00
parent e42e2e57d2
commit eeccf6b02b
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}