Skip to content

Conversation

@Feiryn
Copy link
Contributor

@Feiryn Feiryn commented Mar 28, 2025

No description provided.

@Feiryn Feiryn added core Changes in the core folder refactoring No visible changes but code improved labels Mar 28, 2025
@Feiryn Feiryn added this to the DraftBot V5 milestone Mar 28, 2025
@BastLast BastLast requested a review from Copilot March 28, 2025 09:55
Copy link
Contributor

Copilot AI left a comment

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 updates the player blocking mechanism by replacing usages of player.id with player.keycloakId, ensuring that all blocking and unblocking functions use the correct player identifier.

  • Replaces player.id with player.keycloakId in blocking/unblocking functions across various player, pet, mission, guild, and admin test commands.
  • Ensures consistent use of the keycloakId for all operations that manage player state during command execution.

Reviewed Changes

Copilot reviewed 45 out of 45 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Core/src/commands/player/SellCommand.ts Updated blocking functions to use keycloakId instead of id.
Core/src/commands/player/ReportCommand.ts Replaced player.id with player.keycloakId in multiple blocking and unblocking calls.
Core/src/commands/player/JoinBoatCommand.ts Updated blocking calls to use keycloakId.
Core/src/commands/player/DrinkCommand.ts Modified blocking calls to use keycloakId.
Core/src/commands/player/ClassesCommand.ts Consistently using keycloakId for blocking/unblocking actions.
Core/src/commands/pet/PetTransferCommand.ts Updated blocking calls from id to keycloakId.
Core/src/commands/pet/PetSellCommand.ts Adjusted blocking check and unblocking calls to use keycloakId and re-ordered player registration.
Core/src/commands/pet/PetFreeCommand.ts Updated to use keycloakId in blocking calls.
Core/src/commands/pet/PetFeedCommand.ts Replaced id with keycloakId in all blocking calls.
Core/src/commands/mission/MissionShopCommand.ts Updated blocking calls to use keycloakId.
Core/src/commands/guild/GuildLeaveCommand.ts Replaced id with keycloakId in unblocking and blocking calls.
Core/src/commands/guild/GuildKickCommand.ts Updated blocking and unblocking calls to keycloakId.
Core/src/commands/guild/GuildInviteCommand.ts Modified blocking calls to correctly use keycloakId.
Core/src/commands/guild/GuildElderRemoveCommand.ts Changed blocking calls to reference keycloakId.
Core/src/commands/guild/GuildElderCommand.ts Updated blocking calls from id to keycloakId.
Core/src/commands/guild/GuildDescriptionCommand.ts Replaced id with keycloakId in blocking functions.
Core/src/commands/guild/GuildDailyCommand.ts Revised blocking-related functionality to use keycloakId.
Core/src/commands/guild/GuildCreateCommand.ts Updated blocking and unblocking calls to use keycloakId.
Core/src/commands/admin/testCommands/Time/BlockPlayerTestCommand.ts Changed blocking call to use keycloakId.
Core/src/commands/admin/testCommands/Player/UnblockTestCommand.ts Updated unblocking call to use keycloakId.
Comments suppressed due to low confidence (2)

Core/src/commands/player/SellCommand.ts:28

  • Ensure that player.keycloakId is always defined at this point to prevent potential runtime errors when unblocking a player.
BlockingUtils.unblockPlayer(player.keycloakId, BlockingConstants.REASONS.SELL);

Core/src/commands/pet/PetSellCommand.ts:147

  • Review the change in ordering where the blocking check now uses reactingPlayerKeycloakId directly before retrieving the full player record; ensure that this does not bypass necessary context required by appendBlockedPacket.
if (BlockingUtils.appendBlockedPacket(reactingPlayerKeycloakId, response)) {

@BastLast BastLast merged commit cf7bf1f into draftbot-v5 Mar 29, 2025
5 of 6 checks passed
@BastLast BastLast linked an issue Mar 29, 2025 that may be closed by this pull request
@Feiryn Feiryn deleted the last-todo-fixes branch April 1, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes in the core folder refactoring No visible changes but code improved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Faire un passage sur tous les todo dans le code

3 participants