Support urlencoded room aliases in room URL

This commit is contained in:
Emmanuel ROHEE 2014-08-18 17:40:05 +02:00
parent cebceb7b9d
commit 43772d0b15
2 changed files with 29 additions and 17 deletions

View file

@ -33,13 +33,13 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
templateUrl: 'login/login.html',
controller: 'LoginController'
}).
when('/room/:room_id', {
when('/room/:room_id_or_alias', {
templateUrl: 'room/room.html',
controller: 'RoomController'
}).
when('/room/', { // room URL with room alias in it (ex: http://127.0.0.1:8000/#/room/#public:localhost:8080) will come here.
// The reason is that 2nd hash key breaks routeProvider parameters cutting so that the URL will not match with
// the previous '/room/:room_id' URL rule
// the previous '/room/:room_id_or_alias' URL rule
templateUrl: 'room/room.html',
controller: 'RoomController'
}).