Skip to content

Commit

Permalink
init sentry user info on app launch
Browse files Browse the repository at this point in the history
  • Loading branch information
ggurdin committed May 7, 2024
1 parent a23afbd commit 9dd22ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/pangea/controllers/pangea_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ class PangeaController {
_logOutfromPangea();
}
Sentry.configureScope(
(scope) => scope.setUser(SentryUser(id: matrixState.client.userID)),
(scope) => scope.setUser(
SentryUser(
id: matrixState.client.userID,
name: matrixState.client.userID,
),
),
);
GoogleAnalytics.analyticsUserUpdate(matrixState.client.userID);
}
Expand Down
9 changes: 9 additions & 0 deletions lib/widgets/matrix.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import 'package:intl/intl.dart';
import 'package:matrix/encryption.dart';
import 'package:matrix/matrix.dart';
import 'package:provider/provider.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:universal_html/html.dart' as html;
import 'package:url_launcher/url_launcher_string.dart';
Expand Down Expand Up @@ -241,6 +242,14 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
}
initLoadingDialog();
// #Pangea
Sentry.configureScope(
(scope) => scope.setUser(
SentryUser(
id: client.userID,
name: client.userID,
),
),
);
pangeaController = PangeaController(matrix: widget, matrixState: this);
// PAuthGaurd.isLogged = client.isLogged();
// Pangea#
Expand Down

0 comments on commit 9dd22ef

Please sign in to comment.