You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-23 22:42:10 +03:00
Linting
This commit is contained in:
@@ -2451,6 +2451,9 @@ function _PojoToMatrixEventMapper(client) {
|
||||
return mapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Function}
|
||||
*/
|
||||
MatrixClient.prototype.getEventMapper = function() {
|
||||
return _PojoToMatrixEventMapper(this);
|
||||
};
|
||||
|
||||
22
lib/sync.js
22
lib/sync.js
@@ -187,10 +187,18 @@ function SyncApi(client) {
|
||||
this.opts = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} roomId
|
||||
* @return {Room}
|
||||
*/
|
||||
SyncApi.prototype.createRoom = function(roomId) {
|
||||
return createNewRoom(this.client, roomId);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Room} room
|
||||
* @return {Promise}
|
||||
*/
|
||||
SyncApi.prototype.syncRoom = function(room) {
|
||||
return _syncRoom(this.client, room);
|
||||
};
|
||||
@@ -203,10 +211,13 @@ SyncApi.prototype.syncRoom = function(room) {
|
||||
SyncApi.prototype.sync = function(opts) {
|
||||
console.log("SyncApi.sync");
|
||||
this.opts = opts || {};
|
||||
return this._prepareForSync();
|
||||
this._prepareForSync();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {Number=} attempt
|
||||
*/
|
||||
SyncApi.prototype._prepareForSync = function(attempt) {
|
||||
var client = this.client;
|
||||
var self = this;
|
||||
@@ -231,6 +242,9 @@ SyncApi.prototype._prepareForSync = function(attempt) {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Number=} attempt
|
||||
*/
|
||||
SyncApi.prototype._sync = function(attempt) {
|
||||
var opts = this.opts;
|
||||
var client = this.client;
|
||||
@@ -367,15 +381,14 @@ SyncApi.prototype._sync = function(attempt) {
|
||||
|
||||
/**
|
||||
* This is an internal method.
|
||||
* @param {MatrixClient} client
|
||||
* @param {Number} attempt The attempt number
|
||||
* @param {Number=} attempt The attempt number
|
||||
*/
|
||||
SyncApi.prototype._pollForEvents = function(attempt) {
|
||||
var client = this.client;
|
||||
var self = this;
|
||||
|
||||
attempt = attempt || 1;
|
||||
|
||||
|
||||
if (!client.clientRunning) {
|
||||
return;
|
||||
}
|
||||
@@ -518,4 +531,5 @@ SyncApi.prototype._pollForEvents = function(attempt) {
|
||||
});
|
||||
};
|
||||
|
||||
/** */
|
||||
module.exports = SyncApi;
|
||||
|
||||
Reference in New Issue
Block a user