Regression: Livechat rooms not opening due to route desync (#26209)

pull/26253/head
Aleksander Nicacio da Silva 4 years ago committed by GitHub
parent 3add5ea395
commit 3a165bc6eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      apps/meteor/client/lib/rooms/roomTypes/livechat.ts

@ -37,7 +37,15 @@ roomCoordinator.add(LivechatRoomType, {
return false;
}
instance.tabBar.openUserInfo();
/* @TODO Due to route information only updating on `Tracker.afterFlush`,
we found out that calling the tabBar.openUserInfo() method at this point will cause a route change
to the previous route instead of the current one, preventing livechat rooms from being opened.
As a provisory solution, we're delaying the opening of the contextual bar,
which then ensures that the route info is up to date. Although this solution works,
we need to find a more reliable way of ensuring consistent route changes with up-to-date information.
*/
setTimeout(() => instance.tabBar.openUserInfo(), 0);
return true;
},

Loading…
Cancel
Save