Load focus information from well known and use client config only as a fallback. (#2358)

* Load focus information from well known and use client config only as a fallback.

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
This commit is contained in:
Timo
2024-06-19 16:41:52 +02:00
committed by GitHub
parent 09ca3b4dc0
commit 812ae2ce89
15 changed files with 346 additions and 173 deletions

View File

@@ -217,8 +217,6 @@ export const useLoadGroupCall = (
"Room not found. The widget-api did not pass over the relevant room events/information.",
);
// If the room does not exist we first search for it with viaServers
const roomSummary = await client.getRoomSummary(roomId, viaServers);
if (membership === KnownMembership.Ban) {
throw bannedError();
} else if (membership === KnownMembership.Invite) {
@@ -226,6 +224,8 @@ export const useLoadGroupCall = (
viaServers,
});
} else {
// If the room does not exist we first search for it with viaServers
const roomSummary = await client.getRoomSummary(roomId, viaServers);
if (roomSummary.join_rule === JoinRule.Public) {
room = await client.joinRoom(roomSummary.room_id, {
viaServers,