Commit Graph

42 Commits

Author SHA1 Message Date
Artemy eab0d746b8 was added firebase nitifying 2026-03-01 16:48:06 +07:00
Artemy 0a43e35797 test to make server 2026-02-08 22:30:29 +07:00
Artemy cc2921d257 Updeted Session Model and Session Opener Service
renamed RefreshToken in model to RefreshTokenHash - now we have a hash of token, not a token
2025-12-14 14:03:18 +07:00
Artemy a5a5fc4758 new app server and database + added hub and controller of user profile 2025-11-04 11:41:06 +07:00
Artemy e9eee5bfec UserSession namespace was changed 2025-07-24 21:37:12 +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 96587b491d Add AutoMapper and message response models
Introduced AutoMapper to the API project and registered it in the DI container. Added mapping profiles for core models to DTOs and response objects. Refactored controllers to use AutoMapper for mapping entities to response DTOs. Implemented new response models for messages, media attachments, reactions, and views. Updated MessagesLoader to load messages with related data. Added a migration to support ChatGroupId in messages. Updated dependencies and fixed minor issues in related files.
2025-07-12 16:39:06 +07:00
Artemy c7de2318fc using Govor.Core.Models.Users; 2025-07-11 21:52:37 +07:00
Artemy a68feb4a17 Refactor group existence checks and add group repo tests
Renamed IGroupsExist and related methods from Exists to Exist for consistency. Added integration tests for GroupRepository. Introduced entity configurations for ChatGroup, GroupAdmins, GroupInvitation, and updated GroupMembership configuration. Updated usages and tests to match new method names and improved equality checks for ChatGroup.
2025-07-07 20:49:20 +07:00
Artemy 2cb6a93060 Add private chat support and group model enhancements
Introduces repositories, validators, and integration tests for private chats. Refactors group-related models to support invitations and memberships, updates group repository interfaces and implementations, and enhances message service logic to handle private chat creation and retrieval. Also registers new services and validators in DI, and updates related tests.
2025-07-07 13:55:29 +07:00
Artemy 66819a015a Refactor media attachments to use MediaFile entity
This commit introduces the MediaFile entity and updates the media attachments model, repositories, and related logic to reference MediaFile instead of storing file metadata directly in MediaAttachments. Controller, service, and SignalR request/response contracts are updated to support the new structure. Database configurations and validators are also adjusted accordingly. This refactor improves media management and normalization in the data model.
2025-07-06 21:09:12 +07:00
Artemy 6062113655 Add unit tests and implement group repository interfaces
Introduces comprehensive unit tests for MessageService covering send, edit, and delete message scenarios. Adds and implements IGroupsRepository, IGroupsReader, and IGroupsWriter interfaces with method stubs in GroupRepository. Updates ChatGroup model with Description and ImageId fields, and registers GroupRepository in DI. Fixes parameter order in SendMessage record.
2025-07-06 15:44:45 +07:00
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 cdae63b223 optimization sql 2025-07-01 15:05:49 +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 9b9cd73a96 Add friendship feature with models, repository, and tests
Introduces Friendship and PrivateChat models, repository interfaces, and implementations for managing friendships. Adds validators and comprehensive unit and integration tests for friendship logic. Updates InviteUserController with new endpoints and restricts access to admin role. Removes unnecessary project references from Govor.API.csproj and registers new DbSets in GovorDbContext.
2025-06-27 15:09:28 +07:00
Artemy 76094af15b Invitation globale work
+ tests
+ new services
+ InvitationDto and IInvitationReqest
2025-06-24 21:20:43 +07:00
Artemy f99ec0b17b InvitesRepositoryTests
+ other reworks
2025-06-24 19:17:27 +07:00
Artemy 6e856a65db InvitationValidator 2025-06-24 15:24:14 +07:00
Artemy 672fc95823 Admins Repository
+ tests
2025-06-24 15:14:45 +07:00
Artemy ce013eae49 Registration rework
+ InvitesRepository
+ AdminsRepository
+ rework jwt
2025-06-24 14:27:08 +07:00
Artemy 410a1ce1cc Admin stuff init
UserController
2025-06-22 21:34:04 +07:00
Artemy e7b7c402e1 Finished MediaAttachments
the functionality and tests are completed
2025-06-22 16:05:36 +07:00
Artemy 4956a175c5 MediaAttachmentsTests init 2025-06-22 15:37:20 +07:00
Artemy 64a06c0d1c MediaAttachments first init 2025-06-22 15:10:10 +07:00
Artemy b75c0d3f5a Finished MessageRepository
+ Tests
2025-06-22 14:32:01 +07:00
Artemy 972b4fb83c more tests and fichers for MessagesRepository 2025-06-22 12:48:48 +07:00
Artemy b1c0a4b0e2 MessageRepositoryTests
+ Given_ValidSenderId_When_FindBySenderIdAsync_Then_ReturnMessages
+ Given_InvalidSenderId_When_FindBySenderId_Should_Throw_NotFoundByKeyException
2025-06-22 12:21:27 +07:00
Artemy 203bb5e5a4 MessageRepository + Tests
+ GetAllAsync rework
+ FindByIdAsync
+ rework FindBySenderAndReceiverIdAsync
2025-06-22 12:07:06 +07:00
Artemy 3526cde06f Messages first init 2025-06-20 13:32:29 +07:00
Artemy 7d518c0882 AuthController work 2025-06-18 16:55:19 +07:00
Artemy de8d97e5bf Adding postfix Async 2025-06-17 21:27:16 +07:00
Artemy 22de0e9630 UserValidatorTests 2025-06-17 21:24:54 +07:00
Artemy e860abce40 work 2025-06-17 18:42:31 +07:00
Artemy 70e46e7648 more tests for user rep 2025-06-17 17:37:10 +07:00
Artemy 694750e25d Working on the UserRepository functionality
+ Tests
+ QueryableExtensions. It is an add-on that allows you to implement exceptions if the returned List would be empty.
2025-06-17 13:11:56 +07:00
Artemy 568b09ba81 I'm working on the UsersRepository
userValidotor has been added and tests are being developed
2025-06-17 11:57:57 +07:00
Artemy d62c38db51 DbGovor init 2025-06-16 22:31:45 +07:00