mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 10:03:54 +01:00
SYWEB-12: Allow edited state events to be submitted.
This commit is contained in:
parent
9de9661baa
commit
0985bfb775
2 changed files with 10 additions and 3 deletions
|
@ -1043,12 +1043,19 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
|
|||
$modalInstance.close("redact");
|
||||
};
|
||||
})
|
||||
.controller('RoomInfoController', function($scope, $modalInstance, $filter) {
|
||||
.controller('RoomInfoController', function($scope, $modalInstance, $filter, matrixService) {
|
||||
console.log("Displaying room info.");
|
||||
|
||||
$scope.submit = function(event) {
|
||||
if (event.content) {
|
||||
console.error("submit >>> " + JSON.stringify(event));
|
||||
console.log("submit >>> " + JSON.stringify(event.content));
|
||||
matrixService.sendStateEvent($scope.room_id, event.type,
|
||||
event.content, event.state_key).then(function(response) {
|
||||
$modalInstance.dismiss();
|
||||
}, function(err) {
|
||||
$scope.feedback = err.data.error;
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<br/>
|
||||
Set by: <span class="monospace">{{ event.user_id }}</span>
|
||||
<br/>
|
||||
<button ng-click="submit(event)" type="button" class="btn btn-success">
|
||||
<button ng-click="submit(event)" type="button" class="btn btn-success" ng-disabled="!event.content">
|
||||
Submit
|
||||
</button>
|
||||
</td>
|
||||
|
|
Loading…
Reference in a new issue