Skip to content

Conversation

@CapoMK25
Copy link
Collaborator

Brief description

This PR implements the requirement to include the player's unique ID (sender_id) within chat reactions. This ensures the frontend can reliably identify the author of a reaction, consistent with our ChatMessage ownership model.

Change list

  • Modified Reaction class in reaction.schema.ts to include sender_id as a required String property.
  • Updated ReactionDto and CreateReactionDto to enforce the inclusion of sender_id.
  • Updated ChatService.addReaction() to accept sender_id as a mandatory 4th argument.
  • Refactored BaseChatService and gateways to extract the playerId from the authenticated socket client and pass it through to the service layer.
  • Updated ReactionDtoBuilder and ChatBuilderFactory with default mock IDs to satisfy TypeScript's strict requirements across all existing tests.
  • Updated addReaction.test.ts to verify that sender_id is correctly persisted and returned.
  • Full Pass: All 249 test suites (including global and clan chat) are passing with the new mandatory argument.

@CapoMK25
Copy link
Collaborator Author

We have to go through the transaction support PRs first since they touch the same code, and then we can move on to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants