Commit graph

536 commits

Author SHA1 Message Date
Bruno Windels a7db44eabf
Merge pull request #138 from vector-im/bwindels/filter-room-list
Room list filtering
2020-10-06 11:08:39 +00:00
Bruno Windels b1cb797919 fix refactor error in xhr, breaking it 2020-10-06 13:02:35 +02:00
Bruno Windels 7def542e21 fix test 2020-10-06 12:19:47 +02:00
Bruno Windels 5ae1be9a9c ignore invalid json on error pages 2020-10-05 17:18:05 +02:00
Bruno Windels c8e4dbc1b3 this should be a map 2020-10-05 17:06:29 +02:00
Bruno Windels e93b091566 dont use no-cache in fetch, as it doesn't play well with CORS on Safari 2020-10-02 14:02:59 +02:00
Bruno Windels 07eee8fac1 only create fragments when we will really write events to the timeline store 2020-10-01 17:01:33 +02: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 9a4d47820d change this back as well 2020-10-01 14:46:30 +02:00
Bruno Windels cb7da2ba4a dont need this anymore 2020-10-01 14:45:09 +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 1117c77d05 note for future optimisation 2020-10-01 14:36:00 +02:00
Bruno Windels d5a6a4d350 todo comment 2020-10-01 14:35:46 +02:00
Bruno Windels 3c7125bb88 add (optional) logging for idb requests 2020-10-01 14:35:33 +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 ddb14f48bf we actually don't need to track write requests
as errors will bubble up to the txn
2020-10-01 14:31:08 +02:00
Bruno Windels d5a52c32d6 these don't return a promise anymore 2020-09-29 11:51:14 +02:00
Bruno Windels 37690cffe3 track storage write requests internally, as we never await their promise 2020-09-29 11:50:37 +02:00
Bruno Windels 482b5f4d22 allow passing message to IDBRequestError 2020-09-29 11:50:10 +02:00
Bruno Windels 43d430fc98 remove unused storage modification functions 2020-09-29 11:47:49 +02:00
Bruno Windels f993048a2b Merge branch 'master' into bwindels/idb-promises-txn 2020-09-29 11:33:58 +02:00
Bruno Windels e5b1cbbcd3 prevent endless loop when restoring messages that were already sent 2020-09-29 11:32:49 +02:00
Bruno Windels 7627a2bda2 add comment 2020-09-29 10:53:02 +02:00
Bruno Windels 163ca12854 ignore abort error 2020-09-29 10:52:52 +02:00
Bruno Windels 919357b474 more broken imports after refactor 2020-09-29 09:57:48 +02:00
Bruno Windels c529df179b also import this 2020-09-29 09:56:46 +02:00
Bruno Windels c1ecaffbae fix refactor typo 2020-09-29 09:54:51 +02:00
Bruno Windels 07fcf7e75b also do this in try catch 2020-09-29 09:43:25 +02:00
Bruno Windels b1f9cfd972 cleanup storage errors a bit 2020-09-29 09:17:03 +02:00
Bruno Windels ee4c132fb4 add todo 2020-09-28 16:06:41 +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 3440823981
Merge pull request #117 from vector-im/bwindels/idb-promises
Prevent transaction from closing on IE11/Win7
2020-09-28 13:37:34 +00:00
Bruno Windels dd30f51ffe add copyright 2020-09-28 15:28:51 +02:00
Bruno Windels 8366b44d8c dont assume global is window 2020-09-28 14:52:12 +02:00
Bruno Windels 98a6d82820 detect when sync promise hack is needed 2020-09-28 14:51:41 +02:00
Bruno Windels 706ec97296 change method name 2020-09-28 13:25:44 +02:00
Bruno Windels 64290d5ae6 flush promises manually in idb event handler 2020-09-25 16:53:19 +02:00
Bruno Windels 27a8ef4604 add comment how timeouts interact with the reconnector 2020-09-25 10:45:41 +02:00
Bruno Windels e175e9ac8b cleanup 2020-09-25 10:45:34 +02:00
Bruno Windels 134b04c782 make flushing room key shares reentrant
as it can be called from Room.start while still running.
2020-09-25 10:45:00 +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 86df4993e1 prevent room summary from being updated every time it is in /sync resp 2020-09-24 16:45:28 +02:00
Bruno Windels 46abafdccc ensure cloned is always set to false for this._data
by making all assignments of this._data go through applyChanges
2020-09-24 16:40:51 +02:00
Bruno Windels 4a0173e90f only run decryptPending if needed 2020-09-24 10:53:51 +02:00
Bruno Windels 4d616ce281 add todo for future optimisation 2020-09-24 10:35:09 +02:00
Bruno Windels ece4840653 don't mark rooms as unread after retrying decryption for now
this will not mark e2ee rooms as unread if their room key is delayed
though. We should really only do this for back-filled events but that
is hard to do right now, as we don't know the original source here.
2020-09-23 19:11:11 +02:00