[FIX] Flextab information is not working when clicking on visitor or agent username in Omnichannel messages#16797
[FIX] Flextab information is not working when clicking on visitor or agent username in Omnichannel messages#16797renatobecker merged 6 commits intoRocketChat:developfrom ashwaniYDV:livechatUser
Conversation
|
@renatobecker Please review :) |
app/ui/client/views/app/room.js
Outdated
|
|
||
| const roomData = Session.get(`roomData${ RoomManager.openedRoom }`); | ||
| if (roomTypes.roomTypes[roomData.t].enableMembersListProfile()) { | ||
| if (roomTypes.roomTypes[roomData.t].enableMembersListProfile() || roomData.t === 'l') { |
There was a problem hiding this comment.
My suggestion is to return true on the enableMembersListProfile method of the LivechatRoomType.
app/ui/client/views/app/room.js
Outdated
| } | ||
|
|
||
| const { username } = msg.u; | ||
| const roomData = Session.get(`roomData${ RoomManager.openedRoom }`); |
There was a problem hiding this comment.
I don't think this is a better implementation of this issue.
My suggestion is to create a custom method on the roomTypes class, called by something like openCustomProfileTab. you could call this new method before this line. In the default method, you would return false and in the LivechatRoomType you would implement the method, passing the instance, roomData and username as parameters. Then, you just need to check if the username is the same as the guest username, if so you could do something we do here;
|
hi @renatobecker. I have done the requested changes |
renatobecker
left a comment
There was a problem hiding this comment.
Your implementation is good, I just left some suggestions to improve the code/logic.
Thanks.
app/livechat/lib/LivechatRoomType.js
Outdated
| } | ||
|
|
||
| openCustomProfileTab(instance, room, username) { | ||
| if (room.v.username !== username) { |
There was a problem hiding this comment.
| if (room.v.username !== username) { | |
| if (!room || !room.v || room.v.username !== username) { |
app/ui/client/views/app/room.js
Outdated
| instance.groupDetail.set(null); | ||
| instance.tabBar.setTemplate('membersList'); | ||
| instance.tabBar.open(); | ||
| if (!roomTypes.roomTypes[roomData.t].openCustomProfileTab(instance, roomData, username)) { |
There was a problem hiding this comment.
| if (!roomTypes.roomTypes[roomData.t].openCustomProfileTab(instance, roomData, username)) { | |
| if (roomTypes.roomTypes[roomData.t].openCustomProfileTab(instance, roomData, username)) { | |
| return; | |
| } |
…6537-ritwizsinha-Issue#16499 * 'develop' of github.com:RocketChat/Rocket.Chat: (173 commits) [FIX] No settings to be displayed if search not found (RocketChat#16255) [FIX] Removed some hardcoded texts (RocketChat#16304) [FIX] Cannot unfollow message from thread's panel (RocketChat#16560) Add Enterprise Edition license (RocketChat#16801) [FIX] Fallback content-type as application/octet-stream for FileSystem uploads (RocketChat#16776) [IMPROVE] Apps-engine E2E tests (RocketChat#16781) [FIX] Remove spaces from i18n placeholders to show Personal access token (RocketChat#16724) [NEW] SAML config to allow clock drift (RocketChat#16751) [FIX] Slash command preview: Wrong item being selected, Horizontal scroll (RocketChat#16750) [FIX] Cannot pin on direct messages (RocketChat#16759) [FIX] Get all channels from Slack via REST API (RocketChat#16767) LingoHub Update 🚀 (RocketChat#16837) [FIX] Flextab information is not working when clicking on visitor or agent username in Omnichannel messages (RocketChat#16797) Update Node to 12.16.1 [NEW] Update Meteor to 1.9.2 (RocketChat#16718) [FIX] Slackbridge-import command doesn't work (RocketChat#16645) Fix omnichannel icon missing on sidebar (RocketChat#16775) [IMPROVE] Rename client-side term "Livechat" to "Omnichannel" (RocketChat#16752) [FIX] Language country has been ignored on translation load (RocketChat#16757) [FIX] Cannot edit Profile when Full Name is empty and not required (RocketChat#16744) ...
…exact_search * 'develop' of github.com:RocketChat/Rocket.Chat: (178 commits) [IMPROVE] Add option to require authentication on user's shield endpoint (#16845) [FIX] Custom OAuth Bug (#16811) [FIX] Integrations page pagination (#16838) fix: livechat/facebook missing visitor data after registerGuest (#16810) [FIX] Invite links counting users already joined (#16591) [FIX] No settings to be displayed if search not found (#16255) [FIX] Removed some hardcoded texts (#16304) [FIX] Cannot unfollow message from thread's panel (#16560) Add Enterprise Edition license (#16801) [FIX] Fallback content-type as application/octet-stream for FileSystem uploads (#16776) [IMPROVE] Apps-engine E2E tests (#16781) [FIX] Remove spaces from i18n placeholders to show Personal access token (#16724) [NEW] SAML config to allow clock drift (#16751) [FIX] Slash command preview: Wrong item being selected, Horizontal scroll (#16750) [FIX] Cannot pin on direct messages (#16759) [FIX] Get all channels from Slack via REST API (#16767) LingoHub Update 🚀 (#16837) [FIX] Flextab information is not working when clicking on visitor or agent username in Omnichannel messages (#16797) Update Node to 12.16.1 [NEW] Update Meteor to 1.9.2 (#16718) ...
Closes #16795
After changes: