feat: pull push gateway URL from environment (#5878)
This commit is contained in:
parent
a37bd658fc
commit
0332f4a98d
3 changed files with 13 additions and 8 deletions
|
|
@ -23,14 +23,11 @@ enum AppSettings<T> {
|
|||
showNoGoogle<bool>('chat.fluffy.show_no_google', false),
|
||||
unifiedPushRegistered<bool>('chat.fluffy.unifiedpush.registered', false),
|
||||
unifiedPushEndpoint<String>('chat.fluffy.unifiedpush.endpoint', ''),
|
||||
pushNotificationsGatewayUrl<String>(
|
||||
'pushNotificationsGatewayUrl',
|
||||
// #Pangea
|
||||
// 'https://push.fluffychat.im/_matrix/push/v1/notify',
|
||||
'https://sygnal.pangea.chat/_matrix/push/v1/notify',
|
||||
// Pangea#
|
||||
),
|
||||
// #Pangea
|
||||
// pushNotificationsGatewayUrl<String>(
|
||||
// 'pushNotificationsGatewayUrl',
|
||||
// 'https://push.fluffychat.im/_matrix/push/v1/notify',
|
||||
// ),
|
||||
// pushNotificationsPusherFormat<String>(
|
||||
// 'pushNotificationsPusherFormat',
|
||||
// 'event_id_only',
|
||||
|
|
|
|||
|
|
@ -81,6 +81,10 @@ class Environment {
|
|||
return envEntry;
|
||||
}
|
||||
|
||||
static String get pushGatewayUrl => isStagingEnvironment
|
||||
? 'https://sygnal.staging.pangea.chat/_matrix/push/v1/notify'
|
||||
: 'https://sygnal.pangea.chat/_matrix/push/v1/notify';
|
||||
|
||||
static String get choreoApiKey {
|
||||
return appConfigOverride?.choreoApiKey ??
|
||||
dotenv.env['CHOREO_API_KEY'] ??
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import 'package:unifiedpush_ui/unifiedpush_ui.dart';
|
|||
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:fluffychat/main.dart';
|
||||
import 'package:fluffychat/pangea/common/config/environment.dart';
|
||||
import 'package:fluffychat/pangea/common/utils/error_handler.dart';
|
||||
import 'package:fluffychat/pangea/common/utils/firebase_analytics.dart';
|
||||
import 'package:fluffychat/pangea/join_codes/knock_room_extension.dart';
|
||||
|
|
@ -523,7 +524,10 @@ class BackgroundPush {
|
|||
}
|
||||
}
|
||||
await setupPusher(
|
||||
gatewayUrl: AppSettings.pushNotificationsGatewayUrl.value,
|
||||
// #Pangea
|
||||
// gatewayUrl: AppSettings.pushNotificationsGatewayUrl.value,
|
||||
gatewayUrl: Environment.pushGatewayUrl,
|
||||
// Pangea#
|
||||
token: _fcmToken,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue