Commit graph

1291 commits

Author SHA1 Message Date
Bruno Windels a3987a655e log if a connection error is a timeout 2021-03-08 15:35:34 +01:00
Bruno Windels cfb521ef10 fix ll events being duplicated in the timeline preventing name changes 2021-03-05 20:10:57 +01:00
Bruno Windels b37a586094 add clarification why this doesn't need to also check member changes 2021-03-05 17:04:18 +01:00
Bruno Windels f4a7782298 add MemberWriter, and only return MemberChange's if something changed 2021-03-05 17:03:45 +01:00
Bruno Windels e97ed9ae45 fix session test, just barely 2021-03-05 17:03:12 +01:00
Bruno Windels 49fc971d67 cleanup 2021-03-05 17:02:57 +01:00
Bruno Windels f98f690b49 no need to "serialize" here every time, it just adds noise 2021-03-05 17:02:26 +01:00
Bruno Windels 4e0bd16a4e reuse LRU Cache for session cache 2021-03-05 17:01:38 +01:00
Bruno Windels f0c0c3e084 add LRU Cache utility
we'll use it to cache members later on
2021-03-05 17:00:55 +01:00
Bruno Windels c1c8f11bf7 fix TypeError when syncing a new e2ee room with keys at the same time 2021-03-05 11:50:54 +01:00
Bruno Windels 5682e715e6 prevent multiple checks if a new room key is better 2021-03-05 10:07:48 +01:00
Bruno Windels d08c41c13a probably best to close this 2021-03-04 22:09:11 +01:00
Bruno Windels e603e4b455 provide default mimetype so file uploads work on iOS
otherwise homeserverapi doesn't think this is a blob
2021-03-04 21:51:53 +01:00
Bruno Windels 6ad778d27b support file downloads on iOS through data: uris 2021-03-04 21:51:29 +01:00
Bruno Windels 932d26ed8c detect the webkit bug, and await a bogus request when opening a txn 2021-03-04 19:49:13 +01: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 4445b1ee01 store key share operations before tracking the room 2021-03-03 18:56:16 +01:00
Bruno Windels aa23672694 forgot await, this broke updating the timeline when fetching key backup 2021-03-03 17:50:38 +01:00
Bruno Windels f5bba54fd4
Merge pull request #255 from vector-im/bwindels/send-local-echo-profile
Show correct profile for pending messages
2021-03-03 13:55:26 +00:00
Bruno Windels b012b1dc99 Show correct profile for pending messages 2021-03-03 14:53:22 +01:00
Bruno Windels 961d0cb224
Merge pull request #249 from vector-im/bwindels/ui-sent-status
show message already as black when sent but no remote echo yet
2021-03-03 13:08:46 +00:00
Bruno Windels 6771303086 make a method to determine only the retry entries rather 2021-03-03 14:03:50 +01:00
Bruno Windels 404dbcd065 english 2021-03-03 14:03:50 +01:00
Bruno Windels e7598b9c76 only request key backup for events that are UTD 2021-03-03 14:03:50 +01:00
Bruno Windels 30481a5a9e add logging to key sharing and discarding in reaction to member changes 2021-03-03 14:03:50 +01:00
Bruno Windels f3c49e51f2 add, don't replace timeline retry entries
also, filter out any that have been decrypted already
2021-03-03 14:03:50 +01:00
Bruno Windels 43547e0901 don't add retried entries to the timeline if they are not already there 2021-03-03 14:03:50 +01:00
Bruno Windels 7f1cdf6841 also decrypt all matching timeline entries when new key 2021-03-03 14:03:50 +01:00
Bruno Windels 3671574547 comment about session backup 2021-03-03 14:03:50 +01:00
Bruno Windels 3bfe52b1dc filter encrypted events before deciding to decrypt or not 2021-03-03 14:03:50 +01:00
Bruno Windels 9702c4fd64 more logging in sync write 2021-03-03 14:03:50 +01:00
Bruno Windels 8d7cb2a39a remove unused imports 2021-03-03 14:03:50 +01:00
Bruno Windels e85844f482 don't redeclare retryEntries, or they won't get passed to writeSync 2021-03-03 14:03:50 +01:00
Bruno Windels 56db210763 attempt at fixing https://github.com/vector-im/hydrogen-web/issues/245 2021-03-03 14:03:50 +01:00
Bruno Windels e29bc6710a bring back missing import 2021-03-03 14:03:50 +01:00
Bruno Windels c6db23bcfb WIP to store missing session event ids 2021-03-03 14:03:50 +01:00
Bruno Windels 3fa2d22015 remove isTimelineOpen flag and rather do the check to verify in Room
flags are ugly, let's avoid them where we can
2021-03-03 14:03:50 +01:00
Bruno Windels 265a9bd993 applyToEntries does not return anything 2021-03-02 19:39:04 +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 8d080163b3 reattempt decryption for timeline items 2021-03-02 19:39:04 +01:00
Bruno Windels 061e7abd50 don't break on empty room sync response 2021-03-02 19:39:04 +01:00
Bruno Windels 8a39c16a38 fix name conflict with _sessionInfo in parent class 2021-03-02 19:39:04 +01:00
Bruno Windels a536ea7742 comment to explain replay attack better 2021-03-02 19:39:04 +01:00
Bruno Windels a33200d926 fix sender key lookup for room key coming from olm 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 37151dc06b always log ids, etc in console logger, even if falsy 2021-03-02 19:38:46 +01:00
Bruno Windels 8208464653 only log and clear when actually needed 2021-03-02 19:37:11 +01:00
Bruno Windels e1821b1753 prevent linking fragment to itself when filling a gap
this seems to happen when at the beginning of the timeline and
make the timeline reader go into an infinite loop
2021-03-02 19:31:00 +01:00
Bruno Windels 6f6346d5c3 detect when hitting beginning of timeline when loading timeline 2021-03-02 19:29:55 +01:00
Bruno Windels 0eb2b4fe6b simplify with toFixed here 2021-03-01 15:07:24 +01:00