Skip to content

Commit

Permalink
fix: adapt to upstream react changes for idle tracking (#1243)
Browse files Browse the repository at this point in the history
* fix: adapt to upstream react changes for idle tracking

It seems like the Teams developers changed some of the internal
structure of how to access the core services components.  This commit
makes accessing the core services more robust by trying out different
attribute paths.

* chore: bump version to 1.4.35
  • Loading branch information
bastidest authored May 3, 2024
1 parent 077a681 commit 72922c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/browser/tools/reactHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class ReactHandler {

_getTeams2CoreServices() {
const reactElement = this._getTeams2ReactElement();
return reactElement?._reactRootContainer?._internalRoot?.current?.updateQueue?.baseState?.element?.props?.coreServices;
const internalRoot = reactElement?._reactRootContainer?._internalRoot || reactElement?._reactRootContainer;
return internalRoot?.current?.updateQueue?.baseState?.element?.props?.coreServices;
}
}

Expand Down
7 changes: 7 additions & 0 deletions com.github.IsmaelMartinez.teams_for_linux.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
<url type="bugtracker">https://github.com/IsmaelMartinez/teams-for-linux/issues</url>
<launchable type="desktop-id">com.github.IsmaelMartinez.teams_for_linux.desktop</launchable>
<releases>
<release version="1.4.35" date="2024-05-03">
<description>
<ul>
<li>Fix for away status detection (idle tracking)</li>
</ul>
</description>
</release>
<release version="1.4.34" date="2024-05-01">
<description>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "teams-for-linux",
"version": "1.4.34",
"version": "1.4.35",
"main": "app/index.js",
"description": "Unofficial client for Microsoft Teams for Linux",
"homepage": "https://github.com/IsmaelMartinez/teams-for-linux",
Expand Down

0 comments on commit 72922c7

Please sign in to comment.