Fix room search redirecting to non-joined rooms (Vue left-menu)
Fix room search redirecting to non-joined rooms (Vue left-menu)
Fix https://gitlab.com/gitlab-org/gitter/webapp/issues/2172
Testing strategy
- Add the feature toggle,
node ./scripts/utils/feature-toggle.js --name vue-left-menu --description "Left menu using Vue (alpha)"
- Enable the feature toggle
- Search for a room you haven't joined
- Click the room result and notice the redirect to the room (you should see the "join room" button at the bottom)
Mock search locally in dev
Replace the id
, name
, uri
, url
, etc for a room in your instance
server/api/v1/rooms/index.js
-> searchRooms
return {
results: [
{
id: '5d0c2674c350e0f4fce3fa47',
name: 'you-probably-no-join/no-join-room3',
topic: '',
avatarUrl: 'http://localhost:5000/api/private/avatars/group/i/5d0c2664c350e0f4fce3fa3d',
uri: 'you-probably-no-join/no-join-room3',
oneToOne: false,
userCount: 1,
unreadItems: 0,
mentions: 0,
lurk: false,
url: '/you-probably-no-join/no-join-room3',
githubType: 'REPO_CHANNEL',
security: 'PUBLIC',
roomMember: true,
groupId: '5d0c2664c350e0f4fce3fa3d',
public: true
}
]
};
Edited by Eric Eastwood