Contributing: Note that rebase lets you mass signoff commits
replace find loop + slice with a single filter. More readable
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
keep public APIs consistent with previous behaviour now that its fuzzy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
make tests not fail, because of order of occurrence
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
do falsey displayname check regardless of whether we have roomstate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
add tests for the fuzzy disambiguation between members in a room
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
remove duplicated call
Much of this transformation has been done automatically:
* add expect import to each file
* replace `not.to` with `toNot`
* replace `to[Not]Be{Undefined,Null}` with equivalents
* replace `jasmine.createSpy(...)` with `except.createSpy`, and `andCallFake`
with `andCall`
Also:
* replace `jasmine.createSpyObj` with manual alternatives
* replace `jasmine.Clock` with `lolex`
Remove some we don't care about. Set some other ones we do care
about but don't currently adhere to to warn. Set the max warnings
threshold to the current number of warnings, so we don't introduce
more of them. Fix a bunch of legit lint errors and add exceptions
to various places in the test code that does funny things with
'this'.
Reduces initial sync times from ~30s to ~1s on accounts with heavily
populated rooms.
The problem was that f.e. RoomMember it would try to calculate the
display name, which involved looping each RoomMember to get their
display name to check for disambiguation. We now cache display names
to user IDs so we don't need to loop every member when disambiguating.