Commit graph

24 commits

Author SHA1 Message Date
Michael Telatynski
4941327c78
Avoid using deprecated exports & methods from matrix-js-sdk (#12359) 2024-03-25 12:21:02 +00:00
Timo
372737d075
Always allow call.member events on new rooms (#11948)
* Always allow call.member events on new rooms
This translate to: allow group calls by default

Signed-off-by: Timo K <toger5@hotmail.de>

* fix tests

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
2023-11-28 12:13:31 +00:00
Timo
a26c2d3c78
Add ringing for matrixRTC (#11870)
* Add ringing for matrixRTC
 - since we are using m.mentions we start with the Notifier
 - an event in the Notifier will result in a IncomingCall toast
 -  incomingCallToast is responsible for ringing (as long as one can see the toast it rings)
 This should make sure visual and audio signal are in sync.

Signed-off-by: Timo K <toger5@hotmail.de>

* use typed CallNotifyContent

Signed-off-by: Timo K <toger5@hotmail.de>

* update tests

Signed-off-by: Timo K <toger5@hotmail.de>

* change to callId

Signed-off-by: Timo K <toger5@hotmail.de>

* fix tests

Signed-off-by: Timo K <toger5@hotmail.de>

* only ring in 1:1 calls
notify in rooms < 15 member

Signed-off-by: Timo K <toger5@hotmail.de>

* call_id fallback

Signed-off-by: Timo K <toger5@hotmail.de>

* Update src/Notifier.ts

Co-authored-by: Robin <robin@robin.town>

* review

Signed-off-by: Timo K <toger5@hotmail.de>

* add tests

Signed-off-by: Timo K <toger5@hotmail.de>

* more tests

Signed-off-by: Timo K <toger5@hotmail.de>

* unused import

Signed-off-by: Timo K <toger5@hotmail.de>

* String -> string

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Robin <robin@robin.town>
2023-11-21 17:12:08 +00:00
Michael Telatynski
fd08e74275
Avoid error when DMing oneself (#11754)
* Avoid error when DMing oneself

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update comment

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add test

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2023-10-17 09:37:08 +00:00
Michael Telatynski
033c600fa2
Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
Kerry
a692fe2181
Add .well-known config option to force disable encryption on room creation (#11120)
* force disable encryption on room creation

* test allowChangingEncryption

* move into utils/room directory

* tests

* unit test CreateRoomDialog

* remove debug

* wait for constructor promises to settle

* test case for force_disable

* comment

* set forced value after resolving checkUserIsAllowedToChangeEncryption

* tidy and comments

* use label text in test
2023-06-21 21:50:01 +00:00
Michael Telatynski
6b46d6e4f8
Add MatrixClientPeg::safeGet and use it in tests (#10985) 2023-06-05 18:12:23 +01:00
Michael Telatynski
938aefc51c
Pass around MatrixClients instead of using MatrixClientPeg (#11000) 2023-05-30 10:36:34 +01:00
Florian Duros
db40479910
Element-R: Starting a DMs with a user (#10673)
* Use `cli.getUserDeviceInfo` instead of `cli.downloadKeys` to create a room

* Use `client.getCrypto().getUserDeviceInfo` instead of `client.getUserDeviceInfo`

* Update `createRoom-test.ts` to use `getUserDeviceInfo`

* Remove duplicate  field
2023-04-24 14:19:08 +00:00
Michael Weimann
56423d4d53
Restore createRoom.canEncryptToAllUsers (#10491) 2023-04-03 11:28:17 +02:00
Michael Weimann
dddef858f1
Fix detection of encryption for all users in a room (#10487) 2023-03-31 09:43:47 +02:00
Michael Weimann
c30b2637c5 Changes for v3.69.0 2023-03-28 11:23:16 +01:00
Michael Telatynski
76b82b4b2b
Make more code conform to strict null checks (#10219
* Make more code conform to strict null checks

* Fix types

* Fix tests

* Fix remaining test assertions

* Iterate PR
2023-02-24 15:28:40 +00:00
Michael Weimann
526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Robin
2c612d5aa1
Use native js-sdk group call support (#9625)
* Use native js-sdk group call support

Now that the js-sdk supports group calls natively, our group call implementation can be simplified a bit. Switching to the js-sdk implementation also brings the react-sdk up to date with recent MSC3401 changes, and adds support for joining calls from multiple devices. (So, the previous logic which sent to-device messages to prevent multi-device sessions is no longer necessary.)

* Fix strings

* Fix strict type errors
2022-11-28 16:37:32 -05:00
Michael Telatynski
8b54be6f48
Move from browser-request to fetch (#9345) 2022-10-12 18:59:07 +01:00
Šimon Brandner
26a74a193f
Add Element Call room settings (#9347)
Co-authored-by: Robin <robin@robin.town>
2022-10-07 18:10:17 +00:00
Robin
cb735c9439
Element Call video rooms (#9267)
* Add an element_call_url config option

* Add a labs flag for Element Call video rooms

* Add Element Call as another video rooms backend

* Consolidate event power level defaults

* Remember to clean up participantsExpirationTimer

* Fix a code smell

* Test the clean method

* Fix some strict mode errors

* Test that clean still works when there are no state events

* Test auto-approval of Element Call widget capabilities

* Deduplicate some code to placate SonarCloud

* Fix more strict mode errors

* Test that calls disconnect when leaving the room

* Test the get methods of JitsiCall and ElementCall more

* Test Call.ts even more

* Test creation of Element video rooms

* Test that createRoom works for non-video-rooms

* Test Call's get method rather than the methods of derived classes

* Ensure that the clean method is able to preserve devices

* Remove duplicate clean method

* Fix lints

* Fix some strict mode errors in RoomPreviewCard

* Test RoomPreviewCard changes

* Quick and dirty hotfix for the community testing session

* Revert "Quick and dirty hotfix for the community testing session"

This reverts commit 37056514fbc040aaf1bff2539da770a1c8ba72a2.

* Fix the event schema for org.matrix.msc3401.call.member devices

* Remove org.matrix.call_duplicate_session from Element Call capabilities

It's no longer used by Element Call when running as a widget.

* Replace element_call_url with a map

* Make PiPs work for virtual widgets

* Auto-approve room timeline capability

Because Element Call uses this now

* Create a reusable isVideoRoom util
2022-09-16 11:12:27 -04:00
Robin
0d6a550c33
Prepare for Element Call integration (#9224)
* Improve accessibility and testability of Tooltip

Adding a role to Tooltip was motivated by React Testing Library's
reliance on accessibility-related attributes to locate elements.

* Make the ReadyWatchingStore constructor safer

The ReadyWatchingStore constructor previously had a chance to
immediately call onReady, which was dangerous because it was potentially
calling the derived class's onReady at a point when the derived class
hadn't even finished construction yet. In normal usage, I guess this
never was a problem, but it was causing some of the tests I was writing
to crash. This is solved by separating out the onReady call into a start
method.

* Rename 1:1 call components to 'LegacyCall'

to reflect the fact that they're slated for removal, and to not clash
with the new Call code.

* Refactor VideoChannelStore into Call and CallStore

Call is an abstract class that currently only has a Jitsi
implementation, but this will make it easy to later add an Element Call
implementation.

* Remove WidgetReady, ClientReady, and ForceHangupCall hacks

These are no longer used by the new Jitsi call implementation, and can
be removed.

* yarn i18n

* Delete call map entries instead of inserting nulls

* Allow multiple active calls and consolidate call listeners

* Fix a race condition when creating a video room

* Un-hardcode the media device fallback labels

* Apply misc code review fixes

* yarn i18n

* Disconnect from calls more politely on logout

* Fix some strict mode errors

* Fix another updateRoom race condition
2022-08-30 15:13:39 -04:00
Robin
4dd74261b5
Hide screenshare button in video rooms on Desktop (#9045)
* Hide screenshare button in video rooms on Desktop

* Fix tests
2022-07-12 08:23:35 -04:00
Robin
c180708a17
Revert "Make widgets in video rooms mutable again to de-risk future upgrades" (#8803)
This reverts commit 32f667c633933a1bb095e6dd14e5afba6a5a6294.
2022-06-09 09:56:02 -04:00
Robin
f152310c08
Use random widget IDs for video rooms (#8739) 2022-06-02 09:10:22 -04:00
Robin
658ff4dfe6
Iterate video room designs in labs (#8499)
* Remove blank header from video room view frame

* Add video room option to space context menu

* Remove duplicate tooltips from face piles

* Factor RoomInfoLine out of SpaceRoomView

* Factor RoomPreviewCard out of SpaceRoomView

* Adapt RoomPreviewCard for video rooms

* "New video room" → "Video room"

* Add comment about unused cases in RoomPreviewCard

* Make widgets in video rooms mutable again to de-risk future upgrades

* Ensure that the video channel exists when mounting VideoRoomView
2022-05-04 17:02:06 -04:00
Robin
5fbb25c707
Make Jitsi widgets in video rooms immutable (#8244)
* Make Jitsi widgets in video rooms immutable

* Test video room creation
2022-04-07 07:34:07 -04:00