Skip to content

Fix room search redirecting to non-joined rooms (Vue left-menu)

Eric Eastwood requested to merge 2172-room-search-for-non-joined-rooms into develop

Fix room search redirecting to non-joined rooms (Vue left-menu)

Fix https://gitlab.com/gitlab-org/gitter/webapp/issues/2172

Testing strategy

  1. Add the feature toggle, node ./scripts/utils/feature-toggle.js --name vue-left-menu --description "Left menu using Vue (alpha)"
  2. Enable the feature toggle
  3. Search for a room you haven't joined
  4. 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

Merge request reports