diff options
Diffstat (limited to 'webclient/room')
-rw-r--r-- | webclient/room/room-controller.js | 7 | ||||
-rw-r--r-- | webclient/room/room.html | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index fe3821eb45..da77864017 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -694,12 +694,13 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput']) ); }; - $scope.inviteUser = function(user_id) { + $scope.inviteUser = function() { - matrixService.invite($scope.room_id, user_id).then( + matrixService.invite($scope.room_id, $scope.userIDToInvite).then( function() { console.log("Invited."); - $scope.feedback = "Invite sent successfully"; + $scope.feedback = "Invite successfully sent to " + $scope.userIDToInvite; + $scope.userIDToInvite = ""; }, function(reason) { $scope.feedback = "Failure: " + reason; diff --git a/webclient/room/room.html b/webclient/room/room.html index 2225cc7646..b00d632292 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html @@ -150,8 +150,8 @@ <div class="extraControls"> <span> Invite a user: - <input ng-model="userIDToInvite" size="32" type="text" ng-enter="inviteUser(userIDToInvite)" placeholder="User ID (ex:@user:homeserver)"/> - <button ng-click="inviteUser(userIDToInvite)">Invite</button> + <input ng-model="userIDToInvite" size="32" type="text" ng-enter="inviteUser()" placeholder="User ID (ex:@user:homeserver)"/> + <button ng-click="inviteUser()">Invite</button> </span> <button ng-click="leaveRoom()">Leave</button> <button ng-click="startVoiceCall()" ng-show="(currentCall == undefined || currentCall.state == 'ended') && memberCount() == 2">Voice Call</button> |