Commit Graph

24 Commits

Author SHA1 Message Date
Artemy 53ea25f9fd small fix 2025-07-24 14:45:01 +07:00
Artemy cbff5857e7 Update ChatLoadControllerTests.cs 2025-07-23 15:11:33 +07:00
Artemy b24649e53a Refactor message loading API and add message query support
Reworked message loading endpoints and services to support flexible message querying with 'before' and 'after' parameters via a new MessageQuery contract. Updated controller actions, service interfaces, and implementations to use the new query model, and improved error handling. Added integration tests for ChatLoadController and introduced IUserPresenceService interface. Minor fixes and help text improvements in console client commands.
2025-07-23 13:06:34 +07:00
Artemy 1fc13000b1 RefreshControllerTests 2025-07-21 18:05:30 +07:00
Artemy 10b4e5207f bug fix 2025-07-21 17:20:35 +07:00
Artemy c434ca447c Media Controller Tests and other 2025-07-21 16:18:04 +07:00
Artemy c0d02e0fa1 Add access control for media downloads
Introduced IAccesserToDownloadMedia and its implementation to enforce access checks when downloading media files. Updated MediaController to use the new accesser service and improved error handling and validation in upload/download actions. Refactored and moved MediaService to the Medias namespace, registered new services in DI, and added comprehensive tests for access logic. Also fixed GroupMembershipConfiguration to make InvitationId optional and performed minor test and namespace cleanups.
2025-07-21 14:51:57 +07:00
Artemy 58e7716ded MessagesLoaderTests 2025-07-21 13:42:41 +07:00
Artemy 50d53d1ea4 Create MediaControllerTests.cs 2025-07-19 23:55:49 +07:00
Artemy ff873ae179 Implement refresh token flow and refactor session handling
Added refresh token endpoint and controller, introduced IUserSessionRefresher and UserSessionRefresher for token renewal, and updated session handling to return both access and refresh tokens. Refactored AuthController, tests, and related interfaces to support new token flow. Fixed JwtAccessOption property typo, updated configuration, and extended UserSessionsRepository to support lookup by refresh token.
2025-07-19 17:51:06 +07:00
Artemy ab643c16a4 Implement user session management and JWT refresh tokens
Added user session models, interfaces, repository, and service for managing user sessions and refresh tokens. Refactored authentication flow to return user objects and open sessions with device info, supporting refresh token generation and validation. Updated JWT configuration to separate access and refresh options, and refactored related tests and API contracts. Improved media upload handling and error logging. Migrated dependency references and DI registrations accordingly.
2025-07-18 20:16:36 +07:00
Artemy 6063aafd9e Refactor friend request and media services, remove console commands
Refactored the friend request command service and SignalR hub to return and broadcast FriendshipDto objects, improving real-time updates. Enhanced media upload and download logic to support file storage and retrieval, including database integration. Removed all command classes and related infrastructure from the Govor.Console project, streamlining the console client. Updated dependency injection and interfaces to reflect these changes.
2025-07-13 19:03:01 +07:00
Artemy 97b2ea14b2 Test for friends controllers 2025-07-12 19:51:15 +07:00
Artemy e8e2078514 app.MapHub<FriendsHub>("/api/friends"); 2025-07-11 12:19:32 +07:00
Artemy d170c6270f hot fix for friends controller 2025-07-03 19:46:53 +07:00
Artemy 565d3249e5 Add online pinging and friendship verification features
Introduces OnlinePingingController and related integration/unit tests for user online status updates. Adds PingHandlerService with memory cache throttling, IPingHandlerService interface, and service registration. Implements VerifyFriendship service and interface for friendship validation, with exception handling. Refactors CurrentUserService for improved user ID extraction and testability. Updates ChatsHub to verify friendship before messaging. Cleans up MediaController and optimizes UsersRepository queries by removing unnecessary includes.
2025-07-02 19:16:49 +07:00
Artemy 5883f3e340 hot fix 2025-07-01 13:25:55 +07:00
Artemy f855b91155 Completed the development of tests for FriendsController 2025-07-01 11:43:11 +07:00
Artemy 8e245ea044 Test for SendRequest action 2025-06-30 19:27:29 +07:00
Artemy ab426979d0 Update AuthControllerTests.cs 2025-06-30 19:04:35 +07:00
Artemy 494c12df49 MySQL migration 2025-06-30 18:59:05 +07:00
Artemy f53ee6644b Refactor user context handling with CurrentUserService
Introduced ICurrentUserService and its implementation to centralize retrieval of the current user's ID from claims. Updated FriendsController to use this service instead of direct claim access. Registered the service and IHttpContextAccessor in DI. Added integration tests for FriendsController. Moved UsernameValidator to Infrastructure/Validators.
2025-06-30 17:37:02 +07:00
Artemy 4f3f4ec066 Refactor to introduce Govor.Application and Govor.Contracts layers
Moved service implementations and interfaces from Govor.API and Govor.Core to new Govor.Application and Govor.Contracts projects. Updated namespaces and references throughout the solution. Added custom exception classes for authentication and invite services. Adjusted dependency injection and project references to use the new structure. This refactor improves separation of concerns and prepares the codebase for better maintainability and scalability.
2025-06-25 15:16:14 +07:00
Artemy e40489db40 AuthControllerTests 2025-06-25 14:08:54 +07:00