RMidhunSuresh
7ef79c92f5
Remove entry from map
2022-01-06 12:07:10 +05:30
RMidhunSuresh
6f8001bd82
Add tests
2022-01-06 12:07:10 +05:30
RMidhunSuresh
640a3fb9fa
Check if contextEvent was found
2022-01-06 12:07:10 +05:30
RMidhunSuresh
05d2defa2d
Rename fetchedEntries --> contextEntriesNotInTimeline
2022-01-06 12:07:10 +05:30
RMidhunSuresh
c3bef6d4d2
Rename dependents --> contextForEntries
2022-01-06 12:07:10 +05:30
RMidhunSuresh
d1818d2a57
Reuse code in getOrLoadEntry
2022-01-06 12:07:10 +05:30
RMidhunSuresh
f5fadf700e
Move event to remoteEntries if needed
2022-01-06 12:07:10 +05:30
RMidhunSuresh
d924dbb723
Add explaining comment
2022-01-06 12:07:10 +05:30
RMidhunSuresh
544dca3b18
Use _updateEntry
2022-01-06 12:07:10 +05:30
RMidhunSuresh
39f68e8c2f
Refactor out magic string
2022-01-06 12:07:10 +05:30
RMidhunSuresh
51b7b21082
Implement readById() in TimelineReader
2022-01-06 12:07:10 +05:30
RMidhunSuresh
0da94e51e0
Use map and fetch from Map if available
2022-01-06 12:07:10 +05:30
RMidhunSuresh
4a6293dcdc
Made code more readable
2022-01-06 12:07:10 +05:30
RMidhunSuresh
287212956b
findAndUpdate instead of update
2022-01-06 12:07:10 +05:30
RMidhunSuresh
7a91dd9595
Improve comment
2022-01-06 12:07:10 +05:30
RMidhunSuresh
4a81e06e96
Track fetched entries for redactions
2022-01-06 12:07:10 +05:30
RMidhunSuresh
ea89c272b9
Support redaction changes in remoteEntries
2022-01-06 12:07:10 +05:30
RMidhunSuresh
7cc3d4b91a
Emit updated entries
2022-01-06 12:07:10 +05:30
RMidhunSuresh
06864a65b7
Add contextEventId
2022-01-06 12:07:10 +05:30
RMidhunSuresh
764e38f8c9
Use 'context' instead of 'related'
2022-01-06 12:07:10 +05:30
RMidhunSuresh
e901142661
await on loading related events
2022-01-06 11:59:58 +05:30
RMidhunSuresh
2265d198a6
Formatting fix
2022-01-06 11:59:58 +05:30
RMidhunSuresh
b753507b8d
WIP
2022-01-06 11:59:58 +05:30
RMidhunSuresh
ef53a12f7a
Fix imports
2021-11-17 20:28:44 +05:30
RMidhunSuresh
520e0f1b89
Use interface ILogItem
2021-11-15 17:29:08 +05:30
Bruno Windels
edc3a1d33c
convert storage mock to TS and add utility for mock raw database
2021-09-28 14:19:59 +02:00
Bruno Windels
ac5a4c2bc6
pass log item everywhere to tryInsert
2021-09-22 10:33:40 +02:00
Bruno Windels
6cded5319a
change timelineEventStore.insert to tryInsert
2021-09-21 21:04:10 +02:00
Bruno Windels
9a9b206bf5
Merge pull request #486 from vector-im/bwindels/fix-scroll-jumps
...
Fix scroll jumps and loading of gaps not at top of the timeline
2021-09-16 17:14:17 +02:00
Bruno Windels
381a12db20
load 20 entries initially in timeline, otherwise it flickers a bit
2021-09-16 16:34:13 +02:00
Bruno Windels
9411e6f065
WIP
2021-09-10 14:47:05 +02:00
Bruno Windels
85c8415acd
convert Direction to ts
2021-09-06 13:06:20 +02:00
Bruno Windels
0dc5041f47
WIP
2021-08-04 15:23:03 +02:00
RMidhunSuresh
2502c4024a
Fix broken tests
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
8a976ef24b
Make powerLevels observable
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
Bruno Windels
299294daff
prevent re(d)action in left/kicked room
2021-06-24 14:24:22 +02:00
Bruno Windels
a4a7c23148
use pending re(d)action timestamp to have stable reaction sorting order
...
also move more logic into the matrix layer, from Reaction(s)ViewModel
to PendingAnnotation
2021-06-24 12:26:38 +02:00
Bruno Windels
e125599a47
prevent decryption result getting lost after reaction updates entry
2021-06-23 17:38:52 +02:00
Bruno Windels
11fba12083
add tests for remote reaction target being added after pending event
2021-06-18 15:09:14 +02:00
Bruno Windels
0703cf8915
cleanup
2021-06-18 15:06:49 +02:00
Bruno Windels
5bea8130f2
more timeline annotation tests
2021-06-18 14:39:54 +02:00
Bruno Windels
9f99cf4b1e
fix lint in tests
2021-06-18 11:52:09 +02:00
Bruno Windels
8092713faa
add tests for local echo of adding and removing reaction
2021-06-18 11:51:02 +02:00
Bruno Windels
70d64f38eb
spelling
2021-06-17 16:07:32 +02:00
Bruno Windels
a77ef02677
cleanup
2021-06-17 10:12:45 +02:00
Bruno Windels
cbee498d41
a bit more brief
2021-06-17 10:03:32 +02:00
Bruno Windels
bbcf0d2572
more local echo fixes for redacting a reaction + cleanup
2021-06-16 12:46:44 +02:00
Bruno Windels
4f10174e48
clarify comment
2021-06-16 10:28:17 +02:00
Bruno Windels
e5c1094153
WIP
2021-06-15 19:06:41 +02:00
Bruno Windels
75ee509361
fix lint
2021-06-11 11:30:11 +02:00
Bruno Windels
757e08c62c
WIP 4
2021-06-10 18:29:10 +02:00
Bruno Windels
cb051ad161
WIP3
2021-06-09 16:52:30 +02:00
Bruno Windels
206d18f498
WIP2
2021-06-08 16:56:17 +02:00
Bruno Windels
2ebadb36c3
WIP
2021-06-08 13:20:55 +02:00
Bruno Windels
7691b28503
prevent another race between sync and openTimeline
2021-06-04 16:28:08 +02:00
Bruno Windels
bb6905bdcd
don't assume localEntries exists, as load races with sync.afterSync
2021-06-04 16:05:28 +02:00
Bruno Windels
0c4c018ceb
add note that powerlevels won't update when the state event is changed
2021-06-02 18:43:47 +02:00
Bruno Windels
d2f5b412ac
don't try to hook up local relations for events that are not relations
...
and do unnecessary work
2021-06-02 18:43:16 +02:00
Bruno Windels
365bd5cad0
fix the race
2021-06-02 18:42:46 +02:00
Bruno Windels
84ecaa2ee1
don't trip over missing create events when loading power levels
...
as the test from previous commit fails because of that, and powerlevels
works fine without
2021-06-02 18:41:52 +02:00
Bruno Windels
4a8a6168cd
add failing test for race between sync & subscribing after openTimeline
2021-06-02 18:41:03 +02:00
Bruno Windels
31075d601f
load power levels before decryption closes the txn
2021-06-02 15:06:30 +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
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
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
af45810582
add support for redactions (and relations) local echo
2021-05-21 16:59:29 +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
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
fcc06b2754
WIP to add logging to decryption and fetching key backups
2021-03-15 14:39:42 +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
8d080163b3
reattempt decryption for timeline items
2021-03-02 19:39:04 +01:00
Bruno Windels
6f6346d5c3
detect when hitting beginning of timeline when loading timeline
2021-03-02 19:29:55 +01:00
Bruno Windels
137264edcb
implement subscribing to a single event
2020-10-30 15:19:51 +01:00
Bruno Windels
c8dd7b42e7
encountered this very unlikely race while testing, so prevent it
2020-10-13 13:10:35 +02:00
Bruno Windels
0dece5b04f
make continuation logic work well with pending events
...
- don't use display name to compare but user id
(pending doesn't have display name yet)
- use current time as timestamp
2020-09-11 11:43:40 +02:00
Bruno Windels
de1cc0d739
abort decrypt requests when changing room
2020-09-10 17:43:01 +02:00
Bruno Windels
0bf1723d99
Worker WIP
2020-09-10 15:40:30 +01:00
Bruno Windels
fdbc5f3c1d
WIP worker work
2020-09-10 13:00:11 +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
62bcb27784
implement decryption retrying and decrypting of gap/load entries
...
turns out we do have to always check for replay attacks because
failing to decrypt doesn't prevent an item from being stored,
so if you reload and then load you might be decrypting it
for the first time
2020-09-04 15:29:58 +02:00
Bruno Windels
00a85697ab
add license header in all source files
2020-08-05 18:38:55 +02:00
Bruno Windels
f56b96b0ff
add some ideas for relations
2020-05-07 19:14:53 +02:00
Bruno Windels
28bed56b5a
prevent closing more than once
2020-05-04 22:21:56 +02:00
Bruno Windels
001dbefbcf
stop using default exports
...
because it becomes hard to remember where you used them and where not
2020-04-20 21:26:39 +02:00
Bruno Windels
6d68ec1bac
move fillGap to room
2020-03-21 23:40:40 +01:00
Bruno Windels
44760a9f82
Revert "add logging related to fragments"
...
This reverts commit 2f355cabef
.
2020-03-21 10:47:35 +01:00
Bruno Windels
2f355cabef
add logging related to fragments
...
both when rebuilding and when sorting will be used
2020-03-20 20:23:07 +01:00
Bruno Windels
d367037332
very basic support for lazy loading
2019-10-12 20:24:09 +02:00
Bruno Windels
45cd85ead1
fixup: check for event entry with eventType, event isn't exposed anymore
2019-07-29 19:58:35 +02:00
Bruno Windels
8665bcb897
concat synced events in timeline with pending events for local echo
2019-07-29 19:53:58 +02:00
Bruno Windels
9cd5257959
load more events when scrolled to top
2019-06-16 17:29:33 +02:00