mirror of
https://github.com/bitwarden/server.git
synced 2024-11-23 12:25:16 +01:00
Remove FCMv1 feature flag (#5030)
* Remove FCMv1 feature flag * Killed a using
This commit is contained in:
parent
a26ba3b330
commit
dfbc400520
@ -111,7 +111,6 @@ public static class FeatureFlagKeys
|
|||||||
public const string AC1795_UpdatedSubscriptionStatusSection = "AC-1795_updated-subscription-status-section";
|
public const string AC1795_UpdatedSubscriptionStatusSection = "AC-1795_updated-subscription-status-section";
|
||||||
public const string EmailVerification = "email-verification";
|
public const string EmailVerification = "email-verification";
|
||||||
public const string EmailVerificationDisableTimingDelays = "email-verification-disable-timing-delays";
|
public const string EmailVerificationDisableTimingDelays = "email-verification-disable-timing-delays";
|
||||||
public const string AnhFcmv1Migration = "anh-fcmv1-migration";
|
|
||||||
public const string ExtensionRefresh = "extension-refresh";
|
public const string ExtensionRefresh = "extension-refresh";
|
||||||
public const string RestrictProviderAccess = "restrict-provider-access";
|
public const string RestrictProviderAccess = "restrict-provider-access";
|
||||||
public const string PM4154BulkEncryptionService = "PM-4154-bulk-encryption-service";
|
public const string PM4154BulkEncryptionService = "PM-4154-bulk-encryption-service";
|
||||||
|
@ -4,7 +4,6 @@ using Bit.Core.Repositories;
|
|||||||
using Bit.Core.Services;
|
using Bit.Core.Services;
|
||||||
using Bit.Core.Settings;
|
using Bit.Core.Settings;
|
||||||
using Microsoft.Azure.NotificationHubs;
|
using Microsoft.Azure.NotificationHubs;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace Bit.Core.NotificationHub;
|
namespace Bit.Core.NotificationHub;
|
||||||
@ -60,21 +59,10 @@ public class NotificationHubPushRegistrationService : IPushRegistrationService
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case DeviceType.Android:
|
case DeviceType.Android:
|
||||||
var featureService = _serviceProvider.GetRequiredService<IFeatureService>();
|
|
||||||
if (featureService.IsEnabled(FeatureFlagKeys.AnhFcmv1Migration))
|
|
||||||
{
|
|
||||||
payloadTemplate = "{\"message\":{\"data\":{\"type\":\"$(type)\",\"payload\":\"$(payload)\"}}}";
|
payloadTemplate = "{\"message\":{\"data\":{\"type\":\"$(type)\",\"payload\":\"$(payload)\"}}}";
|
||||||
messageTemplate = "{\"message\":{\"data\":{\"type\":\"$(type)\"}," +
|
messageTemplate = "{\"message\":{\"data\":{\"type\":\"$(type)\"}," +
|
||||||
"\"notification\":{\"title\":\"$(title)\",\"body\":\"$(message)\"}}}";
|
"\"notification\":{\"title\":\"$(title)\",\"body\":\"$(message)\"}}}";
|
||||||
installation.Platform = NotificationPlatform.FcmV1;
|
installation.Platform = NotificationPlatform.FcmV1;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
payloadTemplate = "{\"data\":{\"data\":{\"type\":\"#(type)\",\"payload\":\"$(payload)\"}}}";
|
|
||||||
messageTemplate = "{\"data\":{\"data\":{\"type\":\"#(type)\"}," +
|
|
||||||
"\"notification\":{\"title\":\"$(title)\",\"body\":\"$(message)\"}}}";
|
|
||||||
installation.Platform = NotificationPlatform.Fcm;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case DeviceType.iOS:
|
case DeviceType.iOS:
|
||||||
payloadTemplate = "{\"data\":{\"type\":\"#(type)\",\"payload\":\"$(payload)\"}," +
|
payloadTemplate = "{\"data\":{\"type\":\"#(type)\",\"payload\":\"$(payload)\"}," +
|
||||||
|
Loading…
Reference in New Issue
Block a user