ResultadosDigitais / matrix

#matrix is the online open-source workplace inspired in sococo.com for distributed teams to have the experience of work together each day, side-by-side. No matter where team members might be. Working in an online workplace is even more productive when people are feeling in the same space.
MIT License
901 stars 238 forks source link

Entering an external meeting without leaving the previous one makes you leave both when one is closed. #338

Closed phiter closed 4 years ago

phiter commented 4 years ago

Subject of the issue

When entering an external meeting, the app opens a new tab and tracks its open/closed state. If you enter another external meeting without closing the first meeting, you'll move to another room and get the pink headphone thing, but then if you leave the first meeting, you lose the headphone.

Steps to reproduce

  1. Join a room with an external meeting
  2. Join another room with external meeting, without closing the first meeting tab
  3. Exit the first meeting tab

Expected behaviour

You should keep the headphone in your user picture in the office page.

Actual behaviour

The headphone disappears, meaning you're no longer in a meeting

Possible Solution

The app tracks the external meeting tab when the user enters a meeting, and it also tracks the second tab. What I believe is happening is that the tracker doesn't check if the meeting the user is currently in is the same as the tab being closed.

My suggestion would be to remove the interval tracker for the first meeting once the user joins another one.

These are the relevant lines:

https://github.com/ResultadosDigitais/matrix/blob/8d4c8b64c7b2a21faad37f98f56e6dce5977ddfb/frontend/src/morpheus/containers/OfficePage.js#L17-L24