From c1f8b13aca0aed71ea0d16a56032aba5068ee8c0 Mon Sep 17 00:00:00 2001 From: krille-chan Date: Thu, 3 Oct 2024 12:07:34 +0200 Subject: [PATCH] fix: Public rooms always publicly visible even when turned off on creation --- lib/pages/new_group/new_group.dart | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/pages/new_group/new_group.dart b/lib/pages/new_group/new_group.dart index 83a8b478e0..107d3661b5 100644 --- a/lib/pages/new_group/new_group.dart +++ b/lib/pages/new_group/new_group.dart @@ -63,7 +63,7 @@ class NewGroupController extends State { final roomId = await client.createGroupChat( visibility: - publicGroup ? sdk.Visibility.public : sdk.Visibility.private, + groupCanBeFound ? sdk.Visibility.public : sdk.Visibility.private, preset: publicGroup ? sdk.CreateRoomPreset.publicChat : sdk.CreateRoomPreset.privateChat, @@ -77,12 +77,6 @@ class NewGroupController extends State { ], ); if (!mounted) return; - if (publicGroup && groupCanBeFound) { - await client.setRoomVisibilityOnDirectory( - roomId, - visibility: sdk.Visibility.public, - ); - } context.go('/rooms/$roomId/invite'); } catch (e, s) { sdk.Logs().d('Unable to create group', e, s);