mirror of
https://github.com/Govor-team/Govor.git
synced 2026-11-17 12:59:25 +00:00
Add reactions, reliable push & session checks
Implements message reactions and reaction packs (domain models, services, admin HTTP API, media processing via ImageSharp and limits) and adds reliable push delivery (ChatPushNotification, ChatPushDispatcher, ChatPushWorker, improved ChatNotificationService). Enhances message reading (ReadChat API, unread counts, concurrency-safe receipts) and tightens session security (access-token session validation in JWT, hub filter, SessionAuthorization). Improves SignalR behavior (session groups, reaction/channel events, hub/error mappings). Adds EF migrations, many controller fixes (Forbid handling, password API), tests (Govor.Server.Tests), docs, CI and tooling updates (Dockerfile → .NET 10, GH Actions matrix for sqlite/postgres, Govor.Server.slnx, global.json), and small infra changes (AutoMapper bump, NullPushProvider, storage/token handling).
This commit is contained in:
@@ -45,21 +45,10 @@ public class UserSessionOpener : IUserSessionOpener
|
||||
return Result.Failure<RefreshResult>(result.Error);
|
||||
}
|
||||
|
||||
var sessions = result.Value;
|
||||
var existingSession = sessions.FirstOrDefault(s => s.DeviceInfo == deviceInfo);
|
||||
|
||||
try
|
||||
{
|
||||
RefreshResult refreshResult;
|
||||
|
||||
if (existingSession is not null)
|
||||
{
|
||||
refreshResult = await UpdateExistingSessionAsync(user, deviceInfo, existingSession);
|
||||
}
|
||||
else
|
||||
{
|
||||
refreshResult = await CreateNewSessionAsync(user, deviceInfo);
|
||||
}
|
||||
// DeviceInfo is a display label, not a device identity. Never reuse another sid.
|
||||
var refreshResult = await CreateNewSessionAsync(user, deviceInfo ?? string.Empty);
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
@@ -120,4 +109,4 @@ public class UserSessionOpener : IUserSessionOpener
|
||||
var refreshToken = await _jwtService.GenerateRefreshTokenAsync(user);
|
||||
return (accessToken, refreshToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user