diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-10-30 16:31:47 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-10-30 16:31:47 +0000 |
commit | 0985bfb77584ea77c60c4bf8b3e95c104e2fa3f5 (patch) | |
tree | df6d8b195986ee488bf5f0682609198b50ea0639 /webclient/room/room-controller.js | |
parent | SYWEB-12: More formatting and tweaking of state event JSON. (diff) | |
download | synapse-0985bfb77584ea77c60c4bf8b3e95c104e2fa3f5.tar.xz |
SYWEB-12: Allow edited state events to be submitted.
Diffstat (limited to 'webclient/room/room-controller.js')
-rw-r--r-- | webclient/room/room-controller.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index ce513990f2..df93ccf5b8 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -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; + } + ); } }; |