feat: pull push gateway URL from environment (#5878)

This commit is contained in:
ggurdin 2026-03-03 16:44:18 -05:00 committed by GitHub
parent a37bd658fc
commit 0332f4a98d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 8 deletions

View file

@ -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',

View file

@ -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'] ??

View file

@ -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,
);
}