From 990ee0fb068e0609701ca13afe3b356ac2ed862c Mon Sep 17 00:00:00 2001 From: Vulich Fernando <46904390+fvulich@users.noreply.github.com> Date: Fri, 7 May 2021 10:59:06 -0300 Subject: [PATCH] Update unreadCode: Mattermost & GoogleChat fixes https://github.com/ramboxapp/community-edition/issues/3009 --- api/services.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/services.json b/api/services.json index 170ef1ee..c2b8cc97 100644 --- a/api/services.json +++ b/api/services.json @@ -503,7 +503,7 @@ "type": "messaging", "allow_popups": false, "manual_notifications": false, - "js_unread": "function checkUnread(){updateBadge(document.querySelectorAll(\".SSPGKf.EyyDtb.Q6oXP:not(.oCHqfe) .PIw6Oe.EdWvwd.FVKzAb .SaMfhe.m9MHid\").length)}function updateBadge(a){1<=a?rambox.setUnreadCount(a):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);", + "js_unread": "function checkUnread(){if(document.querySelectorAll(\".akt .XU\").length>0){let e=0;document.querySelectorAll(\".akt .XU\").forEach(t=>e+=t.innerText&&parseInt(t.innerText)),updateBadge(e)}else updateBadge(document.querySelectorAll(\".SSPGKf.EyyDtb.Q6oXP:not(.oCHqfe) .PIw6Oe.EdWvwd.FVKzAb .SaMfhe.m9MHid\").length||0)}function updateBadge(e){1<=e?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);", "userAgent": "", "note": "", "titleBlink": true, @@ -818,7 +818,7 @@ "type": "messaging", "allow_popups": false, "manual_notifications": false, - "js_unread": "function checkUnread(){var e=document.querySelectorAll(\".has-badge\"),t=document.querySelectorAll(\".unread-title\").length,a=0;e.forEach(e=>{a+=parseInt(e.querySelector(\".badge\").innerText)}),updateBadge(t,a)}function updateBadge(e,t){var a=0{\"unreadMentions\"===e.id&&(t+=parseInt(e.innerText))}),updateBadge(n,t)}function updateBadge(e,n){var t=0