David Baker
c556ca40b1
Support Olm with WebAssembly
...
wasm Olm has a new interface: it now has an init method that needs
to be called and the promise it returns waited on before the Olm
module is used. Support that, and allow Crypto etc to be imported
whether Olm is enabled or not. Change whether olm is enabled to
be async since now it will be unavailable if the async module init
fails. Don't call getOlmVersion() until the Olm.init() is done.
2018-09-25 17:49:54 +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
David Baker
2f4c1dfcc4
Test all 3 code paths on backup restore
2018-09-18 17:33:47 +01:00
David Baker
e4bb37b1a8
Fix lint mostly
2018-09-18 14:53:59 +01:00
David Baker
54c443ac68
Make tests pass
2018-09-18 14:48:02 +01: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
72bd51f26e
Merge remote-tracking branch 'origin/develop' into uhoreg-e2e_backups
2018-09-11 12:02:47 +01: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
David Baker
ec5fff2046
Merge branch 'e2e_backups' of git://github.com/uhoreg/matrix-js-sdk into uhoreg-e2e_backups
2018-08-24 13:29:29 +01:00
Bruno Windels
5cf2ebea4f
Revert "Lazy loading: don't block on setting up room crypto"
2018-08-23 14:05:57 +02:00
Hubert Chathi
73e294b1bd
add copyright header to backup.spec
2018-08-23 00:29:29 -04:00
Hubert Chathi
75107f99b2
pass in key rather than decryption object to restoreKeyBackups
2018-08-23 00:26:21 -04:00
Hubert Chathi
1faf477537
fix formatting and fix authedRequest usage
2018-08-22 23:58:59 -04: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