Skip to content
Snippets Groups Projects
  1. Mar 30, 2022
  2. Mar 29, 2022
  3. Mar 28, 2022
  4. Mar 25, 2022
  5. Mar 24, 2022
  6. Mar 23, 2022
  7. Mar 22, 2022
  8. Mar 21, 2022
    • Diego Sampaio's avatar
      Bump version to 4.5.3 · 38a85e0a
      Diego Sampaio authored
      38a85e0a
    • Guilherme Gazzo's avatar
      d7c8b530
    • Diego Sampaio's avatar
    • Kevin Aleman's avatar
    • Kevin Aleman's avatar
    • Tiago Evangelista Pinto's avatar
    • Kevin Aleman's avatar
      [IMPROVE] Standarize queue behavior for managers and agents when subscribing (#24837) · 129b09dd
      Kevin Aleman authored
      * Standarize queue behavior for managers and agents when subscribing to department/public queues
      
      * Fix import
      
      * Remove task from comment
      129b09dd
    • Kevin Aleman's avatar
    • Kevin Aleman's avatar
    • amolghode1981's avatar
      [FIX] VoIP button gets disabled whenever user status changes (#24789) · 6d545faf
      amolghode1981 authored
      * Clickup task : https://app.clickup.com/t/25jwe53
      Description : Whenever the user state is changed (Explicitly or automatically by the virtue of user's inactivity)
      Voip component gets reloaded. Also during the reload of the page, the Voip component gets initialised multiple times, causing
      multiple websockets opened to asterisk.
      This happens because of the following facts:
      1. The useEffect of useVoipClient, which creates the Voip component had user in its dependency list.
      2. Whenever any user property changes, it would cause the useEffect to trigger and execute the entire initialisation of
      voip component.
      3. When state change happens, it triggers update on all the components. So OmnichannelCallToggleReady gets re-rendered, also useVoipClient causes reinitialisation (user state change).
      4. Now, when the useEffect of OmnichannelCallToggleReady gets executed, voipClient.getRegistrarState(); value is not |registered| because the state change has caused reinitialisation
      of voip component, which is not registered.
      5. So again, the phone button value gets reset, the agent becomes unavailable.
      
      Fix:
      Even though the user state may change, user identity does not change. SIP client reinitialisation should happen only when userId changes.
      So the fix is not to add the entire userObject in the dependency list of the useEffect of useVoipClient hook. Instead
      1. Create a state userId.
      2. Add another useEffect watching the user. Whenever user becomes available or any user change happens, update the userId
      3. The useEffect which does the voip client initialisation, should have the userId in the dependency list.
      
      When this is done, the Voip initialisation will happen only when userId changes.
      
      * Clickup task : https://app.clickup.com/t/25jwe53
      Description : Realised that we have useUserId hook. As we have this hook, removed the useEffect which
      fetches the userId from user. Also removed the state. Instead added a constant userId.
      
      * Clickup Tasks: https://app.clickup.com/t/25jwe53 and https://app.clickup.com/t/22xdyn5
      Description :
      Though this workspace was fix the first issue, it was realised that there are few other issues
      which are dependent on this(Not all may have a clickup task associated).
      This commit also fixes following :
      1. Voip button does not get disabled when the user state changes. This happens because the user gets updated whenever the state change happens, this causes useVoipClient to reload
      this reload causes the reinitialsation of voipUser which initialises the connection again.
      2. PR https://github.com/RocketChat/Rocket.Chat/pull/24752 : This PR fixes the icon display only when the extension associated with the user. This is also fixed as this was broken due to fix for #1. (THis was using user object, and we are now not using the user object directly in the useEffect for voipClient initialisation.
      3. This fix broke the fact that whenever user gets associated with the agent, voip button gets active. But because we removed the use of user, This was broken too. This got fixed by the virtue of fixing #2, i.e using extension as a state.
      4. Even though the association is deleted, agent was still receiving the call. This was because the SIP user was never unregistered and cleared when the association gets deleted. Fixed this issue by calling voipClient.stop() method. This would take care of unregistering if the UA is registered and then closing the webSocket.
      6d545faf
Loading