Commit graph

81 commits

Author SHA1 Message Date
Bruno Windels 06868abdb2 with room status being a thing, we don't need the invite on the room 2021-05-07 14:42:29 +02:00
Bruno Windels 9546b13821 attempt to load sync writer position when joining a room during sync
since fragments and events are not archived, just the summary,
attempt to load the room and sync writer during sync,
so we write the timeline correctly and don't cause ConstraintErrors
because unaware of fragments and events already there.
2021-05-06 14:15:47 +02:00
Bruno Windels 644698aed7 remove room from room list when leaving 2021-05-06 14:15:47 +02:00
Bruno Windels 89461bf69a do all collection removal from sync rather than hand callbacks to invite 2021-05-06 14:15:47 +02:00
Bruno Windels d4d7adc7fc add archivedRoomSummary store 2021-05-06 14:15:47 +02:00
Bruno Windels 9e78f8382a dont assume there is a rooms section in the sync 2021-05-06 12:10:10 +02:00
Bruno Windels b23ec5ef70 remove obsolete comment 2021-04-28 10:08:11 +02:00
Bruno Windels e850874019 clarify order 2021-04-28 10:05:34 +02:00
Bruno Windels 47b2eb0bdb don't create a room when rejecting an invite 2021-04-26 10:41:21 +02:00
Bruno Windels 847738a76c set invite on left room so we can detect a vm refresh is needed 2021-04-23 18:05:14 +02:00
Bruno Windels b9f145caa4 emit events for rooms before invites
so the room is already there when removing the invite
2021-04-23 18:04:10 +02:00
Bruno Windels d289a44624 also sync leave now that we can handle it 2021-04-22 17:23:29 +02:00
Bruno Windels 16df40331b fix refactor mistake in sync 2021-04-21 17:26:10 +02:00
Bruno Windels 4560e0e491 split sync lifecycle steps out in different methods to keep it smaller 2021-04-20 17:57:17 +02:00
Bruno Windels a072426e07 integrate invites into the sync lifecycle and expose them on session 2021-04-20 17:39:46 +02:00
Bruno Windels e0d14207ac make opening a txn async again
as we'll need to await a bogus request first thing after opening the txn

funny enough, we originally made it sync to accommodate the same bug
in safari, but that didn't prevent any microtask being awaited
before scheduling a request in the calling code closing the txn.

We'll await a bogus request within the transaction class now so it
doesn't depend on the calling code
2021-03-04 19:47:02 +01:00
Bruno Windels c6db23bcfb WIP to store missing session event ids 2021-03-03 14:03:50 +01:00
Bruno Windels 10003e7d3a also sync room not in the rooms section but with new room keys 2021-03-02 19:39:04 +01:00
Bruno Windels fb446167f6 make new sync room keys available during decryption of same sync 2021-03-02 19:39:04 +01:00
Bruno Windels 67ddcaa468 fix lint errors in Sync 2021-02-23 19:20:36 +01:00
Bruno Windels 0a4d72b011 remove extra newline 2021-02-22 11:23:24 +01:00
Bruno Windels f4a3b64da0 log in sync writer (at detail level) and log room ids at info level 2021-02-19 11:57:17 +01:00
Bruno Windels ad0c813833 don't take network time into account in sync log filter 2021-02-18 19:48:19 +01:00
Bruno Windels 8539b0c893 also log session in after sync completed as detail level 2021-02-18 13:07:52 +01:00
Bruno Windels e590b573fb log remaining specific room entries as detailed 2021-02-18 12:44:19 +01:00
Bruno Windels f321968ac3 add more sync logging 2021-02-18 12:44:19 +01:00
Bruno Windels d201d2c9de don't use depth based log filtering, also add Detail log level
it's hard to make it work with an override where you don't want
to filter by depth if a given loglevel is present in the children.
2021-02-18 12:44:19 +01:00
Bruno Windels 338f628627 remove option to anonymize 2021-02-16 18:30:06 +01:00
Bruno Windels 4defbe1322 simplify log filtering, while also adding depth based filtering 2021-02-16 15:07:17 +01:00
Bruno Windels 78805f0a65 implement dynamic log filtering
the logger does not have a base level any more, because there is
no sensible place to configure this.

instead, we allow to dynamically determine what should be logged
after an operation finished by setting the threshold and default
log level inspecting the finished log item.
2021-02-16 11:37:48 +01:00
Bruno Windels 704708bd6c add some logging to sync 2021-02-12 18:56:26 +01:00
Bruno Windels 134f018849 always have an error when stopping sync 2020-11-05 21:21:27 +01:00
Bruno Windels a3ec01385b
Merge pull request #178 from vector-im/bwindels/lightbox
Lightbox for picture messages
2020-11-02 11:23:10 +00:00
Bruno Windels 597a57eae3 too much whitespace 2020-10-30 19:59:21 +01:00
Bruno Windels 3008367307 detect AbortError properly, name is a string 2020-10-30 09:54:38 +01:00
Bruno Windels bebdaad7d4 log when we can't abort 2020-10-01 16:23:15 +02:00
Bruno Windels c1df371a14 add some documentation for our idb investigations 2020-10-01 16:14:58 +02:00
Bruno Windels f402e8c6c4 typo/thinko in docs 2020-10-01 14:39:23 +02:00
Bruno Windels 300529b7c5 write sync token first
in case we get a TransactionInactiveError,
we have at least written the sync token
and won't repeat the same sync request
2020-10-01 14:38:54 +02:00
Bruno Windels 93a7f9959e Safari doesn't like the prepare txn still open when opening the sync txn
Waiting for it to close magically solves the TransactionInactiveError
we were seeing on some incremental sync request when
reading from roomMembers.

Still unsure what this is about, and if we should wait for all read txns
to close or not.
2020-10-01 14:31:38 +02:00
Bruno Windels 163ca12854 ignore abort error 2020-09-29 10:52:52 +02:00
Bruno Windels 76381fbca1 open storage transactions synchronously
this (almost) makes it work in some browsers that otherwise
have throw a TransactionInactiveError on the first operation
you try to do on a store.
2020-09-28 16:06:41 +02:00
Bruno Windels d759e1429f set error before changing state to stopped 2020-09-28 16:06:19 +02:00
Bruno Windels bcca23bac9 retry sync on timeout, even for incremental sync 2020-09-25 10:44:36 +02:00
Bruno Windels 7f0d36cf79 remove double negation 2020-09-25 10:44:19 +02:00
Bruno Windels 4a0173e90f only run decryptPending if needed 2020-09-24 10:53:51 +02:00
Bruno Windels 6e77ebb160 undo obsolete changes 2020-09-23 18:06:16 +02:00
Bruno Windels a8392dc684 also decrypt messages in the sync response that enabled encryption
like initial sync
2020-09-23 14:26:14 +02:00
Bruno Windels 150f06b9bf also move to Stopped for aborts 2020-09-22 16:39:04 +02:00
Bruno Windels c9ee5a5db2 stay in catchup mode as long as there are device messages
this implements https://github.com/vector-im/element-web/issues/2782

it also implements 0 timeout for catchup, getting rid of the
catching up with your convo banner for 30s upon reconnection.
2020-09-21 17:57:01 +02:00