feat: notify on chat when new record is established#26
feat: notify on chat when new record is established#26
Conversation
| private void saveSession(final ChatInfo chatInfo, final UserInfo userInfo, final LocalDate gameDay, final GameSession gameSession, final GameInfo gameInfo, final TelegramGroup telegramGroup) { | ||
| gameSessionRepository.saveAndFlush(gameSession); | ||
| applicationEventPublisher.publishEvent(new GameSessionRegistrationEvent(this, chatInfo, userInfo, gameInfo, gameSession.getDuration(), gameDay, | ||
| applicationEventPublisher.publishEvent(new GameSessionRegistrationEvent(this, chatInfo, userInfo, gameInfo, gameSession.getGame(), gameSession.getDuration(), gameDay, |
There was a problem hiding this comment.
Isn't the game already inferable from gameInfo?
There was a problem hiding this comment.
You're right — already addressed in the refactoring commit. GameInfo now includes the GameType, and the redundant parameter was removed from the event. gameInfo.type() is used everywhere instead.
There was a problem hiding this comment.
Applied in the refactoring commit: GameInfo now includes the GameType as the first field, and the redundant gameType parameter was removed from GameSessionRegistrationEvent. All consumers now correctly use gameInfo.type().
|
Hi @rubasace! Just wanted to flag that the GameType redundancy feedback has been addressed in a previous commit:
Could you please take another look when you get a chance? Thanks! |
GameInfo now contains the GameType as its first field, eliminating the need to pass both gameInfo and gameType separately to events and other components. Changes: - Updated GameInfo record to include GameType as first parameter - Modified GameTypeAdapter to populate type field - Simplified GameSessionRegistrationEvent constructor - Updated all event consumers to use gameInfo.type() - Fixed test fixtures to use new GameInfo constructor
6673411 to
031aead
Compare
|
Rebased on current main (no conflicts). CI running on the updated commits. Summary of changes in this PR:
|
Closes #7
Implements notifications when a user establishes a new record time for a game in a group chat.
Changes:
Behavior: