summary refs log tree commit diff
path: root/webclient/home/home-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'webclient/home/home-controller.js')
-rw-r--r--webclient/home/home-controller.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/webclient/home/home-controller.js b/webclient/home/home-controller.js
index 85e8990c29..e35219bebb 100644
--- a/webclient/home/home-controller.js
+++ b/webclient/home/home-controller.js
@@ -53,6 +53,8 @@ angular.module('HomeController', ['matrixService', 'eventHandlerService', 'Recen
 
                     // Add room_alias & room_display_name members
                     angular.extend(room, matrixService.getRoomAliasAndDisplayName(room));
+                    
+                    eventHandlerService.setRoomVisibility(room.room_id, "public");
                 }
             }
         );
@@ -117,6 +119,10 @@ angular.module('HomeController', ['matrixService', 'eventHandlerService', 'Recen
         matrixService.getDisplayName($scope.config.user_id).then(
             function(response) {
                 $scope.profile.displayName = response.data.displayname;
+                var config = matrixService.config();
+                config.display_name = response.data.displayname;
+                matrixService.setConfig(config);
+                matrixService.saveConfig();
             },
             function(error) {
                 $scope.feedback = "Can't load display name";
@@ -142,4 +148,9 @@ angular.module('HomeController', ['matrixService', 'eventHandlerService', 'Recen
 
         refresh();
     };
+
+    // Clean data when user logs out
+    $scope.$on(eventHandlerService.RESET_EVENT, function() {
+        $scope.public_rooms = [];
+    });
 }]);