diff --git a/client/views/omnichannel/directory/chats/contextualBar/VisitorClientInfo.js b/client/views/omnichannel/directory/chats/contextualBar/VisitorClientInfo.js index 42f909ce93681..c0eeae4030b42 100644 --- a/client/views/omnichannel/directory/chats/contextualBar/VisitorClientInfo.js +++ b/client/views/omnichannel/directory/chats/contextualBar/VisitorClientInfo.js @@ -20,15 +20,17 @@ const VisitorClientInfo = ({ uid }) => { return ; } - if (error || !userData || !userData.userAgent) { + if (error || !userData || !userData.visitor.userAgent) { return null; } const clientData = {}; const ua = new UAParser(); - ua.setUA(userData.userAgent); + ua.setUA(userData.visitor.userAgent); clientData.os = `${ua.getOS().name} ${ua.getOS().version}`; clientData.browser = `${ua.getBrowser().name} ${ua.getBrowser().version}`; + clientData.host = userData.visitor.host; + clientData.ip = userData.visitor.ip; return ( <> @@ -44,6 +46,18 @@ const VisitorClientInfo = ({ uid }) => { {clientData.browser} )} + {clientData.host && ( + + + {clientData.host} + + )} + {clientData.ip && ( + + + {clientData.ip} + + )} ); }; diff --git a/packages/rocketchat-i18n/i18n/en.i18n.json b/packages/rocketchat-i18n/i18n/en.i18n.json index 51200dc9b2642..9994c1ef53fcc 100644 --- a/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/packages/rocketchat-i18n/i18n/en.i18n.json @@ -2241,6 +2241,7 @@ "Invite_user_to_join_channel_all_from": "Invite all users from [#channel] to join this channel", "Invite_user_to_join_channel_all_to": "Invite all users from this channel to join [#channel]", "Invite_Users": "Invite Users", + "IP": "IP", "IRC_Channel_Join": "Output of the JOIN command.", "IRC_Channel_Leave": "Output of the PART command.", "IRC_Channel_Users": "Output of the NAMES command.", @@ -4576,4 +4577,4 @@ "Your_temporary_password_is_password": "Your temporary password is [password].", "Your_TOTP_has_been_reset": "Your Two Factor TOTP has been reset.", "Your_workspace_is_ready": "Your workspace is ready to use 🎉" -} \ No newline at end of file +}