* Send call version `1` as a string (#2471)
* test typescriptification - backup.spec (#2468)
* renamed: spec/unit/crypto/crypto-utils.js -> spec/unit/crypto/crypto-utils.ts
* ts fixes in crypto-utils
* renamed: spec/unit/crypto/backup.spec.js -> spec/unit/crypto/backup.spec.ts
* ts fixes in backup.spec
* remove fit
* remove debug
* Prepare changelog for v19.0.0-rc.1
* v19.0.0-rc.1
* Update jest monorepo (#2476)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update all (#2475)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update dependency @types/jest to v28 (#2478)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Fix call.collectCallStats() (#2480)
Regressed by https://github.com/matrix-org/matrix-js-sdk/pull/2352
(you can just use RTCStatsReport as an iterator directly (which
was was what that code was doing before) which uses entries(
which gives you key/value pairs, but using forEach gives you just
the value.
* Go back to forEach in collectcallstats (#2481)
Older typescript library doesn't know about .values() on the stats
object, so it was failing in react sdk which had an older typescript.
https://github.com/matrix-org/matrix-react-sdk/pull/8935 was an
attempt to upgrade it but did not seem to be helping on CI, despite
being fine locally.
* Update babel monorepo to v7.18.6 (#2477)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Expose KNOWN_SAFE_ROOM_VERSION (#2474)
* Fix return type on funcs in matrixClient to be optionally null (#2488)
* Update pull_request.yaml (#2490)
* Lock file maintenance (#2491)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Prepare changelog for v19.0.0
* v19.0.0
* Resetting package fields for development
* Improve VoIP integrations testing (#2495)
* Remove MSC3244 support (#2504)
* Actually store the identity server in the client when given as an option (#2503)
* Actually store the identity server in the client when given as an option
* Update requestRegisterEmailToken to a modern spec version too
* Properly re-insert room ID in bundled thread relation messages from sync (#2505)
Events returned by the `/sync` endpoint, including relations bundled with other events, may have their `room_id`s stripped out. This causes decryption errors if the IDs aren't repopulated.
Fixesvector-im/element-web#22094.
* Remove `setNow` from `realtime-callbacks.ts` (#2509)
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
* Remove dead code (#2510)
* Don't crash with undefined room in `processBeaconEvents()` (#2500)
* Add a basic PR checklist for all PRs (#2511)
It'll be mildly annoying for core developers who have to constantly remove or edit this, but it'll also serve as a good reminder to do these things.
Note that signoff is not required for core developers.
* Fix tests
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
Co-authored-by: Kerry <kerrya@element.io>
Co-authored-by: RiotRobot <releases@riot.im>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Weimann <michaelw@matrix.org>
Co-authored-by: texuf <texuf.eth@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Travis Ralston <travisr@matrix.org>
Co-authored-by: Faye Duxovni <fayed@element.io>
* Fix some MatrixCall leaks and use a shared AudioContext
These leaks, combined with the dozens of AudioContexts floating around in memory across different CallFeeds, could cause some really bad performance issues and audio crashes on Chrome.
* Fully release the AudioContext in CallFeed's dispose method
* Fix tests
* More sonar tweaks and typing improvements
* delint
* Write some tests
* Attempt to make TS happy
* Stash tests
* Add tests
* Add `istanbul ignore if` around logging special-case for test env
* Add test
* Comments
* Add PTT call mode & mute by default in PTT calls (#2311)
No other parts of PTT calls implemented yet
* Make the tests pass again (#2316)
3280394bf9
made call use a bunch of methods that weren't mocked in the tests.
* Add maximum trasmit time for PTT (#2312)
on sender side by muting mic after the max transmit time has elapsed.
* Don't allow user to unmute if another user is speaking (#2313)
* Add maximum trasmit time for PTT
on sender side by muting mic after the max transmit time has elapsed.
* Don't allow user to unmute if another user is speaking
Based on https://github.com/matrix-org/matrix-js-sdk/pull/2312
For https://github.com/vector-im/element-call/issues/298
* Fix createGroupCall arguments (#2325)
Comma instead of a colon...
The main bug here was a race on the callee side because we await-ed
on setRemoteDescription before setting the opponent party ID, and
while we were await-ing, the callEventHandler could give us candidate
events which we'd duly ignore because we thought the party ID didn't
match.
This also meant that any candidates that arrived before the answer
would have been ignored. Save these up by party ID and then add the
ones from the party ID that we pick once the answer comes in.
Also fix the confusion on party IDs where we weren't sure whether
we hadn't picked an opponent or we'd picked an opponent without a
party ID. It's now undefined for the former and null for the latter,
as it claims to be in the comment.
Don't send events all the way via the mock HTTP backend: we're not
trying to test that here. This meant we weren't actually getting
into the right state because the request to send the invite never
actually returned. Now this works, we need to clear the invite timer
otherwise jest has a timer hanging around at the end of the test
(plus we should be doing it anyway).
Typescript tests basically just appear to work, apart from needing
the jest types imported so the typescript checker knows what's what.
DConvert the webrtc test to typescript, which actually mostly just
serves to point out that we're not mocking the whole of `document`,
but oh well.