🐛 Fix message sync

This commit is contained in:
2025-08-10 19:18:55 +08:00
parent 96c7927632
commit 5181897463

View File

@@ -290,6 +290,9 @@ public partial class ChatService(
request.UserIds.AddRange(accountsToNotify.Select(a => a.Id.ToString())); request.UserIds.AddRange(accountsToNotify.Select(a => a.Id.ToString()));
await scopedNty.PushWebSocketPacketToUsersAsync(request); await scopedNty.PushWebSocketPacketToUsersAsync(request);
accountsToNotify = accountsToNotify
.Where(a => a.Id != sender.AccountId.ToString()).ToList();
logger.LogInformation($"Trying to deliver message to {accountsToNotify.Count} accounts..."); logger.LogInformation($"Trying to deliver message to {accountsToNotify.Count} accounts...");
// Only send notifications if there are accounts to notify // Only send notifications if there are accounts to notify
var ntyRequest = new SendPushNotificationToUsersRequest { Notification = notification }; var ntyRequest = new SendPushNotificationToUsersRequest { Notification = notification };