mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
add some comments while debugging a problem
This commit is contained in:
parent
e49639fda2
commit
e515548037
@ -287,7 +287,7 @@ export class Session {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal called when coming back online
|
* @internal called from session container when coming back online and catchup syncs have finished.
|
||||||
* @param {Object} lastVersionResponse a response from /versions, which is polled while offline,
|
* @param {Object} lastVersionResponse a response from /versions, which is polled while offline,
|
||||||
* and useful to store so we can later tell what capabilities
|
* and useful to store so we can later tell what capabilities
|
||||||
* our homeserver has.
|
* our homeserver has.
|
||||||
|
@ -45,6 +45,13 @@ export class DeviceTracker {
|
|||||||
|
|
||||||
async writeDeviceChanges(deviceLists, txn) {
|
async writeDeviceChanges(deviceLists, txn) {
|
||||||
const {userIdentities} = txn;
|
const {userIdentities} = txn;
|
||||||
|
// TODO: should we also look at left here to handle this?:
|
||||||
|
// the usual problem here is that you share a room with a user,
|
||||||
|
// go offline, the remote user leaves the room, changes their devices,
|
||||||
|
// then rejoins the room you share (or another room).
|
||||||
|
// At which point you come online, all of this happens in the gap,
|
||||||
|
// and you don't notice that they ever left,
|
||||||
|
// and so the client doesn't invalidate their device cache for the user
|
||||||
if (Array.isArray(deviceLists.changed) && deviceLists.changed.length) {
|
if (Array.isArray(deviceLists.changed) && deviceLists.changed.length) {
|
||||||
await Promise.all(deviceLists.changed.map(async userId => {
|
await Promise.all(deviceLists.changed.map(async userId => {
|
||||||
const user = await userIdentities.get(userId);
|
const user = await userIdentities.get(userId);
|
||||||
|
@ -121,6 +121,7 @@ export class Transaction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
abort() {
|
abort() {
|
||||||
|
// TODO: should we wrap the exception in a StorageError?
|
||||||
this._txn.abort();
|
this._txn.abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user