You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-18 05:42:00 +03:00
Add getScheduler. Fix JSDoc
This commit is contained in:
@@ -42,6 +42,7 @@ var OLM_ALGORITHM = "m.olm.v1.curve25519-aes-sha2";
|
||||
* as it specifies 'sensible' defaults for these modules.
|
||||
* @constructor
|
||||
* @extends {external:EventEmitter}
|
||||
*
|
||||
* @param {Object} opts The configuration options for this client.
|
||||
* @param {string} opts.baseUrl Required. The base URL to the client-server
|
||||
* HTTP API.
|
||||
@@ -51,17 +52,21 @@ var OLM_ALGORITHM = "m.olm.v1.curve25519-aes-sha2";
|
||||
* requests. The value of this property is typically <code>require("request")
|
||||
* </code> as it returns a function which meets the required interface. See
|
||||
* {@link requestFunction} for more information.
|
||||
*
|
||||
* @param {string} opts.accessToken The access_token for this user.
|
||||
* @param {string} opts.userId The user ID for this user.
|
||||
* @param {Object} opts.store Optional. The data store to use. If not specified,
|
||||
* this client will not store any HTTP responses.
|
||||
*
|
||||
* @param {Object} opts.scheduler Optional. The scheduler to use. If not
|
||||
* specified, this client will not retry requests on failure. This client
|
||||
* will supply its own processing function to
|
||||
* {@link module:scheduler~MatrixScheduler#setProcessFunction}.
|
||||
*
|
||||
* @param {Object} opts.queryParams Optional. Extra query parameters to append
|
||||
* to all requests with this client. Useful for application services which require
|
||||
* <code>?user_id=</code>.
|
||||
* {@link module:scheduler~MatrixScheduler#setProcessFunction}.
|
||||
*
|
||||
*/
|
||||
function MatrixClient(opts) {
|
||||
utils.checkObjectHasKeys(opts, ["baseUrl", "request"]);
|
||||
@@ -201,6 +206,14 @@ MatrixClient.prototype.isGuest = function() {
|
||||
return this._isGuest;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the provided scheduler, if any.
|
||||
* @return {?module:scheduler~MatrixScheduler} The scheduler or null
|
||||
*/
|
||||
MatrixClient.prototype.getScheduler = function() {
|
||||
return this.scheduler;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set whether this client is a guest account. <b>This method is experimental
|
||||
* and may change without warning.</b>
|
||||
|
Reference in New Issue
Block a user