Skip to content

merge staging into main#50

Merged
Lucas-Huerta merged 26 commits into
mainfrom
staging
Jul 31, 2025
Merged

merge staging into main#50
Lucas-Huerta merged 26 commits into
mainfrom
staging

Conversation

@ImJustLucas

Copy link
Copy Markdown
Member

No description provided.

…trollers, service, and aggregation logic; add conversation interfaces and update schemas
…e to utilize it; enhance conversation interfaces with participant preview details
…d message service, and update providers and exports
… conversations, add detailed Swagger documentation, and improve error handling
…mRiderService to automatically create conversations for new custom riders
…tails and update conversation interfaces accordingly
…essage retrieval and conversation management, and enhance interfaces for message handling
… messages, including creation, retrieval, deletion, and read status management; enhance Swagger documentation for API endpoints and improve error handling
…p, update message controller to use new DTOs for conversation parameters, and enhance conversation service verification logic
… documentation by replacing inline definitions with dedicated decorators, enhancing readability and maintainability; implement new decorators for API operations to improve code organization
…pipelines for retrieving unread messages and their counts in the message service, enhancing the functionality for managing direct messages
…message status management, and update pipelines to exclude deleted messages, improving the overall functionality of direct messaging
…ls into message retrieval, update pipelines to include participant information, and refactor message service for improved data handling and response structure
…icipant details for enhanced message retrieval
…ion by consolidating fields from identity and preferences, improving clarity and efficiency in offer retrieval
…projection and ensure avatarUrl is consistently used, improving data clarity in message retrieval
…y replacing displayName with firstName, lastName, and fullName fields, enhancing clarity in user conversation details
… conversationId field for improved offer context and data retrieval
…lidation rules, and refactor SponsorsController and SponsorsService to utilize the new structure, enhancing data integrity and clarity in sponsor updates
Copilot AI review requested due to automatic review settings July 31, 2025 19:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR merges staging into main, adding a comprehensive direct messaging system and implementing several bug fixes and improvements across the codebase.

  • Introduces a complete direct messaging feature with conversations and messages
  • Updates sponsors service to fix parameter type and enhance update functionality
  • Upgrades shared types dependency to include new conversation-related types

Reviewed Changes

Copilot reviewed 37 out of 39 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/features/sponsors/services/sponsors.service.ts Fixes parameter type and enhances sponsor update functionality
src/features/sponsors/interfaces/update-sponsor.dto.ts Adds new DTO for sponsor updates with validation
src/features/sponsors/controllers/sponsors.controller.ts Updates to use new sponsor DTO and formatting improvements
src/features/offers/services/custom-rider.service.ts Adds automatic conversation creation on application
src/features/offers/pipelines/*.ts Pipeline optimizations and enum usage improvements
src/features/offers/offers.module.ts Adds DirectMessagesModule import
src/features/direct-messages/* Complete new direct messaging system implementation
src/features/features.module.ts Registers new direct messages module and routes
src/common/constants/mongoDbConnections.ts Adds conversation and message collection constants
package.json Updates shared types dependency version
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

id,
{
...updateSponsorDto,
logo: newSponsor.avatarUrl,

Copilot AI Jul 31, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code sets logo: newSponsor.avatarUrl but earlier on line 86 it sets logo: updateSponsorDto.logo. This creates a conflict where the DTO's logo value is overwritten by avatarUrl, which may not be the intended behavior.

Suggested change
logo: newSponsor.avatarUrl,

Copilot uses AI. Check for mistakes.
Comment thread src/features/direct-messages/services/message.service.ts Outdated
Comment on lines +70 to +72
const conversationId = new (mongoose as any).Types.ObjectId(
body.conversationId,
);

Copilot AI Jul 31, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 'as any' type assertion with mongoose.Types.ObjectId is unsafe. Import ObjectId directly from mongoose or use proper typing to avoid runtime errors.

Suggested change
const conversationId = new (mongoose as any).Types.ObjectId(
body.conversationId,
);
const conversationId = new ObjectId(body.conversationId);

Copilot uses AI. Check for mistakes.
};

const targetParticipant = {
userId: new (Types as any).ObjectId(body.targetUserId),

Copilot AI Jul 31, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 'as any' type assertion with Types.ObjectId is unsafe. Import ObjectId directly or use proper typing to avoid potential runtime errors.

Suggested change
userId: new (Types as any).ObjectId(body.targetUserId),
userId: new ObjectId(body.targetUserId),

Copilot uses AI. Check for mistakes.
@ImJustLucas ImJustLucas self-assigned this Jul 31, 2025
@ImJustLucas ImJustLucas requested a review from Lucas-Huerta July 31, 2025 19:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Lucas-Huerta Lucas-Huerta merged commit d7dd91e into main Jul 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants