♻️ Refactored activities

This commit is contained in:
2025-06-08 23:52:02 +08:00
parent 39533cced3
commit b8341734df
11 changed files with 3512 additions and 292 deletions

View File

@ -13,7 +13,6 @@ namespace DysonNetwork.Sphere.Account;
public class AccountEventService(
AppDatabase db,
ActivityService act,
WebSocketService ws,
ICacheService cache,
PaymentService payment,
@ -86,13 +85,6 @@ public class AccountEventService(
db.AccountStatuses.Add(status);
await db.SaveChangesAsync();
await act.CreateActivity(
user,
"accounts.status",
$"account.statuses/{status.Id}",
ActivityVisibility.Friends
);
return status;
}
@ -220,13 +212,6 @@ public class AccountEventService(
db.AccountCheckInResults.Add(result);
await db.SaveChangesAsync(); // Don't forget to save changes to the database
await act.CreateActivity(
user,
"accounts.check-in",
$"account.check-in/{result.Id}",
ActivityVisibility.Friends
);
// The lock will be automatically released by the await using statement
return result;
}