summary refs log tree commit diff
path: root/webclient/app-controller.js
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-18 11:14:57 +0100
committerErik Johnston <erik@matrix.org>2014-08-18 11:14:57 +0100
commit1c2caacd67d5c00fe96c302749e30da3dc4a213f (patch)
tree4ce4c26aeef0ef31471ce238cbae91e7225bccb1 /webclient/app-controller.js
parentChange the MemoryDataStore to implement new storage api (diff)
parentwebclient: Tweak namespace of auto-complete directive. ng- should really only... (diff)
downloadsynapse-1c2caacd67d5c00fe96c302749e30da3dc4a213f.tar.xz
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Diffstat (limited to 'webclient/app-controller.js')
-rw-r--r--webclient/app-controller.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/webclient/app-controller.js b/webclient/app-controller.js
index 7fa87e30c1..96656e12c3 100644
--- a/webclient/app-controller.js
+++ b/webclient/app-controller.js
@@ -45,8 +45,14 @@ angular.module('MatrixWebClientController', ['matrixService'])
             $scope.config = matrixService.config();        
         }
     };
+    
+    $scope.closeConfig = function() {
+        if ($scope.config) {
+            $scope.config = undefined;
+        }
+    };
 
-    if (matrixService.config()) {
+    if (matrixService.isUserLoggedIn()) {
         eventStreamService.resume();
     }
     
@@ -69,6 +75,15 @@ angular.module('MatrixWebClientController', ['matrixService'])
         console.log("Invalid access token -> log user out");
         $scope.logout();
     });
+    
+    $scope.requestNotifications = function() {
+        if (window.Notification) {
+            console.log("Notification.permission: " + window.Notification.permission);
+            window.Notification.requestPermission(function(){});
+        }
+    };
+    
+    
 }]);