fix(userbot): repeated link rows no longer abort the message insert

This commit is contained in:
hh committed 2026-10-19 02:29:19 +00:00
1 parent 54424d0aa0
commit 17e27beb59
1 file changed
+8
@@ -7,6 +7,14 @@ INSERT INTO links
(account_id, chat_id, message_id, position, url, kind, web_url, web_title, (account_id, chat_id, message_id, position, url, kind, web_url, web_title,
web_description, web_site_name, raw) web_description, web_site_name, raw)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11::jsonb) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11::jsonb)
ON CONFLICT (account_id, chat_id, message_id, position) DO UPDATE SET
url = EXCLUDED.url,
kind = EXCLUDED.kind,
web_url = EXCLUDED.web_url,
web_title = EXCLUDED.web_title,
web_description = EXCLUDED.web_description,
web_site_name = EXCLUDED.web_site_name,
raw = EXCLUDED.raw
""" """