diff --git a/lib/config/routes.dart b/lib/config/routes.dart index b448097dc..8f92d4c6d 100644 --- a/lib/config/routes.dart +++ b/lib/config/routes.dart @@ -346,7 +346,6 @@ abstract class AppRoutes { shareItems ??= []; shareItems.add(TextShareItem(body)); } - final userId = state.uri.queryParameters['userId']; return defaultPageBuilder( context, state, @@ -354,7 +353,6 @@ abstract class AppRoutes { roomId: state.pathParameters['roomid']!, shareItems: shareItems, eventId: state.uri.queryParameters['event'], - userId: userId, ), ); }, diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index ef701797d..54f6010cc 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -46,21 +46,16 @@ class ChatPage extends StatelessWidget { final String roomId; final List? shareItems; final String? eventId; - final String? userId; const ChatPage({ super.key, required this.roomId, this.eventId, this.shareItems, - this.userId, }); @override Widget build(BuildContext context) { - if (userId != null) { - Matrix.of(context).setActiveClientWithUserId(userId!); - } final room = Matrix.of(context).client.getRoomById(roomId); if (room == null) { return Scaffold( diff --git a/lib/widgets/local_notifications_extension.dart b/lib/widgets/local_notifications_extension.dart index aa738e711..4d2b09721 100644 --- a/lib/widgets/local_notifications_extension.dart +++ b/lib/widgets/local_notifications_extension.dart @@ -148,10 +148,10 @@ extension LocalNotificationsExtension on MatrixState { break; case DesktopNotificationActions.openChat: if (userId != null) { - FluffyChatApp.router.go('/rooms/${event.room.id}?userId=$userId'); - } else { - FluffyChatApp.router.go('/rooms/${event.room.id}'); + Matrix.of(context).setActiveClientWithUserId(userId); } + + FluffyChatApp.router.go('/rooms/${event.room.id}'); break; } });