feat(discord): implement reschedule voting via Discord interactions (issue #30) #87

Closed
Toutsu wants to merge 0 commits from feature/discord-reschedule-voting into main
Owner

Summary

Реализует перенос reschedule voting на Discord interactions (issue #30).

Changes

  • Database: добавлены колонки source_platform и proposed_by_external_user_id в reschedule_proposals
  • Shared: выделены платформенно-нейтральные типы — RescheduleVoteRules, RescheduleVotingInput, RescheduleDtos, RescheduleVotingFinalizer
  • Telegram: RescheduleVotingDeadlineService теперь делегирует финализацию в RescheduleVotingFinalizer и обрабатывает только Telegram-пропозалы
  • Discord: добавлены:
    • /reschedule slash-команда (GM-only, 2-3 варианта + дедлайн)
    • DiscordRescheduleVoteHandler — обработка кнопок голосования
    • DiscordRescheduleVotingRenderer — рендеринг embed + кнопок
    • DiscordRescheduleVotingDeadlineService — фоновый сервис финализации голосований
    • DiscordSessionInteractionModule — маршрутизация button interactions
  • Version bump: 2.5.0 → 2.6.0 (все 4 файла синхронизированы)

Test plan

  • dotnet build — успешно
  • dotnet test — 224/224 пройдено
  • dotnet format --verify-no-changes — чисто
  • Telegram reschedule flow не затронут (source_platform = 'Telegram')
  • Discord vote deadline service корректно пропускает non-Discord пропозалы

Workflow

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

Resolves #30

🤖 Generated with Claude Code

## Summary Реализует перенос reschedule voting на Discord interactions (issue #30). ## Changes - **Database**: добавлены колонки `source_platform` и `proposed_by_external_user_id` в `reschedule_proposals` - **Shared**: выделены платформенно-нейтральные типы — `RescheduleVoteRules`, `RescheduleVotingInput`, `RescheduleDtos`, `RescheduleVotingFinalizer` - **Telegram**: `RescheduleVotingDeadlineService` теперь делегирует финализацию в `RescheduleVotingFinalizer` и обрабатывает только Telegram-пропозалы - **Discord**: добавлены: - `/reschedule` slash-команда (GM-only, 2-3 варианта + дедлайн) - `DiscordRescheduleVoteHandler` — обработка кнопок голосования - `DiscordRescheduleVotingRenderer` — рендеринг embed + кнопок - `DiscordRescheduleVotingDeadlineService` — фоновый сервис финализации голосований - `DiscordSessionInteractionModule` — маршрутизация button interactions - **Version bump**: 2.5.0 → 2.6.0 (все 4 файла синхронизированы) ## Test plan - [x] `dotnet build` — успешно - [x] `dotnet test` — 224/224 пройдено - [x] `dotnet format --verify-no-changes` — чисто - [x] Telegram reschedule flow не затронут (source_platform = 'Telegram') - [x] Discord vote deadline service корректно пропускает non-Discord пропозалы ## Workflow - [ ] CI passes - [ ] Code review approved - [ ] Deployed - [ ] Release published Resolves #30 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Toutsu added 11 commits 2026-05-20 12:37:14 +03:00
Toutsu added 1 commit 2026-05-20 12:49:13 +03:00
fix(shared): filter due proposals by source_platform to prevent cross-platform race
PR Checks / test-and-build (pull_request) Successful in 6m11s
db9a931ed6
Both Telegram and Discord deadline services were querying ALL due
proposals without filtering by source_platform. If the Telegram
service reached a Discord proposal first, it finalized the DB state
but skipped message handling. The Discord service then saw status
!= 'Voting' and never updated the Discord vote message.

Fix: GetDueProposalIdsAsync now accepts a sourcePlatform parameter
and filters at the DB level. Each service only processes its own
platform's proposals.

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

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#87