Skip to content

feat: Telegram groups API for distribution#51

Merged
zhiganov merged 3 commits intomasterfrom
feature/telegram-groups-api
Mar 11, 2026
Merged

feat: Telegram groups API for distribution#51
zhiganov merged 3 commits intomasterfrom
feature/telegram-groups-api

Conversation

@zhiganov
Copy link
Copy Markdown
Member

Summary

  • New user_telegram_groups table (migration 038) to store Telegram groups per user account
  • REST API at GET/POST/DELETE /api/v1/integrations/telegram/groups with Bearer token + Auth0 auth
  • DB functions: list, upsert (on conflict update), delete — following existing Kysely patterns

Context

Enables harmonica-chat and harmonica-mcp to list a user's registered Telegram groups when creating sessions with distribution targeting. The Telegram bot's /setup command now also registers groups server-side via this API.

Test plan

  • Verify migration runs on deploy (creates user_telegram_groups table)
  • Test POST /api/v1/integrations/telegram/groups with API key — registers a group
  • Test GET /api/v1/integrations/telegram/groups — lists registered groups
  • Test DELETE /api/v1/integrations/telegram/groups/{groupId} — removes group
  • Test upsert behavior — POST same group_id updates name/topic_id
  • Verify npx tsc --noEmit passes

🤖 Generated with Claude Code

zhiganov and others added 2 commits March 11, 2026 11:36
Add DB migration, schema types, query functions (list/upsert/delete),
API types, and REST endpoints for managing Telegram group registrations
per user. This enables harmonica-chat to list registered groups when
creating sessions with Telegram distribution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Match codebase convention — all other tables use Generated<Date> for
timestamptz columns. Update route handler to use .toISOString().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
harmonica-web-app Ready Ready Preview, Comment Mar 11, 2026 11:23am
harmonica-web-app-dev Ready Ready Preview, Comment Mar 11, 2026 11:23am

Request Review

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zhiganov zhiganov merged commit 9fdad54 into master Mar 11, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant