Realtime call participants

🐛 Fix update, delete message wont send websocket packet
This commit is contained in:
2025-05-25 19:48:33 +08:00
parent b4c26f2d55
commit cbe913e535
11 changed files with 3851 additions and 32 deletions

View File

@ -88,8 +88,9 @@ public class RelationshipService(AppDatabase db, ICacheService cache)
var relationship = await GetRelationship(accountId, relatedId, RelationshipStatus.Pending);
if (relationship is null) throw new ArgumentException("Friend request was not found.");
db.AccountRelationships.Remove(relationship);
await db.SaveChangesAsync();
await db.AccountRelationships
.Where(r => r.AccountId == accountId && r.RelatedId == relatedId && r.Status == RelationshipStatus.Pending)
.ExecuteDeleteAsync();
await cache.RemoveAsync($"{UserFriendsCacheKeyPrefix}{accountId}");
await cache.RemoveAsync($"{UserFriendsCacheKeyPrefix}{relatedId}");