feat: sync bot keyboards and callbacks
Sync telesrv b96f2dd (feat(bot): complete keyboards callbacks and durable delivery). Skipped private docs and preserved public README files per sync rules; normalized the appearance seed log label for public naming.
This commit is contained in:
parent
0c99ae0a9d
commit
bf965f610c
80 changed files with 7212 additions and 349 deletions
27
deploy/migrations/0113_bot_api_inline_callbacks.down.sql
Normal file
27
deploy/migrations/0113_bot_api_inline_callbacks.down.sql
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
DELETE FROM public.bot_api_updates
|
||||
WHERE update_kind = 'callback_query' AND callback_inline_message_id <> 0;
|
||||
|
||||
ALTER TABLE public.bot_api_updates
|
||||
DROP CONSTRAINT bot_api_updates_callback_shape_check,
|
||||
DROP CONSTRAINT bot_api_updates_peer_type_check,
|
||||
DROP CONSTRAINT bot_api_updates_peer_id_check,
|
||||
DROP CONSTRAINT bot_api_updates_message_id_check;
|
||||
|
||||
ALTER TABLE public.bot_api_updates
|
||||
ADD CONSTRAINT bot_api_updates_peer_type_check CHECK (peer_type IN ('user', 'channel')),
|
||||
ADD CONSTRAINT bot_api_updates_peer_id_check CHECK (peer_id > 0),
|
||||
ADD CONSTRAINT bot_api_updates_message_id_check CHECK (message_id > 0),
|
||||
ADD CONSTRAINT bot_api_updates_callback_shape_check CHECK (
|
||||
(update_kind = 'callback_query' AND callback_query_id <> 0 AND callback_user_id > 0
|
||||
AND callback_chat_instance <> 0 AND COALESCE(octet_length(callback_data), 0) <= 64
|
||||
AND source_pts = 0)
|
||||
OR
|
||||
(update_kind IN ('message', 'edited_message') AND callback_query_id = 0
|
||||
AND callback_user_id = 0 AND callback_chat_instance = 0 AND callback_data IS NULL)
|
||||
);
|
||||
|
||||
ALTER TABLE public.bot_api_updates
|
||||
DROP COLUMN callback_inline_access_hash,
|
||||
DROP COLUMN callback_inline_message_id,
|
||||
DROP COLUMN callback_inline_owner_id,
|
||||
DROP COLUMN callback_inline_dc_id;
|
||||
Loading…
Add table
Add a link
Reference in a new issue