File compression duplicate

This commit is contained in:
2025-05-01 19:19:58 +08:00
parent 0f9e865c0b
commit b1543f5b08
16 changed files with 185 additions and 1798 deletions

View File

@ -22,7 +22,6 @@ public class MagicSpellService(AppDatabase db, EmailService email, ILogger<Magic
Type = type,
ExpiresAt = expiredAt,
AffectedAt = affectedAt,
Account = account,
AccountId = account.Id,
Meta = meta
};

View File

@ -42,7 +42,7 @@ public class NotificationService
: ApnServerType.Development
}, clientFactory.CreateClient());
}
// TODO remove all push notification with this device id when this device is logged out
public async Task<NotificationPushSubscription> SubscribePushNotification(
@ -101,16 +101,13 @@ public class NotificationService
Subtitle = subtitle,
Content = content,
Meta = meta,
Account = account,
AccountId = account.Id,
};
_db.Add(notification);
await _db.SaveChangesAsync();
#pragma warning disable CS4014
if (!isSilent) DeliveryNotification(notification);
#pragma warning restore CS4014
if (!isSilent) _ = DeliveryNotification(notification).ConfigureAwait(false);
return notification;
}

View File

@ -42,9 +42,7 @@ public class RelationshipService(AppDatabase db, PermissionService pm, IMemoryCa
var relationship = new Relationship
{
Account = sender,
AccountId = sender.Id,
Related = target,
RelatedId = target.Id,
Status = status
};
@ -66,9 +64,7 @@ public class RelationshipService(AppDatabase db, PermissionService pm, IMemoryCa
var relationship = new Relationship
{
Account = sender,
AccountId = sender.Id,
Related = target,
RelatedId = target.Id,
Status = RelationshipStatus.Pending,
ExpiredAt = Instant.FromDateTimeUtc(DateTime.UtcNow.AddDays(7))
@ -96,9 +92,7 @@ public class RelationshipService(AppDatabase db, PermissionService pm, IMemoryCa
var relationshipBackward = new Relationship
{
Account = relationship.Related,
AccountId = relationship.RelatedId,
Related = relationship.Account,
RelatedId = relationship.AccountId,
Status = status
};