♻️ No idea, but errors all gone

This commit is contained in:
2025-07-08 23:55:31 +08:00
parent 2c67472894
commit 63b2b989ba
74 changed files with 1551 additions and 1100 deletions

View File

@@ -1,6 +1,7 @@
using System.Text.RegularExpressions;
using DysonNetwork.Shared.Cache;
using DysonNetwork.Shared.Models;
using DysonNetwork.Shared.Localization;
using DysonNetwork.Shared.Services;
using DysonNetwork.Sphere.Connection.WebReader;
using DysonNetwork.Sphere.Localization;
using DysonNetwork.Sphere.Publisher;
@@ -158,14 +159,13 @@ public partial class PostService(
var sender = post.Publisher;
using var scope = factory.CreateScope();
var pub = scope.ServiceProvider.GetRequiredService<PublisherService>();
var nty = scope.ServiceProvider.GetRequiredService<NotificationService>();
var logger = scope.ServiceProvider.GetRequiredService<ILogger<PostService>>();
var nty = scope.ServiceProvider.GetRequiredService<INotificationService>();
try
{
var members = await pub.GetPublisherMembers(post.RepliedPost.PublisherId);
foreach (var member in members)
{
AccountService.SetCultureInfo(member.Account);
CultureInfoService.SetCultureInfo(member.Account);
var (_, content) = ChopPostForNotification(post);
await nty.SendNotification(
member.Account,
@@ -439,14 +439,14 @@ public partial class PostService(
{
using var scope = factory.CreateScope();
var pub = scope.ServiceProvider.GetRequiredService<PublisherService>();
var nty = scope.ServiceProvider.GetRequiredService<NotificationService>();
var nty = scope.ServiceProvider.GetRequiredService<INotificationService>();
var logger = scope.ServiceProvider.GetRequiredService<ILogger<PostService>>();
try
{
var members = await pub.GetPublisherMembers(post.PublisherId);
foreach (var member in members)
{
AccountService.SetCultureInfo(member.Account);
CultureInfoService.SetCultureInfo(member.Account);
await nty.SendNotification(
member.Account,
"posts.reactions.new",