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.
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.
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.