Invite: reset the input when the invitation has been done

This commit is contained in:
Emmanuel ROHEE 2014-09-11 13:52:07 +02:00
parent c92740e8a9
commit 6b20fef52a
2 changed files with 6 additions and 5 deletions

View file

@ -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;