diff --git a/Iceshrimp.Backend/Core/Services/MetaService.cs b/Iceshrimp.Backend/Core/Services/MetaService.cs index b8e15132..ebe0129d 100644 --- a/Iceshrimp.Backend/Core/Services/MetaService.cs +++ b/Iceshrimp.Backend/Core/Services/MetaService.cs @@ -1,4 +1,3 @@ -using EntityFramework.Exceptions.Common; using Iceshrimp.Backend.Core.Database; using Iceshrimp.Backend.Core.Database.Tables; using Microsoft.EntityFrameworkCore; diff --git a/Iceshrimp.Backend/Core/Services/PushService.cs b/Iceshrimp.Backend/Core/Services/PushService.cs index 5e9ca378..20ce6a85 100644 --- a/Iceshrimp.Backend/Core/Services/PushService.cs +++ b/Iceshrimp.Backend/Core/Services/PushService.cs @@ -21,8 +21,7 @@ public class PushService( ILogger logger, IServiceScopeFactory scopeFactory, HttpClient httpClient, - IOptions config, - MetaService meta + IOptions config ) : BackgroundService { protected override Task ExecuteAsync(CancellationToken stoppingToken) @@ -86,6 +85,7 @@ public class PushService( if (body.Length > 137) body = body.Truncate(137).TrimEnd() + "..."; + var meta = scope.ServiceProvider.GetRequiredService(); var (priv, pub) = await meta.GetMany(MetaEntity.VapidPrivateKey, MetaEntity.VapidPublicKey); var client = new WebPushClient(httpClient);