Add removeFromQueue function to cancel sending a queued event
This commit is contained in:
parent
08d7c0232a
commit
b110e315ec
1 changed files with 9 additions and 0 deletions
|
@ -21,4 +21,13 @@ module.exports = {
|
||||||
event: event
|
event: event
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
removeFromQueue: function(event) {
|
||||||
|
MatrixClientPeg.get().getScheduler().removeEventFromQueue(event);
|
||||||
|
var room = MatrixClientPeg.get().getRoom(event.getRoomId());
|
||||||
|
if (!room) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
room.removeEvents([event.getId()]);
|
||||||
|
}
|
||||||
};
|
};
|
Loading…
Reference in a new issue