- Added `UsersModule` to `MessagesModule` imports using `forwardRef`.
- Injected `UsersService` into `MessagesService` to support user-related operations.
- Added `showOnlineStatus` and `showReadReceipts` fields to settings form.
- Introduced real-time synchronization for read receipts in message threads.
- Enhanced avatars to display online status indicators.
- Automatically mark messages as read when viewing active conversations.
- Integrated `UsersService` into `MessagesService` for retrieving user preferences.
- Updated `markAsRead` functionality to respect `showReadReceipts` preference.
- Enhanced real-time read receipt notifications via `EventsGateway`.
- Added `markAsRead` method to the frontend message service.
- Added `UsersService` to manage user preferences in `EventsGateway`.
- Enhanced online/offline broadcasting to respect user `showOnlineStatus` preference.
- Updated `handleTyping` and `check_status` to verify user preferences before emitting events.
- Abstracted status broadcasting logic into `broadcastStatus`.
- Introduced `showOnlineStatus` and `showReadReceipts` fields in the user schema and API.
- Integrated real-time status broadcasting in `UsersService` via `EventsGateway`.
- Updated repository and frontend user types to align with new fields.
- Enhanced user update handling to support dynamic preference changes for online status.
- Added `NEXT_PUBLIC_APP_URL` and `NEXT_PUBLIC_CONTACT_EMAIL` to environment variables for frontend configuration.
- Updated CORS logic to support domain-based restrictions with dynamic origin validation.
- Improved frontend image hostname resolution using environment-driven URLs.
- Standardized contact email usage across the application.
- Improved CORS configuration to allow specific origins for development and mobile use cases.
- Added validation for token payload to ensure `sub` property is present.
- Enhanced user connection management by using `userId` consistently for online status tracking and room joining.
- Replaced `div` with `button` elements in `NotificationHandler` for better semantics and accessibility.
- Added conditional QR Code reveal in 2FA setup with `blur` effect for enhanced security and user control.
- Enhanced messages layout for responsiveness on smaller screens with dynamic chat/sidebar toggling.
- Simplified legacy prop handling in `ShareDialog`.
- Added tracking of online users with real-time status updates (online/offline).
- Implemented `handleTyping` to broadcast user typing events to recipients.
- Added `check_status` handler to query user online status.
- Enhanced CORS configuration to support multi-domain deployments with credentials.
- Added `NotificationHandler` component for managing real-time notifications using sockets.
- Display notifications for comments, replies, likes, and messages with interactive toasts.
- Integrated click handling for navigation to relevant pages based on notification type.
- Integrated `NotificationHandler` into the app layout for centralized notification management.
- Ensured compatibility with existing `Toaster` component for consistent user feedback.
- Implemented `ShareDialog` component for sharing content directly with other users.
- Added typing indicator when a user is composing a message in an active conversation.
- Updated `SocketProvider` to handle improved connection management and user status updates.
- Enhanced the messages UI with real-time online status and typing indicators for better feedback.
- Added `ContentsRepository` as a dependency to `CommentsService` and updated tests for mock setup.
- Adjusted import order in relevant files to align with project standards.
- Notify post authors when their content receives a new comment.
- Notify parent comment authors when their comment receives a reply.
- Send notifications to comment authors when their comments are liked.
- Handle notification errors gracefully with error
- Fixed auto-scrolling to the latest message by targeting the correct scroll container.
- Updated the conversation header to include a clickable link to the recipient's profile.
- Display unread message count badge in the sidebar.
- Integrate `useSocket` for real-time updates on unread messages.
- Reset unread message count when navigating to the messages page.
- Increment badge count on receiving `new_message` WebSocket events.
- Introduced `useSocket` to manage WebSocket connections in comment sections.
- Implemented real-time comment updates via `new_comment` WebSocket events.
- Added auto-join and leave for content-specific rooms using WebSocket upon mounting/unmounting.
- Updated `UsersRepository` to support `lte` condition in user search queries.
- Improved search flexibility by refining query logic with enhanced filters.
- Added `join_content` and `leave_content` WebSocket events for subscribing and unsubscribing to content rooms.
- Implemented `sendToContent` utility method for broadcasting messages to specific content rooms.
- Enhanced connection handling with logging and session validation updates.
- Added `markAsRead` and `countUnreadMessages` mocks to `MessagesService` tests.
- Included enriched comment retrieval and WebSocket notification validation in `CommentsService` tests.
- Updated dependency injection to include `EventsGateway` in `CommentsService` tests.
- Added user-to-user messaging via profile pages.
- Implemented user search functionality with instant result display in the messaging sidebar.
- Introduced support for temporary chat interfaces when messaging new users without prior conversations.
- Included "Message read status" updates with improved UX for message timestamps.
- Added `GET /messages/unread-count` endpoint to retrieve the count of unread messages for a user.
- Implemented `getUnreadCount` method in `MessagesService` and `MessagesRepository`.
- Updated frontend service to support fetching unread message count via API.
- Implemented `GET /users/search` endpoint in the backend to enable user search by username or display name.
- Added `search` method in `UsersService` and `UsersRepository`.
- Updated frontend `UserService` to support the new search API.
- Added `GET /messages/conversations/with/:userId` endpoint in the backend to retrieve direct conversation data.
- Implemented corresponding method in `MessagesService` and `MessagesRepository`.
- Updated the frontend service to support fetching direct conversations via API.
- Introduced enriched comment retrieval with user information and like statistics.
- Implemented WebSocket notifications to notify users of new comments on content.
- Updated dependency injection to include `EventsGateway` and `RealtimeModule`.
- Added tests for comment liking (`like` and `unlike` methods).
- Improved `findAllByContentId` tests to cover enriched comment data (likes count, isLiked, and user avatar URL resolution).
- Mocked new dependencies (`CommentLikesRepository` and `S3Service`) in `CommentsService` unit tests.
- Introduced support for nested comment replies in both frontend and backend.
- Added comment liking and unliking features, including like count and "isLiked" state tracking.
- Updated database schema with `parentId` and new `comment_likes` table.
- Enhanced UI for threaded comments and implemented display of like counts and reply actions.
- Refactored APIs and repositories to support replies, likes, and enriched comment data.
- Created a snapshot to reflect the updated database schema, including new tables `api_keys`, `audit_logs`, `categories`, `comments`, `contents`, and related relationships.
- Includes indexes, unique constraints, and foreign key definitions.
- Renamed `repository` and `eventsGateway` to `_repository` and `_eventsGateway` to follow conventions for unused test variables.
- Reformatted multiline assertions for better readability.