max-telegram-bridge-bot/migrations/postgres/000008_add_users.down.sql
Andrey Lugovskoy c345217787 Track users, dual owner IDs for crosspost (TG + MAX)
- Add users table: TouchUser on every DM interaction
- Add tg_owner_id to crossposts: same person has different IDs on TG/MAX
- isCrosspostOwner checks both owner_id and tg_owner_id
- ListCrossposts matches by either owner ID
- TG user ID captured when forwarding channel post

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 22:52:13 +03:00

1 line
28 B
SQL