Add removeFromQueue function to cancel sending a queued event

pull/21833/head
Kegan Dougal 2015-12-07 11:36:28 +00:00
parent 08d7c0232a
commit b110e315ec
1 changed files with 9 additions and 0 deletions

View File

@ -21,4 +21,13 @@ module.exports = {
event: event
});
},
removeFromQueue: function(event) {
MatrixClientPeg.get().getScheduler().removeEventFromQueue(event);
var room = MatrixClientPeg.get().getRoom(event.getRoomId());
if (!room) {
return;
}
room.removeEvents([event.getId()]);
}
};