You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Fix lint
This commit is contained in:
@@ -100,7 +100,8 @@ export default class DeviceList {
|
||||
'readonly', [IndexedDBCryptoStore.STORE_DEVICE_DATA], (txn) => {
|
||||
this._cryptoStore.getEndToEndDeviceData(txn, (deviceData) => {
|
||||
this._devices = deviceData ? deviceData.devices : {},
|
||||
this._deviceTrackingStatus = deviceData ? deviceData.trackingStatus : {};
|
||||
this._deviceTrackingStatus = deviceData ?
|
||||
deviceData.trackingStatus : {};
|
||||
this._syncToken = deviceData ? deviceData.syncToken : null;
|
||||
});
|
||||
},
|
||||
@@ -327,6 +328,9 @@ export default class DeviceList {
|
||||
|
||||
/**
|
||||
* Replaces the list of devices for a user with the given device list
|
||||
*
|
||||
* @param {string} u The user ID
|
||||
* @param {Object} devs New device info for user
|
||||
*/
|
||||
storeDevicesForUser(u, devs) {
|
||||
this._devices[u] = devs;
|
||||
|
||||
@@ -812,7 +812,8 @@ Crypto.prototype.decryptEvent = function(event) {
|
||||
* Handle the notification from /sync or /keys/changes that device lists have
|
||||
* been changed.
|
||||
*
|
||||
* @param {Object} deviceLists device_lists field from /sync, or response from
|
||||
* @param {Object} syncData Object containing sync tokens associated with this sync
|
||||
* @param {Object} syncDeviceLists device_lists field from /sync, or response from
|
||||
* /keys/changes
|
||||
*/
|
||||
Crypto.prototype.handleDeviceListChanges = async function(syncData, syncDeviceLists) {
|
||||
|
||||
@@ -368,6 +368,7 @@ export default class IndexedDBCryptoStore {
|
||||
* is always consistent, so they are stored in one object.
|
||||
*
|
||||
* @param {Object} deviceData
|
||||
* @param {*} txn An active transaction. See doTxn().
|
||||
*/
|
||||
storeEndToEndDeviceData(deviceData, txn) {
|
||||
this._backendPromise.value().storeEndToEndDeviceData(deviceData, txn);
|
||||
@@ -377,9 +378,11 @@ export default class IndexedDBCryptoStore {
|
||||
* Get the state of all tracked devices
|
||||
*
|
||||
* @param {*} txn An active transaction. See doTxn().
|
||||
* @param {function(Object)} func Function called with the
|
||||
* device data
|
||||
*/
|
||||
getEndToEndDeviceData(txn, func) {
|
||||
return this._backendPromise.value().getEndToEndDeviceData(txn, func);
|
||||
this._backendPromise.value().getEndToEndDeviceData(txn, func);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
10
src/sync.js
10
src/sync.js
@@ -702,8 +702,7 @@ SyncApi.prototype._onSyncError = function(err, syncOptions) {
|
||||
* Process data returned from a sync response and propagate it
|
||||
* into the model objects
|
||||
*
|
||||
* @param {string} syncToken the old next_batch token sent to this
|
||||
* sync request.
|
||||
* @param {Object} syncEventData Object containing sync tokens associated with this sync
|
||||
* @param {Object} data The response from /sync
|
||||
* @param {bool} isCachedResponse True if this response is from our local cache
|
||||
*/
|
||||
@@ -950,7 +949,8 @@ SyncApi.prototype._processSyncResponse = async function(
|
||||
self._deregisterStateListeners(room);
|
||||
room.resetLiveTimeline(
|
||||
joinObj.timeline.prev_batch,
|
||||
self.opts.canResetEntireTimeline(room.roomId) ? null : syncEventData.oldSyncToken,
|
||||
self.opts.canResetEntireTimeline(room.roomId) ?
|
||||
null : syncEventData.oldSyncToken,
|
||||
);
|
||||
|
||||
// We have to assume any gap in any timeline is
|
||||
@@ -1046,7 +1046,9 @@ SyncApi.prototype._processSyncResponse = async function(
|
||||
// Handle device list updates
|
||||
if (data.device_lists) {
|
||||
if (this.opts.crypto) {
|
||||
await this.opts.crypto.handleDeviceListChanges(syncEventData, data.device_lists);
|
||||
await this.opts.crypto.handleDeviceListChanges(
|
||||
syncEventData, data.device_lists,
|
||||
);
|
||||
} else {
|
||||
// FIXME if we *don't* have a crypto module, we still need to
|
||||
// invalidate the device lists. But that would require a
|
||||
|
||||
Reference in New Issue
Block a user