mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 03:44:14 -04:00
Room: Added a text input to type an image URL in order to send an image message
This commit is contained in:
parent
30efb04060
commit
c87e1f6418
4 changed files with 37 additions and 3 deletions
|
@ -27,7 +27,8 @@ angular.module('RoomController', [])
|
|||
$scope.messages = [];
|
||||
$scope.members = {};
|
||||
$scope.stopPoll = false;
|
||||
|
||||
|
||||
$scope.imageURLToSend = "";
|
||||
$scope.userIDToInvite = "";
|
||||
|
||||
var shortPoll = function() {
|
||||
|
@ -224,6 +225,16 @@ angular.module('RoomController', [])
|
|||
});
|
||||
};
|
||||
|
||||
$scope.sendImage = function(url) {
|
||||
matrixService.sendImageMessage($scope.room_id, url).then(
|
||||
function() {
|
||||
console.log("Image sent");
|
||||
},
|
||||
function(reason) {
|
||||
$scope.feedback = "Failed to send image: " + reason;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on('$destroy', function(e) {
|
||||
console.log("onDestroyed: Stopping poll.");
|
||||
$scope.stopPoll = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue