Bruno Windels
b94ab42c90
delete annotations object when no more annotations left
2021-06-03 19:10:29 +02:00
Bruno Windels
a78e9af8fc
Support (de)aggregating annotation relations in relation writer
...
When deaggregating on redacting an annotation relation, we remove the
relation and aggregate the other relations for that key again, so we can
reliably detect the first timestamp (and count and me as well to lesser
extent).
as a consequence, more than one event can get updated when redacting a
relation (the relation is updated, as well as the relation target), so
account for that by returning an array of entries that have updated.
2021-06-03 16:50:37 +02:00
Bruno Windels
36a35d92f0
pass ownUserId to RelationWriter
...
We'll need to to aggregate whether we have reacted to a message
Create writers at room level and pass subwriter is dependency, rather
than creating them in sync and gap writer.
2021-06-03 16:50:37 +02:00
Bruno Windels
2b5dcff836
consistent naming
2021-05-27 09:11:13 +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
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
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
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
8d7cb2a39a
remove unused imports
2021-03-03 14:03:50 +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
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
07eee8fac1
only create fragments when we will really write events to the timeline store
2020-10-01 17:01:33 +02:00
Bruno Windels
1117c77d05
note for future optimisation
2020-10-01 14:36:00 +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
17f84ab314
fix "this" still being used in readRawTimelineEntries ...
2020-09-23 19:09:44 +02:00
Bruno Windels
d53b5eefb3
fill in the blanks
2020-09-23 17:59:42 +02:00
Bruno Windels
9d41e122a0
draft of falling back to reading entries since last decrypted event key
...
this change notifyRoomKey(s) to only take one room key at a time
to simplify things
2020-09-23 17:34:25 +02:00
Bruno Windels
241176d6fb
WIP
2020-09-22 18:22:37 +02:00
Bruno Windels
9f6822f362
remove needsRoomKey flag on member
2020-09-11 14:38:36 +02:00
Bruno Windels
0bf1723d99
Worker WIP
2020-09-10 15:40:30 +01:00
Bruno Windels
17412bbb2f
more validation
2020-09-10 12:12:39 +02:00
Bruno Windels
1c77c3b876
expose multi-step decryption from RoomEncryption, adjust room timeline
...
sync code hasn't been adjusted yet
2020-09-10 12:11:25 +02:00
Bruno Windels
650df6fea8
forgot await
2020-09-08 15:00:29 +02:00
Bruno Windels
5a8aac57ac
there might not be a member yet
2020-09-08 15:00:20 +02:00
Bruno Windels
bbaf3a5605
write needsRoomKey flag when new members joins to tracked e2ee room
2020-09-08 14:22:11 +02:00
Bruno Windels
c32ac2c764
use decryption result to show message verification status in timeline
2020-09-08 10:50:39 +02:00
Bruno Windels
5a731903da
implement decrypting when loading timeline
2020-09-04 15:30:06 +02:00
Bruno Windels
8482bc95ec
pass memberchanges around instead of members
...
so we can easily tell how their membership changes, (e.g. join -> left)
which we'll need for device tracking.
Not adding this to RoomMember because RoomMember also needs to be
able to represent a member loaded from storage which doesn't contain
this error. A MemberChange exists only within a sync.
2020-08-31 09:50:57 +02:00
Bruno Windels
1fe496eeea
fix crash when state is not set (erroneously?) on gap response
...
this seems to happen when the only event in the room is
a m.room.create
2020-08-27 09:52:30 +02:00
Bruno Windels
5d21ae3fb7
fix error on conduit with state field that is missing when empty
2020-08-21 19:10:28 +02:00
Bruno Windels
2bfbb41ee7
send receipt to server when clearing unread state so notif count clears
2020-08-21 15:16:57 +02:00
Bruno Windels
f5acee02be
add comment why we do things in this order
2020-08-20 16:20:35 +02:00
Bruno Windels
fafdf669db
use prev_content from later events before state
2020-08-20 15:23:56 +02:00
Bruno Windels
830c300102
fix typo that broke the txn
2020-08-20 15:23:29 +02:00