refactor: extract remaining Telegram handlers to platform-neutral contracts #106

Closed
Toutsu wants to merge 0 commits from refactor/issue-37-platform-neutral-handlers into main
Owner

Summary

Completes issue #37 by extracting the remaining 6 Telegram-specific handlers into platform-neutral contracts living in GmRelay.Shared. Discord Bot reschedule vote handler is now also updated to consume the shared HandleRescheduleVoteHandler.

Changes

  • GmRelay.Shared — new handlers:
    • CreateSessionHandler / CreateSessionCommand / CreateSessionResult
    • ListSessionsHandler / ListSessionsCommand
    • DeleteSessionHandler
    • ExportCalendarHandler / ExportCalendarCommand
    • HandleRescheduleTimeInputHandler / HandleRescheduleTimeInputCommand / HandleRescheduleTimeInputResult
    • HandleRescheduleVoteHandler / HandleRescheduleVoteResult
  • IPlatformMessenger — added SendScheduleAsync, UpdateScheduleAsync, SendGroupMessageAsync overload with actions, CreateThreadAsync, DeleteThreadAsync
  • Telegram Bot — thin wrappers in GmRelay.Bot delegate to shared handlers, handle Telegram-specific concerns (forum topics, batch_message_id, voting keyboard)
  • Discord BotDiscordRescheduleVoteHandler now delegates to shared HandleRescheduleVoteHandler
  • Tests — contract tests, handler tests, source-inspection tests for extracted handlers
  • Version — bumped 3.1.1 → 3.2.0

Test plan

  • dotnet build passes for all projects
  • dotnet test passes (299 tests)
  • dotnet format --verify-no-changes passes

Workflow

  • CI passes
  • Code review approved
  • Deployed
  • Release published

Closes #37

## Summary Completes issue #37 by extracting the remaining 6 Telegram-specific handlers into platform-neutral contracts living in `GmRelay.Shared`. Discord Bot reschedule vote handler is now also updated to consume the shared `HandleRescheduleVoteHandler`. ## Changes - **GmRelay.Shared** — new handlers: - `CreateSessionHandler` / `CreateSessionCommand` / `CreateSessionResult` - `ListSessionsHandler` / `ListSessionsCommand` - `DeleteSessionHandler` - `ExportCalendarHandler` / `ExportCalendarCommand` - `HandleRescheduleTimeInputHandler` / `HandleRescheduleTimeInputCommand` / `HandleRescheduleTimeInputResult` - `HandleRescheduleVoteHandler` / `HandleRescheduleVoteResult` - **IPlatformMessenger** — added `SendScheduleAsync`, `UpdateScheduleAsync`, `SendGroupMessageAsync` overload with actions, `CreateThreadAsync`, `DeleteThreadAsync` - **Telegram Bot** — thin wrappers in `GmRelay.Bot` delegate to shared handlers, handle Telegram-specific concerns (forum topics, `batch_message_id`, voting keyboard) - **Discord Bot** — `DiscordRescheduleVoteHandler` now delegates to shared `HandleRescheduleVoteHandler` - **Tests** — contract tests, handler tests, source-inspection tests for extracted handlers - **Version** — bumped 3.1.1 → 3.2.0 ## Test plan - [x] `dotnet build` passes for all projects - [x] `dotnet test` passes (299 tests) - [x] `dotnet format --verify-no-changes` passes ## Workflow - [ ] CI passes - [ ] Code review approved - [ ] Deployed - [ ] Release published Closes #37
Toutsu added 1 commit 2026-05-27 14:53:26 +03:00
refactor: extract remaining Telegram handlers to platform-neutral contracts
PR Checks / test-and-build (pull_request) Successful in 13m48s
542f15f2d6
- Extract CreateSessionHandler, ListSessionsHandler, DeleteSessionHandler,
  ExportCalendarHandler, HandleRescheduleTimeInputHandler,
  HandleRescheduleVoteHandler to GmRelay.Shared
- Add IPlatformMessenger methods: SendScheduleAsync, UpdateScheduleAsync,
  SendGroupMessageAsync with actions, CreateThreadAsync, DeleteThreadAsync
- Rewrite Telegram Bot wrappers as thin adapters delegating to shared handlers
- Rewrite DiscordRescheduleVoteHandler to use shared HandleRescheduleVoteHandler
- Update UpdateRouter with explicit type aliases for ambiguous handler names
- Add contract and source-inspection tests for extracted handlers
- Bump version 3.1.1 → 3.2.0

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Toutsu closed this pull request 2026-05-27 16:13:01 +03:00
Some checks are pending
PR Checks / test-and-build (pull_request) Successful in 13m48s

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Toutsu/GmRelayBot#106