Commit Graph

14 Commits

Author SHA1 Message Date
Artemy fab3d6b67b ChatGroup work 2025-07-04 12:43:12 +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 0669614a5e async Task<string> GenerateJwtTokenAsync(User user) 2025-07-02 15:26:27 +07:00
Artemy 48e519118e hot fix jwt 2025-07-01 21:42:34 +07:00
Artemy e061725a99 downcast to .net 8.x 2025-07-01 19:17:01 +07:00
Artemy 5883f3e340 hot fix 2025-07-01 13:25:55 +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 a659c73357 Final Friends Service Tests 2025-06-30 16:54:58 +07:00
Artemy 7aa1b1831a Improve friends search and error handling in API
Refactored FriendsController to provide more precise error responses and input validation. Enhanced FriendsService to handle new exception types and improved user search logic. Added tests for user search, updated repository to throw on empty search results, and implemented User equality override. Cleaned up Program.cs controller JSON options.
2025-06-30 12:47:53 +07:00
Artemy 05298c004c FriendsController 2025-06-27 19:12:31 +07:00
Artemy ec44347bbe Add username validation and initial friends feature
Introduced a UsernameValidator with Cyrillic and length checks, integrated into AuthService and registration flow. Added InvalidUsernameException and related interface. Updated User model to support friend requests, added FriendsController (stub), and configured Friendship entity in EF Core. Adjusted UserValidator max name length and removed navigation properties from PrivateChat.
2025-06-27 16:36:56 +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