From 3977f2e6576820d0a8315b39ed08b86f2ff77a09 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 17:57:10 +0000 Subject: [PATCH] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- src/integrations/supabase/types.ts | 3 +++ .../20260423175706_a7a12e6f-11fb-4972-9606-1f87b453c684.sql | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 supabase/migrations/20260423175706_a7a12e6f-11fb-4972-9606-1f87b453c684.sql diff --git a/src/integrations/supabase/types.ts b/src/integrations/supabase/types.ts index de10033..356c9b7 100644 --- a/src/integrations/supabase/types.ts +++ b/src/integrations/supabase/types.ts @@ -29,6 +29,7 @@ export type Database = { telegram_first_message_received_at: string | null telegram_onboarding_completed: boolean telegram_token_invalid: boolean + telegram_user_chat_id: number | null telegram_webhook_configured: boolean telegram_webhook_secret: string | null updated_at: string @@ -51,6 +52,7 @@ export type Database = { telegram_first_message_received_at?: string | null telegram_onboarding_completed?: boolean telegram_token_invalid?: boolean + telegram_user_chat_id?: number | null telegram_webhook_configured?: boolean telegram_webhook_secret?: string | null updated_at?: string @@ -73,6 +75,7 @@ export type Database = { telegram_first_message_received_at?: string | null telegram_onboarding_completed?: boolean telegram_token_invalid?: boolean + telegram_user_chat_id?: number | null telegram_webhook_configured?: boolean telegram_webhook_secret?: string | null updated_at?: string diff --git a/supabase/migrations/20260423175706_a7a12e6f-11fb-4972-9606-1f87b453c684.sql b/supabase/migrations/20260423175706_a7a12e6f-11fb-4972-9606-1f87b453c684.sql new file mode 100644 index 0000000..5b9d081 --- /dev/null +++ b/supabase/migrations/20260423175706_a7a12e6f-11fb-4972-9606-1f87b453c684.sql @@ -0,0 +1,2 @@ +ALTER TABLE public.agent_instances ADD COLUMN IF NOT EXISTS telegram_user_chat_id bigint; +COMMENT ON COLUMN public.agent_instances.telegram_user_chat_id IS 'Chat ID do Telegram do dono do agente — populado pelo telegram-webhook na primeira mensagem. Usado em TELEGRAM_ALLOWED_USERS / TELEGRAM_HOME_CHANNEL no container Hermes.'; \ No newline at end of file