summary refs log tree commit diff
path: root/webclient/room/room-controller.js
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-08-29 14:01:30 +0100
committerDavid Baker <dbkr@matrix.org>2014-08-29 14:01:30 +0100
commite76cd252feeb7a4ab493ef595db29356ff34b98d (patch)
tree7a75b8a231ffbaaa331d34085074b00c5dd3acb2 /webclient/room/room-controller.js
parentMerge branch 'develop' of github.com:matrix-org/synapse into develop (diff)
parentOnly show voice call button if there are exactly 2 members in the room. Also ... (diff)
downloadsynapse-e76cd252feeb7a4ab493ef595db29356ff34b98d.tar.xz
Merge branch 'release-v0.1.0' into develop
Diffstat (limited to 'webclient/room/room-controller.js')
-rw-r--r--webclient/room/room-controller.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index 6232ce8ed3..09dac85d26 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -51,7 +51,7 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
             objDiv.scrollTop = objDiv.scrollHeight;
         }, 0);
     };
-    
+
     $scope.$on(eventHandlerService.MSG_EVENT, function(ngEvent, event, isLive) {
         if (isLive && event.room_id === $scope.room_id) {
             scrollToBottom();
@@ -88,6 +88,10 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
         call.onHangup = $scope.onCallHangup;
         $scope.currentCall = call;
     });
+
+    $scope.memberCount = function() {
+        return Object.keys($scope.members).length;
+    };
     
     $scope.paginateMore = function() {
         if ($scope.state.can_paginate) {