fix searching of push tokens

This commit is contained in:
Artemy
2026-03-01 19:17:54 +07:00
parent dc6bf14e43
commit ecb9f4581d
5 changed files with 946 additions and 11 deletions
@@ -54,7 +54,7 @@ public class PushTokenRepository : IPushTokenRepository
{
if (userId == Guid.Empty)
throw new ArgumentException("UserId cannot be empty", nameof(userId));
if (string.IsNullOrWhiteSpace(token))
throw new ArgumentException("Token cannot be empty", nameof(token));
@@ -62,7 +62,7 @@ public class PushTokenRepository : IPushTokenRepository
throw new ArgumentException("Platform cannot be empty", nameof(platform));
var existing = await _context.UserPushTokens
.FirstOrDefaultAsync(t => t.Token == token);
.FirstOrDefaultAsync(t => t.UserSessionId == sessionId);
if (existing != null)
{