summary refs log tree commit diff
path: root/webclient/room/room-controller.js
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-09-03 15:14:13 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-09-03 15:20:09 +0200
commit932f35a7f0bb37c6f2279634f74dc6eb8d81b3af (patch)
treed5e861b7b3052f47a214561457c1b53c45fa732a /webclient/room/room-controller.js
parentStore SQL DDL deltas as well; attempt to upgrade the database on startup if i... (diff)
downloadsynapse-932f35a7f0bb37c6f2279634f74dc6eb8d81b3af.tar.xz
Added /deop $user_id
Diffstat (limited to '')
-rw-r--r--webclient/room/room-controller.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index d96241b863..ab8b35961c 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -299,13 +299,21 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
                     break;
                     
                 case "/op":
+                    // Define the power level of an user
                     if (3 === args.length) {
                         var user_id = args[1];
                         var powerLevel = parseInt(args[2]);
-
                         promise = matrixService.setUserPowerLevel($scope.room_id, user_id, powerLevel);
                     }
                     break;
+                    
+                case "/deop":
+                    // Reset the power level of an user
+                    if (2 === args.length) {
+                        var user_id = args[1];
+                        promise = matrixService.resetUserPowerLevel($scope.room_id, user_id);
+                    }
+                    break;
             }
         }
         else {