- users.telegram_* replace the single global binding; one-time /start code per user (web Settings → Telegram, or peppa telegram pair <login>); a chat belongs to one user - agent questions go to the project's owner and members who paired; an answer (button or reply) is accepted only from someone with access to the project; messages are closed for every recipient; /status is scoped - CLI: telegram pair|status|unpair <login>, user ensure mock-<name>; dev stand pairs its test PM per user - tests: several-users journey (bob without access, then as a member); 70 e2e total, green - BREAKING: the old global binding is removed; users pair again in Settings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 lines
441 B
SQL
5 lines
441 B
SQL
ALTER TABLE "users" ADD COLUMN "telegram_chat_id" bigint;--> statement-breakpoint
|
|
ALTER TABLE "users" ADD COLUMN "telegram_user_id" bigint;--> statement-breakpoint
|
|
ALTER TABLE "users" ADD COLUMN "telegram_username" text;--> statement-breakpoint
|
|
ALTER TABLE "users" ADD COLUMN "telegram_paired_at" timestamp with time zone;--> statement-breakpoint
|
|
ALTER TABLE "users" ADD CONSTRAINT "users_telegram_chat_id_unique" UNIQUE("telegram_chat_id"); |