Bruno Windels
5e7634506e
Merge branch 'develop' into bwindels/resynconlltoggle
2018-09-26 18:23:07 +01:00
Bruno Windels
ba39b64ced
re-enable test
2018-09-26 18:00:40 +01:00
Bruno Windels
2560ba2980
dont clear the store if its a brand new one
2018-09-26 10:37:52 +01:00
Bruno Windels
1fd8c43d94
fix tests
2018-09-25 18:50:09 +01:00
David Baker
a08a3078da
Revert "room name should only take canonical alias into account"
2018-09-20 11:20:49 +01:00
Bruno Windels
574a6b68ae
Merge pull request #735 from matrix-org/bwindels/fixstalerr
...
Introduce Room.myMembership event
2018-09-19 13:35:11 +02:00
Bruno Windels
fc3a00054f
add test for new event
2018-09-17 19:33:36 +02:00
Bruno Windels
84e41c2ade
fix tests
2018-09-17 18:28:07 +02:00
Bruno Windels
b829a39cd2
fix tests
2018-09-13 09:59:20 +02:00
David Baker
a0639a32c7
Revert "Revert "Don't rely on members to query if syncing user can post to room""
2018-09-06 11:47:40 +01:00
David Baker
04ad3d7c3c
Revert "Don't rely on members to query if syncing user can post to room"
2018-09-05 18:04:19 +01:00
Bruno Windels
8b00083bca
check power levels without relying on membership
...
as this might not be known for the syncing user.
instead, add a method to room which always knows the syncing user's membership
2018-09-05 12:36:53 +02:00
Bruno Windels
3d98e324b5
Merge pull request #719 from matrix-org/bwindels/fixavatars-parttrois
...
Fixes for room.guessDMUserId
2018-09-04 18:17:39 +02:00
Bruno Windels
768c66313f
remove unneeded async keywords
2018-09-04 18:09:47 +02:00
Bruno Windels
a3567f0918
some tests for room.guessDMUserId()
2018-09-04 13:01:45 +02:00
Bruno Windels
1239485b30
fix test
2018-08-30 15:42:15 +02:00
David Baker
60c01d7869
Revert b0b0291 and a6de395
...
To make tests pass again
2018-08-30 12:03:53 +01:00
Matthew Hodgson
a6de395cde
unbreak tests from b0b0291bc7
2018-08-28 18:03:59 +01:00
Bruno Windels
21e0c79f7d
Revert "Revert "Lazy loading: don't block on setting up room crypto""
...
This reverts commit 5cf2ebea4f .
2018-08-27 10:54:08 +02:00
Bruno Windels
5cf2ebea4f
Revert "Lazy loading: don't block on setting up room crypto"
2018-08-23 14:05:57 +02:00
Bruno Windels
e3d108454c
fix test
2018-08-22 23:25:37 +02:00
Bruno Windels
482eab0e2a
fix tests
2018-08-15 12:01:26 +02:00
Bruno Windels
07e87915ba
fix and add tests
2018-08-15 12:01:26 +02:00
Bruno Windels
827db37eef
fixup
2018-08-15 12:01:26 +02:00
Bruno Windels
864ea749e5
Move /members fetching to room as getEncryptionTargetMembers needs it
2018-08-15 12:01:26 +02:00
Bruno Windels
f261599435
fix lint
2018-08-15 12:00:38 +02:00
Bruno Windels
c0f706a2a2
move userId into room
2018-08-15 12:00:38 +02:00
Bruno Windels
bb490faefe
fix lint
2018-08-15 11:59:40 +02:00
Bruno Windels
d8f673ed51
make sure invited count cache gets reset when updating member
2018-08-15 11:59:40 +02:00
Bruno Windels
6ce7170cf4
counts from summary api should override count members manually as members might not be complete
2018-08-15 11:59:40 +02:00
Bruno Windels
cf08901d02
fix lint
2018-08-15 11:59:40 +02:00
Bruno Windels
230a9311a0
actually need to subtract one from join+invite count as that includes the syncing user
2018-08-15 11:59:40 +02:00
Bruno Windels
20b4285849
add some tests for room name based on room summary + fix because it was actually broken
2018-08-15 11:59:40 +02:00
Bruno Windels
d67bdbf088
test accumulating summary fields
2018-08-15 11:59:40 +02:00
Bruno Windels
3a389793ff
fix sync accumulator test to include summary
2018-08-15 11:59:40 +02:00
Bruno Windels
f5ff5dc3e0
Fix name recalculation tests by not relying on mocking
...
I tried keeping the mocking but it would take too much
boilerplate code to make the tests work again, and even more
to write the tests for room name with lazy loading.
Just testing everything with a real implementation is not really
a unit test any more, but proved way easier.
It'll be somewhat annoying these tests will fail if there is
something wrong in roomstate (not room), but that's the trade-off
2018-08-15 11:59:40 +02:00
Bruno Windels
00bf5bdf69
unify member a bit access towards getMember
...
some tests for mock getMember, some for .members
if you use either in the code (as I did for room display name changes)
tests start playing and you play whack-a-mole switching between
both ways of accessing the members in a room.
lets start using one way so mocking becomes easier,
and besides, accessing an object internal members is not the best idea.
2018-08-15 11:59:40 +02:00
Bruno Windels
097e7df7c9
fix lint
2018-08-15 11:59:40 +02:00
Bruno Windels
5fcf9481b3
fix room not having access to event mapper + tests
2018-08-15 11:59:39 +02:00
Bruno Windels
48c3dcc08a
fix lint & fix and add tests
2018-08-15 11:59:39 +02:00
Bruno Windels
df758b31b7
fix lint
2018-08-15 11:59:39 +02:00
Bruno Windels
9f08bfaa6f
room lazy loading tests + fix
2018-08-15 11:59:39 +02:00
Bruno Windels
198d2c780d
test that modifications to clone'd() room state dont affect the old
2018-08-15 11:59:39 +02:00
Bruno Windels
0234f11914
some tests for room member + state, and some fixes to make them pass
2018-08-15 11:59:39 +02:00
Bruno Windels
9ec6ea3bdf
2, not 3 times
2018-08-15 11:59:39 +02:00
Bruno Windels
1ce580bba3
test lazy loaded info is returned and then discarded when setting a state event
2018-08-15 11:59:39 +02:00
Bruno Windels
1c81a17298
Fix tests
...
getSentinelMember now does return a member (with just the userid) when there is no corresponding member yet.
With lazy loading it's perfectly possible the member is not available, and null breaks continuation in the timeline.
2018-08-15 11:59:39 +02:00
Bruno Windels
e3e48944e0
add test
2018-07-27 11:49:55 +02:00
David Baker
16c062c069
Start first incremental sync request early ( #629 )
...
* Start first incremental sync request early
So it can run while we process our sync data.
2018-03-16 15:22:06 +00:00
David Baker
a0578efeb9
fix tests
2018-03-08 13:52:48 +00:00