feat(17-04): implement /subscribe and /unsubscribe handlers

- handleSubscribe checks IsSubscribed, calls AddSubscriber with chat ID and username
- handleUnsubscribe calls RemoveSubscriber, reports rows affected
- Both use storage layer from Plan 17-02
- Removed stub implementations from bot.go

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
salvacybersec
2026-04-06 17:32:18 +03:00
parent 77e8956bce
commit d671695f65
2 changed files with 60 additions and 7 deletions

View File

@@ -250,10 +250,4 @@ func (b *Bot) handleKey(ctx context.Context, msg *telego.Message) {
_ = b.replyPlain(ctx, msg.Chat.ID, "Not yet implemented: /key")
}
func (b *Bot) handleSubscribe(ctx context.Context, msg *telego.Message) {
_ = b.replyPlain(ctx, msg.Chat.ID, "Not yet implemented: /subscribe")
}
func (b *Bot) handleUnsubscribe(ctx context.Context, msg *telego.Message) {
_ = b.replyPlain(ctx, msg.Chat.ID, "Not yet implemented: /unsubscribe")
}
// handleSubscribe and handleUnsubscribe are implemented in subscribe.go.