regression: Livechat rooms not opening (#28957)

* fix: Livechat rooms not opening

* Declare livechat room links with room info tab open by default

---------

Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
pull/28974/head^2
Aleksander Nicacio da Silva 3 years ago committed by GitHub
parent 7ad03d93ac
commit 40dd9fe1c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      apps/meteor/client/views/room/components/body/RoomBody.tsx
  2. 2
      apps/meteor/lib/rooms/roomTypes/livechat.ts

@ -1,5 +1,5 @@
import type { IMessage, IUser } from '@rocket.chat/core-typings';
import { isEditedMessage, isOmnichannelRoom } from '@rocket.chat/core-typings';
import { isEditedMessage } from '@rocket.chat/core-typings';
import {
useCurrentRoute,
usePermission,
@ -262,17 +262,6 @@ const RoomBody = (): ReactElement => {
const tabBarRef = useRef(toolbox);
tabBarRef.current = toolbox;
useEffect(() => {
const room = roomRef.current;
const tabBar = tabBarRef.current;
Tracker.afterFlush(() => {
// Find a better way to do this, declaratively
if (room && isOmnichannelRoom(room) && tabBar.activeTabBar?.id !== 'room-info') {
tabBar.openRoomInfo();
}
});
}, [room._id]);
const debouncedReadMessageRead = useMemo(
() =>
withDebouncing({ wait: 500 })(() => {

@ -8,7 +8,7 @@ export function getLivechatRoomType(_coordinator: RoomCoordinator): IRoomTypeCon
name: 'live',
path: '/live/:id/:tab?/:context?',
link({ rid }): Record<string, string> {
return { id: rid || '' };
return { id: rid || '', tab: 'room-info' };
},
},
};

Loading…
Cancel
Save