Merge pull request #851 from pangeachat/sentry
fixed error in server mixup test
This commit is contained in:
commit
960d7f3648
1 changed files with 8 additions and 6 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:collection/collection.dart';
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pangea/config/environment.dart';
|
||||
import 'package:fluffychat/pangea/controllers/language_list_controller.dart';
|
||||
import 'package:fluffychat/pangea/utils/error_handler.dart';
|
||||
import 'package:fluffychat/pangea/utils/firebase_analytics.dart';
|
||||
|
|
@ -105,13 +106,14 @@ Future<void> startGui(List<Client> clients, SharedPreferences store) async {
|
|||
// errors seems to happen a lot when users switch better production / staging
|
||||
// while testing by accident. If the account is a production account but server is
|
||||
// staging or vice versa, logout.
|
||||
// final isStagingUser = firstClient?.userID?.domain?.contains("staging");
|
||||
// final isStagingServer = Environment.isStaging;
|
||||
// if (isStagingServer != isStagingUser) {
|
||||
// await firstClient?.logout();
|
||||
// }
|
||||
if (firstClient?.userID?.domain != null) {
|
||||
final isStagingUser = firstClient!.userID!.domain!.contains("staging");
|
||||
final isStagingServer = Environment.isStaging;
|
||||
if (isStagingServer != isStagingUser) {
|
||||
await firstClient.logout();
|
||||
}
|
||||
}
|
||||
// Pangea#
|
||||
|
||||
runApp(FluffyChatApp(clients: clients, pincode: pin, store: store));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue