From 0eeafb53528810e6838ab4bbd3ac22cea49e5924 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 9 Sep 2025 00:01:56 +0800 Subject: [PATCH] :necktie: Update the automated status logic --- DysonNetwork.Pass/Account/AccountCurrentController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DysonNetwork.Pass/Account/AccountCurrentController.cs b/DysonNetwork.Pass/Account/AccountCurrentController.cs index bdc8d7a7..19e71d10 100644 --- a/DysonNetwork.Pass/Account/AccountCurrentController.cs +++ b/DysonNetwork.Pass/Account/AccountCurrentController.cs @@ -239,7 +239,7 @@ public class AccountCurrentController( .Where(s => s.ClearedAt == null || s.ClearedAt > now) .OrderByDescending(s => s.CreatedAt) .FirstOrDefaultAsync(); - if (existingStatus is not null) + if (existingStatus is not null && existingStatus.IsAutomated) if (existingStatus.IsAutomated && request.AppIdentifier == existingStatus.AppIdentifier) { existingStatus.Attitude = request.Attitude; @@ -256,6 +256,8 @@ public class AccountCurrentController( db.Update(existingStatus); await db.SaveChangesAsync(); } + else if (existingStatus is not null) + return Ok(existingStatus); // Do not override manually set status with automated ones } var status = new Status