diff --git a/app/livechat/client/tabBar.ts b/app/livechat/client/tabBar.ts index 46bed7cfbdd..ad5c7a09922 100644 --- a/app/livechat/client/tabBar.ts +++ b/app/livechat/client/tabBar.ts @@ -10,3 +10,12 @@ addAction('room-info', { template: lazy(() => import('../../../client/omnichannel/directory/chats/contextualBar')), order: 0, }); + +addAction('contact-chat-history', { + groups: ['live'], + id: 'contact-chat-history', + title: 'Contact_Chat_History', + icon: 'clock', + template: 'contactChatHistory', + order: 11, +}); diff --git a/app/ui/client/views/app/room.js b/app/ui/client/views/app/room.js index 87614468e85..ac3b8616624 100644 --- a/app/ui/client/views/app/room.js +++ b/app/ui/client/views/app/room.js @@ -890,7 +890,7 @@ Meteor.startup(() => { let room = Rooms.findOne({ _id: rid }, { fields: { t: 1 } }); - if (room?.t === 'l') { + if (room?.t === 'l' && !FlowRouter.getParam('tab')) { room = Tracker.nonreactive(() => Rooms.findOne({ _id: rid })); roomTypes.getConfig(room.t).openCustomProfileTab(this, room, room.v.username); } diff --git a/client/omnichannel/directory/contacts/contextualBar/ContactInfo.js b/client/omnichannel/directory/contacts/contextualBar/ContactInfo.js index 27b39e4789a..0da5b88bb16 100644 --- a/client/omnichannel/directory/contacts/contextualBar/ContactInfo.js +++ b/client/omnichannel/directory/contacts/contextualBar/ContactInfo.js @@ -87,6 +87,8 @@ export function ContactInfo({ id }) { FlowRouter.go(`/live/${ _id }/contact-chat-history`); }; + const showContactHistory = FlowRouter.getRouteName() === 'live'; + const displayName = name || username; return <> @@ -130,7 +132,7 @@ export function ContactInfo({ id }) { - { lastChat && } + { showContactHistory && lastChat && }