teams-for-linux icon indicating copy to clipboard operation
teams-for-linux copied to clipboard

Feature request: Automatic office/home location

Open gerardcanal opened this issue 1 year ago • 12 comments

Is your feature request related to a problem? Please describe. I recently discovered a setting under the user options (when clicking on my avatar in the top-right) to specify whether I am working remotely or in the office. Given the flexible working arrangements, this may be quite useful to know if colleagues are in, and to let them know if I am, but the setting is manual (it resets daily), and it is easy to forget to set it up.

image

Describe the solution you'd like I do have an office computer and a home one, so potentially a launch or configuration setting that would set this up automatically would be great (i.e., my office computer always sets it as "in the office"). Alternatively, this could also be defined by IP (i.e., my institution has a static IP range, so it should be easy to check whether I am in the office or somewhere else and set this automatically), which might be more flexible.

Describe alternatives you've considered Alternatively, some kind of popup when the setting is not yet set and teams are started for the first time or something could be useful to remember to set this (ideally enabled through a config?).

gerardcanal avatar Mar 28 '24 12:03 gerardcanal

(Not the dev/author.) What should happen when both computers are active at the same time? I recognize that may be highly unlikely for you, but others that may like this feature will need unambiguous logic for the "simultaneous" situation.

r2evans avatar Mar 28 '24 13:03 r2evans

That's a fair point. I would expect that if this is something that is set at teams launch, if another computer launches later it will just change the current location, but it wouldn't be much of a problem I presume (rather than a potentially inconsistent setting?).

gerardcanal avatar Mar 28 '24 13:03 gerardcanal

Yes, "inconsistent" being a key word there. The current operation for "location" is for the user to be explicit with it. While I see convenience/utility in your suggestion, I also see being frustrated if I forget, or if my spouse/child turns on my home laptop, and me not noticing that my "location" was silently updated to "Remote" even though my assumption is that since I'm on the "Office" computer then it should be that. For many, this is a plausible situation where there are three clear strategies: (1) disable automatic location; (2) modal popup that says "I noticed you are on a computer normally set as "Office", would you like me to change it?"; and (3) keep it automatically, and in a paranoid fashion check every now and then to see if the location had been inadvertently changed. Or perhaps (4) when location is changed in an instance of Teams not "this one", then notify the local user.

To me, number 4 seems the least intrusive and most transparent, but I don't know how far the devs on this "viewport" into MS Teams" is able and willing to do. Much of this is reliant on Teams itself, on on the PWA shell.

r2evans avatar Mar 28 '24 13:03 r2evans

FYI: If you got standard home/office days, you can set your location in outlook. https://outlook.office.com/calendar/view/workweek

That has been enough for me, otherwise I would ask in MS land if they can implement this feature... as we will be busy fixing what MS is changing on the angular to react move.

IsmaelMartinez avatar Mar 28 '24 14:03 IsmaelMartinez

@r2evans yeah I see the issue, though alternatively, I could see this as an advantage too (i.e., you work in the office in the morning but login from home in the afternoon). Another solution would be to set it on the one where messages are being set from, but this may be an overkill.

@IsmaelMartinez Thanks for the link, I was aware I could set office hours but not the location! I am not always on the same days though, so this may be even more inconsistent than the automatic setting. I know this would be quite low-priority (given all the buzz with the new teams), but may be something that can be done down the road.

Another idea I had that may be useful for this too is maybe be able to define some js code that runs on startup? I would be happy to write something that just clicks on the different menus once teams has loaded, could add some flexibility to do other custom-made settings too (alternatively, is there somewhere I could put some of js code myself that runs once everything is loaded? I have not done web dev for a while (nor used react/angular) but a small script that does this I could do!

gerardcanal avatar Mar 28 '24 15:03 gerardcanal

Some people do this with external scripts, however it's not easy to get the API token from outside the app, there seems to be ways on windows powershell (apparently using Get-AADIntAccessTokenForTeams from AADInternals ).

The other way seems to be by using Power Automate to process the request and send to the API endpoint (probably with the right credentials then).

It would indeed probably be easier directly from the app, but I'm not sure how it could be done (calling an external shell script? a JS callback as suggested?)

Zenkibou avatar May 13 '24 16:05 Zenkibou

Adding the option to call an external script is always there, but I don't know if it would be better the opposite (to call the app from a script). Then deciding where you are (office / Home ) is up to you. You might be able to hook it to your network manager daemon so that it detects what network you are in. Then a simple mapping can then send a command to the app to change the status.

I don't know where this is now in teams-v2, but I would suggest to look into how to change that setting there, instead of teams-v1 (as that one would be deprecated soon(ish).

IsmaelMartinez avatar Jun 11 '24 05:06 IsmaelMartinez

That would work too, something to automate clicks on teams in a more general way could be quite useful too for other things I guess (would have to think for use cases, but I'm sure there are more).

I am in v2, the option is at the top right corner, clicking on the avatar (or initials), and there's a "set work location". It should be easy to automate some js that activates it, but I'd need some way to call it from outside I guess.

gerardcanal avatar Jun 11 '24 10:06 gerardcanal

Automatic clicks is not reliable in my experience. Best to update the options in the settings, as we do with others

On Tue, 11 Jun 2024, 11:00 Gerard Canal, @.***> wrote:

That would work too, something to automate clicks on teams in a more general way could be quite useful too for other things I guess (would have to think for use cases, but I'm sure there are more).

I am in v2, the option is at the top right corner, clicking on the avatar (or initials), and there's a "set work location". It should be easy to automate some js that activates it, but I'd need some way to call it from outside I guess.

— Reply to this email directly, view it on GitHub https://github.com/IsmaelMartinez/teams-for-linux/issues/1161#issuecomment-2160331575, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJHEBEWDI7KENUOIUJBV3ZG3DE7AVCNFSM6AAAAABFMXRE3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRQGMZTCNJXGU . You are receiving this because you were mentioned.Message ID: @.***>

IsmaelMartinez avatar Jun 11 '24 10:06 IsmaelMartinez

That makes sense, not sure how you handle the settings for these kinds of things but happy to look at it if you can point to an example and try to see if I can replicate something.

gerardcanal avatar Jun 11 '24 10:06 gerardcanal

I am curious how the geo location of the device is fetched? I have searched for keywords like "location", "geo" and it did not give me useful infos..

sdajklfw389 avatar Jun 13 '24 10:06 sdajklfw389

Geolocation is something rarely available on computers. You got it on Mobiles and is fairly accurate (3 meters offset), but not on your normal laptop.

This link gives you a wee bit of an explanation on how to get your "location" but that will be greatly inaccurate in many cases. For example, I am in Edinburgh and I get London on those tests sometimes (over 500km distance). As that is the location of the server you are connecting to Internet.

A far simpler solution would be to run a script that just tells you the wifi name you are connected (or even is available) and then you determine that location depending on it. Or another characteristic of your network (like IP address range, etc).

IsmaelMartinez avatar Jun 14 '24 08:06 IsmaelMartinez

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 16 '24 09:10 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Oct 21 '24 09:10 github-actions[bot]