Commit graph

163 commits

Author SHA1 Message Date
Bruno Windels 7a96f84cab also show redaction reason for redaction local echo 2021-06-02 12:17:09 +02:00
Bruno Windels addddf1f26 remove need for transferLocalEchoState, just add local relations again 2021-05-31 16:33:05 +02:00
Bruno Windels 13a4a0169c remove obsolete comments 2021-05-31 16:23:59 +02:00
Bruno Windels 00231443d3 timeline has the own member, so can just use timeline, not ownUserId 2021-05-31 15:18:44 +02:00
Bruno Windels d68d14358f use lower return 2021-05-31 14:08:45 +02:00
Bruno Windels 23459aad52 check if you are allowed to redact a message 2021-05-31 13:52:03 +02:00
Bruno Windels 63b371b6ef support findAndUpdate with same predicate semantics in SortedArray too 2021-05-31 10:47:32 +02:00
Bruno Windels fa37e8fedb findAndUpdate uses predicate, just add callback to update method 2021-05-31 10:46:16 +02:00
Bruno Windels 2da7ef4280 can only look in remote entries here as PEEs never return an event id 2021-05-27 10:28:02 +02:00
Bruno Windels 5e9ce365bf also apply local relations when loading at top 2021-05-27 10:27:44 +02:00
Bruno Windels a93b1af047 ensure these don't fail on a gap entry 2021-05-27 09:16:25 +02:00
Bruno Windels 2b5dcff836 consistent naming 2021-05-27 09:11:13 +02:00
Bruno Windels da02b5fe2d transfer local echo state when replacing event entry
e.g. after decryption or remote echo of other relation comes in
2021-05-26 13:10:19 +02:00
Bruno Windels ce7147e463 put redactions in their own view, and allow aborting while still queued 2021-05-26 13:07:56 +02:00
Bruno Windels af45810582 add support for redactions (and relations) local echo 2021-05-21 16:59:29 +02:00
Bruno Windels b55efb7f11 ensure updateEntries is always set in the result of GapWriter 2021-05-21 16:58:04 +02:00
Bruno Windels f271517446 log redaction during sync 2021-05-20 15:02:14 +02:00
Bruno Windels df9e886f32 fix lint 2021-05-20 13:22:54 +02:00
Bruno Windels b655c34bbb also show reason for redaction 2021-05-20 13:20:12 +02:00
Bruno Windels 780ad44032 render redacted messages 2021-05-20 13:15:35 +02:00
Bruno Windels 94b0bc82ef writing relations is async 2021-05-20 12:50:16 +02:00
Bruno Windels 9b923d337d write redactions during sync 2021-05-20 12:50:16 +02:00
Bruno Windels 8ff1f91d2c bring down lint error count, delete some old, inactive unit tests 2021-05-17 12:59:04 +02:00
Bruno Windels 1216378783 Extract BaseRoom from Room with summary and timeline, not sync or send
Which we can then reuse to create a dedicated ArchivedRoom class
which will:
 - have only relevant methods and properties (e.g. no sendEvent)
 - turns out that you can still receive a leave room in the sync
   (e.g. when banned after kick) so we'll make the sync for
   an archived room separate from room to not overcomplicate the sync
   there, much like we did for Invite already.
2021-05-07 16:13:49 +02:00
Bruno Windels 7defd4a02b ensure the sync is limited when rejoining without overlap
otherwise gap would be lost. The server should do this already,
but we're just ensuring it is, to be more robust.
2021-05-06 14:15:47 +02:00
Bruno Windels 08ba4577f6 rejoin logic was throwing away the prev_batch token 2021-05-06 14:15:47 +02:00
Bruno Windels ec0de15da6 handle overlap with existing timeline when rejoining room 2021-04-22 17:21:29 +02:00
Bruno Windels f976eeaf13 rename SortedArray.replace to update 2021-04-08 18:36:09 +02:00
Bruno Windels 863f659774 fall back to bare userid for local echo profile 2021-04-08 16:30:46 +02:00
Bruno Windels 813be758d7 we should prefer to not pick the event itself if it's a member event
but still fall back to that if it's a new join
2021-04-08 15:33:21 +02:00
Bruno Windels f67ccc18f4 take most recent member rather than first in timeline for inline lookup
noticed this while inspecting the code, looks related to #269
2021-04-08 12:57:10 +02:00
Bruno Windels 6f37c232f7 Don't cache members that haven't been written yet - fixes #271 2021-04-08 12:56:24 +02:00
Bruno Windels fcc06b2754 WIP to add logging to decryption and fetching key backups 2021-03-15 14:39:42 +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 f4a7782298 add MemberWriter, and only return MemberChange's if something changed 2021-03-05 17:03:45 +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 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 b012b1dc99 Show correct profile for pending messages 2021-03-03 14:53:22 +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 8d7cb2a39a remove unused imports 2021-03-03 14:03:50 +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 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 57bb75e864 log login & loading a session 2021-02-23 19:22:25 +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 fd81111bfb merge state machine from AttachmentUpload into PendingEvent
to have less state machines, and we are mostly interested in the
aggregate status of all attachments of an event

this will also drive updates through the pending events collection
that already exists rather than an extra observablevalue, so less
housekeeping to update the UI.
2020-11-18 13:04:23 +01:00
Bruno Windels d2a4242e5b support multiple attachments per event 2020-11-13 17:19:19 +01:00