diff options
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/msteams/package.json | 2 | ||||
-rw-r--r-- | recipes/msteams/webview.js | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/recipes/msteams/package.json b/recipes/msteams/package.json index 82622ff..318fc2e 100644 --- a/recipes/msteams/package.json +++ b/recipes/msteams/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "msteams", | 2 | "id": "msteams", |
3 | "name": "Microsoft Teams", | 3 | "name": "Microsoft Teams", |
4 | "version": "3.3.1", | 4 | "version": "3.3.2", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "aliases": [ | 6 | "aliases": [ |
7 | "teamsChat" | 7 | "teamsChat" |
diff --git a/recipes/msteams/webview.js b/recipes/msteams/webview.js index 92af3a4..b343196 100644 --- a/recipes/msteams/webview.js +++ b/recipes/msteams/webview.js | |||
@@ -7,9 +7,17 @@ const _path = _interopRequireDefault(require('path')); | |||
7 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | let messages = 0; | 9 | let messages = 0; |
10 | const badges = document.querySelectorAll( | 10 | |
11 | const isTeamsV2 = window.location.href.includes('/v2/'); | ||
12 | |||
13 | let badges = document.querySelectorAll( | ||
11 | '.activity-badge.dot-activity-badge .activity-badge', | 14 | '.activity-badge.dot-activity-badge .activity-badge', |
12 | ); | 15 | ); |
16 | |||
17 | if (isTeamsV2) { | ||
18 | badges = document.querySelectorAll('.fui-Badge'); | ||
19 | } | ||
20 | |||
13 | if (badges) { | 21 | if (badges) { |
14 | Array.prototype.forEach.call(badges, badge => { | 22 | Array.prototype.forEach.call(badges, badge => { |
15 | messages += Ferdium.safeParseInt(badge.textContent); | 23 | messages += Ferdium.safeParseInt(badge.textContent); |