diff --git a/recipes/msteams/package.json b/recipes/msteams/package.json index 82622ff0d..318fc2e56 100644 --- a/recipes/msteams/package.json +++ b/recipes/msteams/package.json @@ -1,7 +1,7 @@ { "id": "msteams", "name": "Microsoft Teams", - "version": "3.3.1", + "version": "3.3.2", "license": "MIT", "aliases": [ "teamsChat" diff --git a/recipes/msteams/webview.js b/recipes/msteams/webview.js index 92af3a4b9..b343196fd 100644 --- a/recipes/msteams/webview.js +++ b/recipes/msteams/webview.js @@ -7,9 +7,17 @@ const _path = _interopRequireDefault(require('path')); module.exports = Ferdium => { const getMessages = () => { let messages = 0; - const badges = document.querySelectorAll( + + const isTeamsV2 = window.location.href.includes('/v2/'); + + let badges = document.querySelectorAll( '.activity-badge.dot-activity-badge .activity-badge', ); + + if (isTeamsV2) { + badges = document.querySelectorAll('.fui-Badge'); + } + if (badges) { Array.prototype.forEach.call(badges, badge => { messages += Ferdium.safeParseInt(badge.textContent);