1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2026-01-03 23:22:30 +03:00

Add MatrixScheduler.getQueue to allow items in the queue to be modified.

This commit is contained in:
Kegan Dougal
2015-06-25 18:00:07 +01:00
parent 041f96ae6d
commit 320bbec737
2 changed files with 14 additions and 0 deletions

View File

@@ -1,6 +1,9 @@
Changes in 0.1.2
================
New methods:
* `MatrixScheduler.getQueue(name)`
Bug fixes:
* Fixed an issue which prevented RoomMember.name being disambiguated if there
was exactly 1 other person with the same display name.

View File

@@ -35,6 +35,17 @@ function MatrixScheduler(retryAlgorithm, queueAlgorithm) {
this._procFn = null;
}
/**
* Retrieve a queue by name. Useful if you want to remove items from the queue,
* or re-order items in the queue.
* @param {string} name The name of the queue.
* @return {?Array<Object>} The queue or null. The queue consists of objects
* containing 3 properties: <code>event, defer, attempts</code>.
*/
MatrixScheduler.prototype.getQueue = function(name) {
return this._queues[name] || null;
};
/**
* Set the process function. Required for events in the queue to be processed.
* If set after events have been added to the queue, this will immediately start