summary refs log tree commit diff
path: root/webclient/rooms/rooms-controller.js
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-22 11:43:54 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-22 11:44:09 +0200
commitdde50d4245136cdbd11ac3b4af42102945cd14f9 (patch)
treebdf0f420429116b2ca23aa2072e012ea51270bad /webclient/rooms/rooms-controller.js
parentMake the content repo work with in daemon mode. Return the full url on upload... (diff)
downloadsynapse-dde50d4245136cdbd11ac3b4af42102945cd14f9.tar.xz
Use $location.url instead of $location.path to get clean page URL without hash arguments of the previous page.
This happpens with room URL like http://127.0.0.1:8080/matrix/client/#/room/#public:localhost. The second hash part is transferred to the next page when using $location.path.
Diffstat (limited to 'webclient/rooms/rooms-controller.js')
-rw-r--r--webclient/rooms/rooms-controller.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/webclient/rooms/rooms-controller.js b/webclient/rooms/rooms-controller.js
index c2d7bcb6f3..557fbe2378 100644
--- a/webclient/rooms/rooms-controller.js
+++ b/webclient/rooms/rooms-controller.js
@@ -141,17 +141,17 @@ angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload',
     // Go to a room
     $scope.goToRoom = function(room_id) {
         // Simply open the room page on this room id
-        //$location.path("room/" + room_id);
+        //$location.url("room/" + room_id);
         matrixService.join(room_id).then(
             function(response) {
                 if (response.data.hasOwnProperty("room_id")) {
                     if (response.data.room_id != room_id) {
-                        $location.path("room/" + response.data.room_id);
+                        $location.url("room/" + response.data.room_id);
                         return;
                      }
                 }
 
-                $location.path("room/" + room_id);
+                $location.url("room/" + room_id);
             },
             function(error) {
                 $scope.feedback = "Can't join room: " + error.data;
@@ -163,7 +163,7 @@ angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload',
         matrixService.joinAlias(room_alias).then(
             function(response) {
                 // Go to this room
-                $location.path("room/" + room_alias);
+                $location.url("room/" + room_alias);
             },
             function(error) {
                 $scope.feedback = "Can't join room: " + error.data;