1 files changed, 12 insertions, 0 deletions
diff --git a/webclient/app-controller.js b/webclient/app-controller.js
index 775113bc87..77a7ad03a5 100644
--- a/webclient/app-controller.js
+++ b/webclient/app-controller.js
@@ -37,6 +37,8 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
mPresence.start();
}
+ $scope.user_id = matrixService.config().user_id;
+
/**
* Open a given page.
* @param {String} url url of the page
@@ -45,6 +47,16 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
$location.url(url);
};
+ // Open the given user profile page
+ $scope.goToUserPage = function(user_id) {
+ if (user_id === $scope.user_id) {
+ $location.url("/settings");
+ }
+ else {
+ $location.url("/user/" + user_id);
+ }
+ };
+
// Logs the user out
$scope.logout = function() {
|