mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Invite: reset the input when the invitation has been done
This commit is contained in:
parent
c92740e8a9
commit
6b20fef52a
@ -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() {
|
function() {
|
||||||
console.log("Invited.");
|
console.log("Invited.");
|
||||||
$scope.feedback = "Invite sent successfully";
|
$scope.feedback = "Invite successfully sent to " + $scope.userIDToInvite;
|
||||||
|
$scope.userIDToInvite = "";
|
||||||
},
|
},
|
||||||
function(reason) {
|
function(reason) {
|
||||||
$scope.feedback = "Failure: " + reason;
|
$scope.feedback = "Failure: " + reason;
|
||||||
|
@ -150,8 +150,8 @@
|
|||||||
<div class="extraControls">
|
<div class="extraControls">
|
||||||
<span>
|
<span>
|
||||||
Invite a user:
|
Invite a user:
|
||||||
<input ng-model="userIDToInvite" size="32" type="text" ng-enter="inviteUser(userIDToInvite)" placeholder="User ID (ex:@user:homeserver)"/>
|
<input ng-model="userIDToInvite" size="32" type="text" ng-enter="inviteUser()" placeholder="User ID (ex:@user:homeserver)"/>
|
||||||
<button ng-click="inviteUser(userIDToInvite)">Invite</button>
|
<button ng-click="inviteUser()">Invite</button>
|
||||||
</span>
|
</span>
|
||||||
<button ng-click="leaveRoom()">Leave</button>
|
<button ng-click="leaveRoom()">Leave</button>
|
||||||
<button ng-click="startVoiceCall()" ng-show="(currentCall == undefined || currentCall.state == 'ended') && memberCount() == 2">Voice Call</button>
|
<button ng-click="startVoiceCall()" ng-show="(currentCall == undefined || currentCall.state == 'ended') && memberCount() == 2">Voice Call</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user