Skip to content

Commit

Permalink
Merge pull request #476 from pangeachat/no-subspace-welcome-chat
Browse files Browse the repository at this point in the history
No subspace welcome chat
  • Loading branch information
ggurdin authored Jul 16, 2024
2 parents ba652bb + 37f0c81 commit 3193958
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion lib/pages/login/login_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class LoginView extends StatelessWidget {
controller.showPassword
? Icons.visibility_off_outlined
: Icons.visibility_outlined,
color: Colors.black,
// color: Colors.black,
),
),
),
Expand Down
14 changes: 0 additions & 14 deletions lib/pages/new_space/new_space.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,6 @@ class NewSpaceController extends State<NewSpace> {
if (capacity != null && space != null) {
space.updateRoomCapacity(capacity);
}
final newChatRoomId = await Matrix.of(context).client.createGroupChat(
enableEncryption: false,
preset: sdk.CreateRoomPreset.publicChat,
// Welcome chat name is '[space name acronym]: Welcome Chat'
groupName:
'${nameController.text.trim().split(RegExp(r"\s+")).map((s) => s[0]).join()}: ${L10n.of(context)!.classWelcomeChat}',
);
GoogleAnalytics.createChat(newChatRoomId);

final Room? room = Matrix.of(context).client.getRoomById(spaceId);
if (room == null) {
Expand All @@ -217,12 +209,6 @@ class NewSpaceController extends State<NewSpace> {
return;
}

room.setSpaceChild(newChatRoomId, suggested: true);
GoogleAnalytics.addParent(
newChatRoomId,
room.classCode,
);

GoogleAnalytics.createClass(room.name, room.classCode);
try {
await room.invite(BotName.byEnvironment);
Expand Down

0 comments on commit 3193958

Please sign in to comment.