Skip to content

Commit

Permalink
fix: Public rooms always publicly visible even when turned off on cre…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
krille-chan committed Oct 3, 2024
1 parent 83fb1ed commit c1f8b13
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/pages/new_group/new_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class NewGroupController extends State<NewGroup> {

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,
Expand All @@ -77,12 +77,6 @@ class NewGroupController extends State<NewGroup> {
],
);
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);
Expand Down

0 comments on commit c1f8b13

Please sign in to comment.