feat: sync AI compose and ChatBot features
This commit is contained in:
parent
35e5d38f4d
commit
b7269b135f
75 changed files with 5426 additions and 123 deletions
|
|
@ -712,6 +712,7 @@ base AS (
|
|||
COALESCE(m.ttl_period, 0)::int AS message_ttl_period,
|
||||
COALESCE(m.expires_at, 0)::int AS message_expires_at,
|
||||
COALESCE(m.edit_date, 0)::int AS message_edit_date,
|
||||
COALESCE(m.hide_edited, false)::boolean AS message_hide_edited,
|
||||
COALESCE(m.silent, false)::boolean AS message_silent,
|
||||
COALESCE(m.noforwards, false)::boolean AS message_noforwards,
|
||||
COALESCE(m.reply_to_msg_id, 0)::int AS message_reply_to_msg_id,
|
||||
|
|
@ -796,6 +797,7 @@ SELECT
|
|||
message_ttl_period,
|
||||
message_expires_at,
|
||||
message_edit_date,
|
||||
message_hide_edited,
|
||||
message_silent,
|
||||
message_noforwards,
|
||||
message_reply_to_msg_id,
|
||||
|
|
@ -880,6 +882,7 @@ type ListDialogsByPeersRow struct {
|
|||
MessageTtlPeriod int32
|
||||
MessageExpiresAt int32
|
||||
MessageEditDate int32
|
||||
MessageHideEdited bool
|
||||
MessageSilent bool
|
||||
MessageNoforwards bool
|
||||
MessageReplyToMsgID int32
|
||||
|
|
@ -965,6 +968,7 @@ func (q *Queries) ListDialogsByPeers(ctx context.Context, arg ListDialogsByPeers
|
|||
&i.MessageTtlPeriod,
|
||||
&i.MessageExpiresAt,
|
||||
&i.MessageEditDate,
|
||||
&i.MessageHideEdited,
|
||||
&i.MessageSilent,
|
||||
&i.MessageNoforwards,
|
||||
&i.MessageReplyToMsgID,
|
||||
|
|
@ -1052,6 +1056,7 @@ WITH base AS (
|
|||
COALESCE(m.ttl_period, 0)::int AS message_ttl_period,
|
||||
COALESCE(m.expires_at, 0)::int AS message_expires_at,
|
||||
COALESCE(m.edit_date, 0)::int AS message_edit_date,
|
||||
COALESCE(m.hide_edited, false)::boolean AS message_hide_edited,
|
||||
COALESCE(m.silent, false)::boolean AS message_silent,
|
||||
COALESCE(m.noforwards, false)::boolean AS message_noforwards,
|
||||
COALESCE(m.reply_to_msg_id, 0)::int AS message_reply_to_msg_id,
|
||||
|
|
@ -1134,7 +1139,7 @@ WITH base AS (
|
|||
AND (NOT $16::boolean OR NOT d.pinned)
|
||||
),
|
||||
paged AS (
|
||||
SELECT user_id, peer_type, peer_id, folder_id, top_message_id, top_message_date, read_inbox_max_id, read_outbox_max_id, unread_count, unread_mentions_count, unread_reactions_count, ttl_period, theme_emoticon, has_scheduled, pinned, pinned_order, unread_mark, hidden_peer_settings_bar, peer_user_id, peer_access_hash, peer_phone, peer_first_name, peer_last_name, peer_username, peer_country_code, peer_verified, peer_support, peer_is_bot, peer_bot_info_version, peer_premium_until, peer_emoji_status_document_id, peer_emoji_status_until, peer_last_seen_at, peer_contact, peer_mutual, message_id, message_private_message_id, message_from_user_id, message_date, message_outgoing, message_body, message_entities_json, message_media_json, message_ttl_period, message_expires_at, message_edit_date, message_silent, message_noforwards, message_reply_to_msg_id, message_reply_to_peer_type, message_reply_to_peer_id, message_reply_to_top_id, message_reply_to_story_id, message_quote_text, message_quote_entities_json, message_quote_offset, message_fwd_from_peer_type, message_fwd_from_peer_id, message_fwd_from_name, message_fwd_date, message_fwd_saved_from_peer_type, message_fwd_saved_from_peer_id, message_fwd_saved_from_msg_id, message_saved_peer_type, message_saved_peer_id, message_media_unread, message_reaction_unread, message_via_bot_id, message_grouped_id, message_effect, message_reply_markup_json, message_rich_message_json, message_pinned
|
||||
SELECT user_id, peer_type, peer_id, folder_id, top_message_id, top_message_date, read_inbox_max_id, read_outbox_max_id, unread_count, unread_mentions_count, unread_reactions_count, ttl_period, theme_emoticon, has_scheduled, pinned, pinned_order, unread_mark, hidden_peer_settings_bar, peer_user_id, peer_access_hash, peer_phone, peer_first_name, peer_last_name, peer_username, peer_country_code, peer_verified, peer_support, peer_is_bot, peer_bot_info_version, peer_premium_until, peer_emoji_status_document_id, peer_emoji_status_until, peer_last_seen_at, peer_contact, peer_mutual, message_id, message_private_message_id, message_from_user_id, message_date, message_outgoing, message_body, message_entities_json, message_media_json, message_ttl_period, message_expires_at, message_edit_date, message_hide_edited, message_silent, message_noforwards, message_reply_to_msg_id, message_reply_to_peer_type, message_reply_to_peer_id, message_reply_to_top_id, message_reply_to_story_id, message_quote_text, message_quote_entities_json, message_quote_offset, message_fwd_from_peer_type, message_fwd_from_peer_id, message_fwd_from_name, message_fwd_date, message_fwd_saved_from_peer_type, message_fwd_saved_from_peer_id, message_fwd_saved_from_msg_id, message_saved_peer_type, message_saved_peer_id, message_media_unread, message_reaction_unread, message_via_bot_id, message_grouped_id, message_effect, message_reply_markup_json, message_rich_message_json, message_pinned
|
||||
FROM base
|
||||
WHERE (
|
||||
($17::int <= 0 AND $18::int <= 0)
|
||||
|
|
@ -1217,6 +1222,7 @@ SELECT
|
|||
message_ttl_period,
|
||||
message_expires_at,
|
||||
message_edit_date,
|
||||
message_hide_edited,
|
||||
message_silent,
|
||||
message_noforwards,
|
||||
message_reply_to_msg_id,
|
||||
|
|
@ -1324,6 +1330,7 @@ type ListDialogsByUserRow struct {
|
|||
MessageTtlPeriod int32
|
||||
MessageExpiresAt int32
|
||||
MessageEditDate int32
|
||||
MessageHideEdited bool
|
||||
MessageSilent bool
|
||||
MessageNoforwards bool
|
||||
MessageReplyToMsgID int32
|
||||
|
|
@ -1430,6 +1437,7 @@ func (q *Queries) ListDialogsByUser(ctx context.Context, arg ListDialogsByUserPa
|
|||
&i.MessageTtlPeriod,
|
||||
&i.MessageExpiresAt,
|
||||
&i.MessageEditDate,
|
||||
&i.MessageHideEdited,
|
||||
&i.MessageSilent,
|
||||
&i.MessageNoforwards,
|
||||
&i.MessageReplyToMsgID,
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ box AS (
|
|||
from_user_id,
|
||||
message_date,
|
||||
edit_date,
|
||||
hide_edited,
|
||||
outgoing,
|
||||
body,
|
||||
entities::text AS entities_json,
|
||||
|
|
@ -149,6 +150,7 @@ SELECT
|
|||
from_user_id,
|
||||
message_date,
|
||||
edit_date,
|
||||
hide_edited,
|
||||
outgoing,
|
||||
body,
|
||||
entities_json,
|
||||
|
|
@ -178,6 +180,7 @@ type CreateMessageRow struct {
|
|||
FromUserID int64
|
||||
MessageDate int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -207,6 +210,7 @@ func (q *Queries) CreateMessage(ctx context.Context, arg CreateMessageParams) (C
|
|||
&i.FromUserID,
|
||||
&i.MessageDate,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -303,6 +307,7 @@ RETURNING
|
|||
ttl_period,
|
||||
expires_at,
|
||||
edit_date,
|
||||
hide_edited,
|
||||
outgoing,
|
||||
body,
|
||||
entities::text AS entities_json,
|
||||
|
|
@ -392,6 +397,7 @@ type CreateMessageBoxRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -482,6 +488,7 @@ func (q *Queries) CreateMessageBox(ctx context.Context, arg CreateMessageBoxPara
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -1056,6 +1063,7 @@ SELECT
|
|||
ttl_period,
|
||||
expires_at,
|
||||
edit_date,
|
||||
hide_edited,
|
||||
outgoing,
|
||||
body,
|
||||
entities::text AS entities_json,
|
||||
|
|
@ -1110,6 +1118,7 @@ type GetMessageBoxByPrivateMessageRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -1158,6 +1167,7 @@ func (q *Queries) GetMessageBoxByPrivateMessage(ctx context.Context, arg GetMess
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -1207,6 +1217,7 @@ SELECT
|
|||
ttl_period,
|
||||
expires_at,
|
||||
edit_date,
|
||||
hide_edited,
|
||||
outgoing,
|
||||
body,
|
||||
entities::text AS entities_json,
|
||||
|
|
@ -1268,6 +1279,7 @@ type GetMessageBoxForEditRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -1322,6 +1334,7 @@ func (q *Queries) GetMessageBoxForEdit(ctx context.Context, arg GetMessageBoxFor
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -1460,6 +1473,7 @@ SELECT
|
|||
m.ttl_period,
|
||||
m.expires_at,
|
||||
m.edit_date,
|
||||
m.hide_edited,
|
||||
m.outgoing,
|
||||
m.body,
|
||||
m.entities::text AS entities_json,
|
||||
|
|
@ -1549,6 +1563,7 @@ type GetMessageBoxesByIDsRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -1634,6 +1649,7 @@ func (q *Queries) GetMessageBoxesByIDs(ctx context.Context, arg GetMessageBoxesB
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -1727,6 +1743,7 @@ SELECT
|
|||
m.ttl_period,
|
||||
m.expires_at,
|
||||
m.edit_date,
|
||||
m.hide_edited,
|
||||
m.outgoing,
|
||||
m.body,
|
||||
m.entities::text AS entities_json,
|
||||
|
|
@ -1786,6 +1803,7 @@ type GetMessageBoxesForForwardRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -1844,6 +1862,7 @@ func (q *Queries) GetMessageBoxesForForward(ctx context.Context, arg GetMessageB
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -2131,6 +2150,7 @@ SELECT
|
|||
m.ttl_period,
|
||||
m.expires_at,
|
||||
m.edit_date,
|
||||
m.hide_edited,
|
||||
m.outgoing,
|
||||
m.body,
|
||||
m.entities::text AS entities_json,
|
||||
|
|
@ -2263,6 +2283,7 @@ type ListMessagesBackwardRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -2368,6 +2389,7 @@ func (q *Queries) ListMessagesBackward(ctx context.Context, arg ListMessagesBack
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -2466,6 +2488,7 @@ base AS NOT MATERIALIZED (
|
|||
m.ttl_period,
|
||||
m.expires_at,
|
||||
m.edit_date,
|
||||
m.hide_edited,
|
||||
m.outgoing,
|
||||
m.body,
|
||||
m.entities::text AS entities_json,
|
||||
|
|
@ -2567,7 +2590,7 @@ total AS (
|
|||
WHERE $16::boolean
|
||||
),
|
||||
backward AS (
|
||||
SELECT b.box_id, b.private_message_id, b.owner_user_id, b.peer_type, b.peer_id, b.from_user_id, b.message_date, b.ttl_period, b.expires_at, b.edit_date, b.outgoing, b.body, b.entities_json, b.silent, b.noforwards, b.reply_to_msg_id, b.reply_to_peer_type, b.reply_to_peer_id, b.reply_to_top_id, b.reply_to_story_id, b.quote_text, b.quote_entities_json, b.quote_offset, b.fwd_from_peer_type, b.fwd_from_peer_id, b.fwd_from_name, b.fwd_date, b.fwd_saved_from_peer_type, b.fwd_saved_from_peer_id, b.fwd_saved_from_msg_id, b.saved_peer_type, b.saved_peer_id, b.pts, b.media_json, b.media_unread, b.reaction_unread, b.pinned, b.via_bot_id, b.grouped_id, b.effect, b.reply_markup_json, b.rich_message_json, b.peer_user_id, b.peer_access_hash, b.peer_phone, b.peer_first_name, b.peer_last_name, b.peer_username, b.peer_country_code, b.peer_verified, b.peer_support, b.peer_is_bot, b.peer_bot_info_version, b.peer_premium_until, b.peer_emoji_status_document_id, b.peer_emoji_status_until, b.peer_last_seen_at, b.from_user_user_id, b.from_user_access_hash, b.from_user_phone, b.from_user_first_name, b.from_user_last_name, b.from_user_username, b.from_user_country_code, b.from_user_verified, b.from_user_support, b.from_user_is_bot, b.from_user_bot_info_version, b.from_user_premium_until, b.from_user_emoji_status_document_id, b.from_user_emoji_status_until, b.from_user_last_seen_at
|
||||
SELECT b.box_id, b.private_message_id, b.owner_user_id, b.peer_type, b.peer_id, b.from_user_id, b.message_date, b.ttl_period, b.expires_at, b.edit_date, b.hide_edited, b.outgoing, b.body, b.entities_json, b.silent, b.noforwards, b.reply_to_msg_id, b.reply_to_peer_type, b.reply_to_peer_id, b.reply_to_top_id, b.reply_to_story_id, b.quote_text, b.quote_entities_json, b.quote_offset, b.fwd_from_peer_type, b.fwd_from_peer_id, b.fwd_from_name, b.fwd_date, b.fwd_saved_from_peer_type, b.fwd_saved_from_peer_id, b.fwd_saved_from_msg_id, b.saved_peer_type, b.saved_peer_id, b.pts, b.media_json, b.media_unread, b.reaction_unread, b.pinned, b.via_bot_id, b.grouped_id, b.effect, b.reply_markup_json, b.rich_message_json, b.peer_user_id, b.peer_access_hash, b.peer_phone, b.peer_first_name, b.peer_last_name, b.peer_username, b.peer_country_code, b.peer_verified, b.peer_support, b.peer_is_bot, b.peer_bot_info_version, b.peer_premium_until, b.peer_emoji_status_document_id, b.peer_emoji_status_until, b.peer_last_seen_at, b.from_user_user_id, b.from_user_access_hash, b.from_user_phone, b.from_user_first_name, b.from_user_last_name, b.from_user_username, b.from_user_country_code, b.from_user_verified, b.from_user_support, b.from_user_is_bot, b.from_user_bot_info_version, b.from_user_premium_until, b.from_user_emoji_status_document_id, b.from_user_emoji_status_until, b.from_user_last_seen_at
|
||||
FROM base b
|
||||
CROSS JOIN load_params p
|
||||
WHERE p.load_type = 'backward'
|
||||
|
|
@ -2580,9 +2603,9 @@ backward AS (
|
|||
LIMIT (SELECT limit_count FROM load_params)
|
||||
),
|
||||
around_forward AS (
|
||||
SELECT f.box_id, f.private_message_id, f.owner_user_id, f.peer_type, f.peer_id, f.from_user_id, f.message_date, f.ttl_period, f.expires_at, f.edit_date, f.outgoing, f.body, f.entities_json, f.silent, f.noforwards, f.reply_to_msg_id, f.reply_to_peer_type, f.reply_to_peer_id, f.reply_to_top_id, f.reply_to_story_id, f.quote_text, f.quote_entities_json, f.quote_offset, f.fwd_from_peer_type, f.fwd_from_peer_id, f.fwd_from_name, f.fwd_date, f.fwd_saved_from_peer_type, f.fwd_saved_from_peer_id, f.fwd_saved_from_msg_id, f.saved_peer_type, f.saved_peer_id, f.pts, f.media_json, f.media_unread, f.reaction_unread, f.pinned, f.via_bot_id, f.grouped_id, f.effect, f.reply_markup_json, f.rich_message_json, f.peer_user_id, f.peer_access_hash, f.peer_phone, f.peer_first_name, f.peer_last_name, f.peer_username, f.peer_country_code, f.peer_verified, f.peer_support, f.peer_is_bot, f.peer_bot_info_version, f.peer_premium_until, f.peer_emoji_status_document_id, f.peer_emoji_status_until, f.peer_last_seen_at, f.from_user_user_id, f.from_user_access_hash, f.from_user_phone, f.from_user_first_name, f.from_user_last_name, f.from_user_username, f.from_user_country_code, f.from_user_verified, f.from_user_support, f.from_user_is_bot, f.from_user_bot_info_version, f.from_user_premium_until, f.from_user_emoji_status_document_id, f.from_user_emoji_status_until, f.from_user_last_seen_at
|
||||
SELECT f.box_id, f.private_message_id, f.owner_user_id, f.peer_type, f.peer_id, f.from_user_id, f.message_date, f.ttl_period, f.expires_at, f.edit_date, f.hide_edited, f.outgoing, f.body, f.entities_json, f.silent, f.noforwards, f.reply_to_msg_id, f.reply_to_peer_type, f.reply_to_peer_id, f.reply_to_top_id, f.reply_to_story_id, f.quote_text, f.quote_entities_json, f.quote_offset, f.fwd_from_peer_type, f.fwd_from_peer_id, f.fwd_from_name, f.fwd_date, f.fwd_saved_from_peer_type, f.fwd_saved_from_peer_id, f.fwd_saved_from_msg_id, f.saved_peer_type, f.saved_peer_id, f.pts, f.media_json, f.media_unread, f.reaction_unread, f.pinned, f.via_bot_id, f.grouped_id, f.effect, f.reply_markup_json, f.rich_message_json, f.peer_user_id, f.peer_access_hash, f.peer_phone, f.peer_first_name, f.peer_last_name, f.peer_username, f.peer_country_code, f.peer_verified, f.peer_support, f.peer_is_bot, f.peer_bot_info_version, f.peer_premium_until, f.peer_emoji_status_document_id, f.peer_emoji_status_until, f.peer_last_seen_at, f.from_user_user_id, f.from_user_access_hash, f.from_user_phone, f.from_user_first_name, f.from_user_last_name, f.from_user_username, f.from_user_country_code, f.from_user_verified, f.from_user_support, f.from_user_is_bot, f.from_user_bot_info_version, f.from_user_premium_until, f.from_user_emoji_status_document_id, f.from_user_emoji_status_until, f.from_user_last_seen_at
|
||||
FROM (
|
||||
SELECT b.box_id, b.private_message_id, b.owner_user_id, b.peer_type, b.peer_id, b.from_user_id, b.message_date, b.ttl_period, b.expires_at, b.edit_date, b.outgoing, b.body, b.entities_json, b.silent, b.noforwards, b.reply_to_msg_id, b.reply_to_peer_type, b.reply_to_peer_id, b.reply_to_top_id, b.reply_to_story_id, b.quote_text, b.quote_entities_json, b.quote_offset, b.fwd_from_peer_type, b.fwd_from_peer_id, b.fwd_from_name, b.fwd_date, b.fwd_saved_from_peer_type, b.fwd_saved_from_peer_id, b.fwd_saved_from_msg_id, b.saved_peer_type, b.saved_peer_id, b.pts, b.media_json, b.media_unread, b.reaction_unread, b.pinned, b.via_bot_id, b.grouped_id, b.effect, b.reply_markup_json, b.rich_message_json, b.peer_user_id, b.peer_access_hash, b.peer_phone, b.peer_first_name, b.peer_last_name, b.peer_username, b.peer_country_code, b.peer_verified, b.peer_support, b.peer_is_bot, b.peer_bot_info_version, b.peer_premium_until, b.peer_emoji_status_document_id, b.peer_emoji_status_until, b.peer_last_seen_at, b.from_user_user_id, b.from_user_access_hash, b.from_user_phone, b.from_user_first_name, b.from_user_last_name, b.from_user_username, b.from_user_country_code, b.from_user_verified, b.from_user_support, b.from_user_is_bot, b.from_user_bot_info_version, b.from_user_premium_until, b.from_user_emoji_status_document_id, b.from_user_emoji_status_until, b.from_user_last_seen_at
|
||||
SELECT b.box_id, b.private_message_id, b.owner_user_id, b.peer_type, b.peer_id, b.from_user_id, b.message_date, b.ttl_period, b.expires_at, b.edit_date, b.hide_edited, b.outgoing, b.body, b.entities_json, b.silent, b.noforwards, b.reply_to_msg_id, b.reply_to_peer_type, b.reply_to_peer_id, b.reply_to_top_id, b.reply_to_story_id, b.quote_text, b.quote_entities_json, b.quote_offset, b.fwd_from_peer_type, b.fwd_from_peer_id, b.fwd_from_name, b.fwd_date, b.fwd_saved_from_peer_type, b.fwd_saved_from_peer_id, b.fwd_saved_from_msg_id, b.saved_peer_type, b.saved_peer_id, b.pts, b.media_json, b.media_unread, b.reaction_unread, b.pinned, b.via_bot_id, b.grouped_id, b.effect, b.reply_markup_json, b.rich_message_json, b.peer_user_id, b.peer_access_hash, b.peer_phone, b.peer_first_name, b.peer_last_name, b.peer_username, b.peer_country_code, b.peer_verified, b.peer_support, b.peer_is_bot, b.peer_bot_info_version, b.peer_premium_until, b.peer_emoji_status_document_id, b.peer_emoji_status_until, b.peer_last_seen_at, b.from_user_user_id, b.from_user_access_hash, b.from_user_phone, b.from_user_first_name, b.from_user_last_name, b.from_user_username, b.from_user_country_code, b.from_user_verified, b.from_user_support, b.from_user_is_bot, b.from_user_bot_info_version, b.from_user_premium_until, b.from_user_emoji_status_document_id, b.from_user_emoji_status_until, b.from_user_last_seen_at
|
||||
FROM base b
|
||||
CROSS JOIN load_params p
|
||||
WHERE p.load_type = 'around'
|
||||
|
|
@ -2595,7 +2618,7 @@ around_forward AS (
|
|||
) f
|
||||
),
|
||||
around_backward AS (
|
||||
SELECT b.box_id, b.private_message_id, b.owner_user_id, b.peer_type, b.peer_id, b.from_user_id, b.message_date, b.ttl_period, b.expires_at, b.edit_date, b.outgoing, b.body, b.entities_json, b.silent, b.noforwards, b.reply_to_msg_id, b.reply_to_peer_type, b.reply_to_peer_id, b.reply_to_top_id, b.reply_to_story_id, b.quote_text, b.quote_entities_json, b.quote_offset, b.fwd_from_peer_type, b.fwd_from_peer_id, b.fwd_from_name, b.fwd_date, b.fwd_saved_from_peer_type, b.fwd_saved_from_peer_id, b.fwd_saved_from_msg_id, b.saved_peer_type, b.saved_peer_id, b.pts, b.media_json, b.media_unread, b.reaction_unread, b.pinned, b.via_bot_id, b.grouped_id, b.effect, b.reply_markup_json, b.rich_message_json, b.peer_user_id, b.peer_access_hash, b.peer_phone, b.peer_first_name, b.peer_last_name, b.peer_username, b.peer_country_code, b.peer_verified, b.peer_support, b.peer_is_bot, b.peer_bot_info_version, b.peer_premium_until, b.peer_emoji_status_document_id, b.peer_emoji_status_until, b.peer_last_seen_at, b.from_user_user_id, b.from_user_access_hash, b.from_user_phone, b.from_user_first_name, b.from_user_last_name, b.from_user_username, b.from_user_country_code, b.from_user_verified, b.from_user_support, b.from_user_is_bot, b.from_user_bot_info_version, b.from_user_premium_until, b.from_user_emoji_status_document_id, b.from_user_emoji_status_until, b.from_user_last_seen_at
|
||||
SELECT b.box_id, b.private_message_id, b.owner_user_id, b.peer_type, b.peer_id, b.from_user_id, b.message_date, b.ttl_period, b.expires_at, b.edit_date, b.hide_edited, b.outgoing, b.body, b.entities_json, b.silent, b.noforwards, b.reply_to_msg_id, b.reply_to_peer_type, b.reply_to_peer_id, b.reply_to_top_id, b.reply_to_story_id, b.quote_text, b.quote_entities_json, b.quote_offset, b.fwd_from_peer_type, b.fwd_from_peer_id, b.fwd_from_name, b.fwd_date, b.fwd_saved_from_peer_type, b.fwd_saved_from_peer_id, b.fwd_saved_from_msg_id, b.saved_peer_type, b.saved_peer_id, b.pts, b.media_json, b.media_unread, b.reaction_unread, b.pinned, b.via_bot_id, b.grouped_id, b.effect, b.reply_markup_json, b.rich_message_json, b.peer_user_id, b.peer_access_hash, b.peer_phone, b.peer_first_name, b.peer_last_name, b.peer_username, b.peer_country_code, b.peer_verified, b.peer_support, b.peer_is_bot, b.peer_bot_info_version, b.peer_premium_until, b.peer_emoji_status_document_id, b.peer_emoji_status_until, b.peer_last_seen_at, b.from_user_user_id, b.from_user_access_hash, b.from_user_phone, b.from_user_first_name, b.from_user_last_name, b.from_user_username, b.from_user_country_code, b.from_user_verified, b.from_user_support, b.from_user_is_bot, b.from_user_bot_info_version, b.from_user_premium_until, b.from_user_emoji_status_document_id, b.from_user_emoji_status_until, b.from_user_last_seen_at
|
||||
FROM base b
|
||||
CROSS JOIN load_params p
|
||||
WHERE p.load_type = 'around'
|
||||
|
|
@ -2607,9 +2630,9 @@ around_backward AS (
|
|||
LIMIT GREATEST((SELECT limit_count + add_offset FROM load_params), 0)
|
||||
),
|
||||
forward AS (
|
||||
SELECT f.box_id, f.private_message_id, f.owner_user_id, f.peer_type, f.peer_id, f.from_user_id, f.message_date, f.ttl_period, f.expires_at, f.edit_date, f.outgoing, f.body, f.entities_json, f.silent, f.noforwards, f.reply_to_msg_id, f.reply_to_peer_type, f.reply_to_peer_id, f.reply_to_top_id, f.reply_to_story_id, f.quote_text, f.quote_entities_json, f.quote_offset, f.fwd_from_peer_type, f.fwd_from_peer_id, f.fwd_from_name, f.fwd_date, f.fwd_saved_from_peer_type, f.fwd_saved_from_peer_id, f.fwd_saved_from_msg_id, f.saved_peer_type, f.saved_peer_id, f.pts, f.media_json, f.media_unread, f.reaction_unread, f.pinned, f.via_bot_id, f.grouped_id, f.effect, f.reply_markup_json, f.rich_message_json, f.peer_user_id, f.peer_access_hash, f.peer_phone, f.peer_first_name, f.peer_last_name, f.peer_username, f.peer_country_code, f.peer_verified, f.peer_support, f.peer_is_bot, f.peer_bot_info_version, f.peer_premium_until, f.peer_emoji_status_document_id, f.peer_emoji_status_until, f.peer_last_seen_at, f.from_user_user_id, f.from_user_access_hash, f.from_user_phone, f.from_user_first_name, f.from_user_last_name, f.from_user_username, f.from_user_country_code, f.from_user_verified, f.from_user_support, f.from_user_is_bot, f.from_user_bot_info_version, f.from_user_premium_until, f.from_user_emoji_status_document_id, f.from_user_emoji_status_until, f.from_user_last_seen_at
|
||||
SELECT f.box_id, f.private_message_id, f.owner_user_id, f.peer_type, f.peer_id, f.from_user_id, f.message_date, f.ttl_period, f.expires_at, f.edit_date, f.hide_edited, f.outgoing, f.body, f.entities_json, f.silent, f.noforwards, f.reply_to_msg_id, f.reply_to_peer_type, f.reply_to_peer_id, f.reply_to_top_id, f.reply_to_story_id, f.quote_text, f.quote_entities_json, f.quote_offset, f.fwd_from_peer_type, f.fwd_from_peer_id, f.fwd_from_name, f.fwd_date, f.fwd_saved_from_peer_type, f.fwd_saved_from_peer_id, f.fwd_saved_from_msg_id, f.saved_peer_type, f.saved_peer_id, f.pts, f.media_json, f.media_unread, f.reaction_unread, f.pinned, f.via_bot_id, f.grouped_id, f.effect, f.reply_markup_json, f.rich_message_json, f.peer_user_id, f.peer_access_hash, f.peer_phone, f.peer_first_name, f.peer_last_name, f.peer_username, f.peer_country_code, f.peer_verified, f.peer_support, f.peer_is_bot, f.peer_bot_info_version, f.peer_premium_until, f.peer_emoji_status_document_id, f.peer_emoji_status_until, f.peer_last_seen_at, f.from_user_user_id, f.from_user_access_hash, f.from_user_phone, f.from_user_first_name, f.from_user_last_name, f.from_user_username, f.from_user_country_code, f.from_user_verified, f.from_user_support, f.from_user_is_bot, f.from_user_bot_info_version, f.from_user_premium_until, f.from_user_emoji_status_document_id, f.from_user_emoji_status_until, f.from_user_last_seen_at
|
||||
FROM (
|
||||
SELECT b.box_id, b.private_message_id, b.owner_user_id, b.peer_type, b.peer_id, b.from_user_id, b.message_date, b.ttl_period, b.expires_at, b.edit_date, b.outgoing, b.body, b.entities_json, b.silent, b.noforwards, b.reply_to_msg_id, b.reply_to_peer_type, b.reply_to_peer_id, b.reply_to_top_id, b.reply_to_story_id, b.quote_text, b.quote_entities_json, b.quote_offset, b.fwd_from_peer_type, b.fwd_from_peer_id, b.fwd_from_name, b.fwd_date, b.fwd_saved_from_peer_type, b.fwd_saved_from_peer_id, b.fwd_saved_from_msg_id, b.saved_peer_type, b.saved_peer_id, b.pts, b.media_json, b.media_unread, b.reaction_unread, b.pinned, b.via_bot_id, b.grouped_id, b.effect, b.reply_markup_json, b.rich_message_json, b.peer_user_id, b.peer_access_hash, b.peer_phone, b.peer_first_name, b.peer_last_name, b.peer_username, b.peer_country_code, b.peer_verified, b.peer_support, b.peer_is_bot, b.peer_bot_info_version, b.peer_premium_until, b.peer_emoji_status_document_id, b.peer_emoji_status_until, b.peer_last_seen_at, b.from_user_user_id, b.from_user_access_hash, b.from_user_phone, b.from_user_first_name, b.from_user_last_name, b.from_user_username, b.from_user_country_code, b.from_user_verified, b.from_user_support, b.from_user_is_bot, b.from_user_bot_info_version, b.from_user_premium_until, b.from_user_emoji_status_document_id, b.from_user_emoji_status_until, b.from_user_last_seen_at
|
||||
SELECT b.box_id, b.private_message_id, b.owner_user_id, b.peer_type, b.peer_id, b.from_user_id, b.message_date, b.ttl_period, b.expires_at, b.edit_date, b.hide_edited, b.outgoing, b.body, b.entities_json, b.silent, b.noforwards, b.reply_to_msg_id, b.reply_to_peer_type, b.reply_to_peer_id, b.reply_to_top_id, b.reply_to_story_id, b.quote_text, b.quote_entities_json, b.quote_offset, b.fwd_from_peer_type, b.fwd_from_peer_id, b.fwd_from_name, b.fwd_date, b.fwd_saved_from_peer_type, b.fwd_saved_from_peer_id, b.fwd_saved_from_msg_id, b.saved_peer_type, b.saved_peer_id, b.pts, b.media_json, b.media_unread, b.reaction_unread, b.pinned, b.via_bot_id, b.grouped_id, b.effect, b.reply_markup_json, b.rich_message_json, b.peer_user_id, b.peer_access_hash, b.peer_phone, b.peer_first_name, b.peer_last_name, b.peer_username, b.peer_country_code, b.peer_verified, b.peer_support, b.peer_is_bot, b.peer_bot_info_version, b.peer_premium_until, b.peer_emoji_status_document_id, b.peer_emoji_status_until, b.peer_last_seen_at, b.from_user_user_id, b.from_user_access_hash, b.from_user_phone, b.from_user_first_name, b.from_user_last_name, b.from_user_username, b.from_user_country_code, b.from_user_verified, b.from_user_support, b.from_user_is_bot, b.from_user_bot_info_version, b.from_user_premium_until, b.from_user_emoji_status_document_id, b.from_user_emoji_status_until, b.from_user_last_seen_at
|
||||
FROM base b
|
||||
CROSS JOIN load_params p
|
||||
WHERE p.load_type = 'forward'
|
||||
|
|
@ -2622,13 +2645,13 @@ forward AS (
|
|||
) f
|
||||
),
|
||||
paged AS (
|
||||
SELECT box_id, private_message_id, owner_user_id, peer_type, peer_id, from_user_id, message_date, ttl_period, expires_at, edit_date, outgoing, body, entities_json, silent, noforwards, reply_to_msg_id, reply_to_peer_type, reply_to_peer_id, reply_to_top_id, reply_to_story_id, quote_text, quote_entities_json, quote_offset, fwd_from_peer_type, fwd_from_peer_id, fwd_from_name, fwd_date, fwd_saved_from_peer_type, fwd_saved_from_peer_id, fwd_saved_from_msg_id, saved_peer_type, saved_peer_id, pts, media_json, media_unread, reaction_unread, pinned, via_bot_id, grouped_id, effect, reply_markup_json, rich_message_json, peer_user_id, peer_access_hash, peer_phone, peer_first_name, peer_last_name, peer_username, peer_country_code, peer_verified, peer_support, peer_is_bot, peer_bot_info_version, peer_premium_until, peer_emoji_status_document_id, peer_emoji_status_until, peer_last_seen_at, from_user_user_id, from_user_access_hash, from_user_phone, from_user_first_name, from_user_last_name, from_user_username, from_user_country_code, from_user_verified, from_user_support, from_user_is_bot, from_user_bot_info_version, from_user_premium_until, from_user_emoji_status_document_id, from_user_emoji_status_until, from_user_last_seen_at FROM backward
|
||||
SELECT box_id, private_message_id, owner_user_id, peer_type, peer_id, from_user_id, message_date, ttl_period, expires_at, edit_date, hide_edited, outgoing, body, entities_json, silent, noforwards, reply_to_msg_id, reply_to_peer_type, reply_to_peer_id, reply_to_top_id, reply_to_story_id, quote_text, quote_entities_json, quote_offset, fwd_from_peer_type, fwd_from_peer_id, fwd_from_name, fwd_date, fwd_saved_from_peer_type, fwd_saved_from_peer_id, fwd_saved_from_msg_id, saved_peer_type, saved_peer_id, pts, media_json, media_unread, reaction_unread, pinned, via_bot_id, grouped_id, effect, reply_markup_json, rich_message_json, peer_user_id, peer_access_hash, peer_phone, peer_first_name, peer_last_name, peer_username, peer_country_code, peer_verified, peer_support, peer_is_bot, peer_bot_info_version, peer_premium_until, peer_emoji_status_document_id, peer_emoji_status_until, peer_last_seen_at, from_user_user_id, from_user_access_hash, from_user_phone, from_user_first_name, from_user_last_name, from_user_username, from_user_country_code, from_user_verified, from_user_support, from_user_is_bot, from_user_bot_info_version, from_user_premium_until, from_user_emoji_status_document_id, from_user_emoji_status_until, from_user_last_seen_at FROM backward
|
||||
UNION ALL
|
||||
SELECT box_id, private_message_id, owner_user_id, peer_type, peer_id, from_user_id, message_date, ttl_period, expires_at, edit_date, outgoing, body, entities_json, silent, noforwards, reply_to_msg_id, reply_to_peer_type, reply_to_peer_id, reply_to_top_id, reply_to_story_id, quote_text, quote_entities_json, quote_offset, fwd_from_peer_type, fwd_from_peer_id, fwd_from_name, fwd_date, fwd_saved_from_peer_type, fwd_saved_from_peer_id, fwd_saved_from_msg_id, saved_peer_type, saved_peer_id, pts, media_json, media_unread, reaction_unread, pinned, via_bot_id, grouped_id, effect, reply_markup_json, rich_message_json, peer_user_id, peer_access_hash, peer_phone, peer_first_name, peer_last_name, peer_username, peer_country_code, peer_verified, peer_support, peer_is_bot, peer_bot_info_version, peer_premium_until, peer_emoji_status_document_id, peer_emoji_status_until, peer_last_seen_at, from_user_user_id, from_user_access_hash, from_user_phone, from_user_first_name, from_user_last_name, from_user_username, from_user_country_code, from_user_verified, from_user_support, from_user_is_bot, from_user_bot_info_version, from_user_premium_until, from_user_emoji_status_document_id, from_user_emoji_status_until, from_user_last_seen_at FROM around_forward
|
||||
SELECT box_id, private_message_id, owner_user_id, peer_type, peer_id, from_user_id, message_date, ttl_period, expires_at, edit_date, hide_edited, outgoing, body, entities_json, silent, noforwards, reply_to_msg_id, reply_to_peer_type, reply_to_peer_id, reply_to_top_id, reply_to_story_id, quote_text, quote_entities_json, quote_offset, fwd_from_peer_type, fwd_from_peer_id, fwd_from_name, fwd_date, fwd_saved_from_peer_type, fwd_saved_from_peer_id, fwd_saved_from_msg_id, saved_peer_type, saved_peer_id, pts, media_json, media_unread, reaction_unread, pinned, via_bot_id, grouped_id, effect, reply_markup_json, rich_message_json, peer_user_id, peer_access_hash, peer_phone, peer_first_name, peer_last_name, peer_username, peer_country_code, peer_verified, peer_support, peer_is_bot, peer_bot_info_version, peer_premium_until, peer_emoji_status_document_id, peer_emoji_status_until, peer_last_seen_at, from_user_user_id, from_user_access_hash, from_user_phone, from_user_first_name, from_user_last_name, from_user_username, from_user_country_code, from_user_verified, from_user_support, from_user_is_bot, from_user_bot_info_version, from_user_premium_until, from_user_emoji_status_document_id, from_user_emoji_status_until, from_user_last_seen_at FROM around_forward
|
||||
UNION ALL
|
||||
SELECT box_id, private_message_id, owner_user_id, peer_type, peer_id, from_user_id, message_date, ttl_period, expires_at, edit_date, outgoing, body, entities_json, silent, noforwards, reply_to_msg_id, reply_to_peer_type, reply_to_peer_id, reply_to_top_id, reply_to_story_id, quote_text, quote_entities_json, quote_offset, fwd_from_peer_type, fwd_from_peer_id, fwd_from_name, fwd_date, fwd_saved_from_peer_type, fwd_saved_from_peer_id, fwd_saved_from_msg_id, saved_peer_type, saved_peer_id, pts, media_json, media_unread, reaction_unread, pinned, via_bot_id, grouped_id, effect, reply_markup_json, rich_message_json, peer_user_id, peer_access_hash, peer_phone, peer_first_name, peer_last_name, peer_username, peer_country_code, peer_verified, peer_support, peer_is_bot, peer_bot_info_version, peer_premium_until, peer_emoji_status_document_id, peer_emoji_status_until, peer_last_seen_at, from_user_user_id, from_user_access_hash, from_user_phone, from_user_first_name, from_user_last_name, from_user_username, from_user_country_code, from_user_verified, from_user_support, from_user_is_bot, from_user_bot_info_version, from_user_premium_until, from_user_emoji_status_document_id, from_user_emoji_status_until, from_user_last_seen_at FROM around_backward
|
||||
SELECT box_id, private_message_id, owner_user_id, peer_type, peer_id, from_user_id, message_date, ttl_period, expires_at, edit_date, hide_edited, outgoing, body, entities_json, silent, noforwards, reply_to_msg_id, reply_to_peer_type, reply_to_peer_id, reply_to_top_id, reply_to_story_id, quote_text, quote_entities_json, quote_offset, fwd_from_peer_type, fwd_from_peer_id, fwd_from_name, fwd_date, fwd_saved_from_peer_type, fwd_saved_from_peer_id, fwd_saved_from_msg_id, saved_peer_type, saved_peer_id, pts, media_json, media_unread, reaction_unread, pinned, via_bot_id, grouped_id, effect, reply_markup_json, rich_message_json, peer_user_id, peer_access_hash, peer_phone, peer_first_name, peer_last_name, peer_username, peer_country_code, peer_verified, peer_support, peer_is_bot, peer_bot_info_version, peer_premium_until, peer_emoji_status_document_id, peer_emoji_status_until, peer_last_seen_at, from_user_user_id, from_user_access_hash, from_user_phone, from_user_first_name, from_user_last_name, from_user_username, from_user_country_code, from_user_verified, from_user_support, from_user_is_bot, from_user_bot_info_version, from_user_premium_until, from_user_emoji_status_document_id, from_user_emoji_status_until, from_user_last_seen_at FROM around_backward
|
||||
UNION ALL
|
||||
SELECT box_id, private_message_id, owner_user_id, peer_type, peer_id, from_user_id, message_date, ttl_period, expires_at, edit_date, outgoing, body, entities_json, silent, noforwards, reply_to_msg_id, reply_to_peer_type, reply_to_peer_id, reply_to_top_id, reply_to_story_id, quote_text, quote_entities_json, quote_offset, fwd_from_peer_type, fwd_from_peer_id, fwd_from_name, fwd_date, fwd_saved_from_peer_type, fwd_saved_from_peer_id, fwd_saved_from_msg_id, saved_peer_type, saved_peer_id, pts, media_json, media_unread, reaction_unread, pinned, via_bot_id, grouped_id, effect, reply_markup_json, rich_message_json, peer_user_id, peer_access_hash, peer_phone, peer_first_name, peer_last_name, peer_username, peer_country_code, peer_verified, peer_support, peer_is_bot, peer_bot_info_version, peer_premium_until, peer_emoji_status_document_id, peer_emoji_status_until, peer_last_seen_at, from_user_user_id, from_user_access_hash, from_user_phone, from_user_first_name, from_user_last_name, from_user_username, from_user_country_code, from_user_verified, from_user_support, from_user_is_bot, from_user_bot_info_version, from_user_premium_until, from_user_emoji_status_document_id, from_user_emoji_status_until, from_user_last_seen_at FROM forward
|
||||
SELECT box_id, private_message_id, owner_user_id, peer_type, peer_id, from_user_id, message_date, ttl_period, expires_at, edit_date, hide_edited, outgoing, body, entities_json, silent, noforwards, reply_to_msg_id, reply_to_peer_type, reply_to_peer_id, reply_to_top_id, reply_to_story_id, quote_text, quote_entities_json, quote_offset, fwd_from_peer_type, fwd_from_peer_id, fwd_from_name, fwd_date, fwd_saved_from_peer_type, fwd_saved_from_peer_id, fwd_saved_from_msg_id, saved_peer_type, saved_peer_id, pts, media_json, media_unread, reaction_unread, pinned, via_bot_id, grouped_id, effect, reply_markup_json, rich_message_json, peer_user_id, peer_access_hash, peer_phone, peer_first_name, peer_last_name, peer_username, peer_country_code, peer_verified, peer_support, peer_is_bot, peer_bot_info_version, peer_premium_until, peer_emoji_status_document_id, peer_emoji_status_until, peer_last_seen_at, from_user_user_id, from_user_access_hash, from_user_phone, from_user_first_name, from_user_last_name, from_user_username, from_user_country_code, from_user_verified, from_user_support, from_user_is_bot, from_user_bot_info_version, from_user_premium_until, from_user_emoji_status_document_id, from_user_emoji_status_until, from_user_last_seen_at FROM forward
|
||||
)
|
||||
SELECT
|
||||
box_id,
|
||||
|
|
@ -2641,6 +2664,7 @@ SELECT
|
|||
ttl_period,
|
||||
expires_at,
|
||||
edit_date,
|
||||
hide_edited,
|
||||
outgoing,
|
||||
body,
|
||||
entities_json,
|
||||
|
|
@ -2739,6 +2763,7 @@ type ListMessagesByUserRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -2841,6 +2866,7 @@ func (q *Queries) ListMessagesByUser(ctx context.Context, arg ListMessagesByUser
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -2927,6 +2953,7 @@ SELECT
|
|||
ttl_period,
|
||||
expires_at,
|
||||
edit_date,
|
||||
hide_edited,
|
||||
outgoing,
|
||||
body,
|
||||
entities::text AS entities_json,
|
||||
|
|
@ -2987,6 +3014,7 @@ type ListUnreadReactionMessageBoxesRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -3046,6 +3074,7 @@ func (q *Queries) ListUnreadReactionMessageBoxes(ctx context.Context, arg ListUn
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -3102,6 +3131,7 @@ SELECT
|
|||
ttl_period,
|
||||
expires_at,
|
||||
edit_date,
|
||||
hide_edited,
|
||||
outgoing,
|
||||
body,
|
||||
entities::text AS entities_json,
|
||||
|
|
@ -3161,6 +3191,7 @@ type ListVisibleMessageBoxesByPrivateMessageRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -3216,6 +3247,7 @@ func (q *Queries) ListVisibleMessageBoxesByPrivateMessage(ctx context.Context, a
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -3517,13 +3549,14 @@ UPDATE message_boxes
|
|||
SET body = $1::text,
|
||||
entities = $2::jsonb,
|
||||
edit_date = $3::int,
|
||||
pts = $4::int,
|
||||
hide_edited = $4::boolean,
|
||||
pts = $5::int,
|
||||
reply_markup = CASE
|
||||
WHEN $5::boolean THEN $6::jsonb
|
||||
WHEN $6::boolean THEN $7::jsonb
|
||||
ELSE reply_markup
|
||||
END
|
||||
WHERE owner_user_id = $7::bigint
|
||||
AND box_id = $8::int
|
||||
WHERE owner_user_id = $8::bigint
|
||||
AND box_id = $9::int
|
||||
AND NOT deleted
|
||||
RETURNING
|
||||
box_id,
|
||||
|
|
@ -3537,6 +3570,7 @@ RETURNING
|
|||
ttl_period,
|
||||
expires_at,
|
||||
edit_date,
|
||||
hide_edited,
|
||||
outgoing,
|
||||
body,
|
||||
entities::text AS entities_json,
|
||||
|
|
@ -3575,6 +3609,7 @@ type UpdateMessageBoxEditParams struct {
|
|||
Body string
|
||||
EntitiesJson []byte
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Pts int32
|
||||
SetReplyMarkup bool
|
||||
ReplyMarkupJson []byte
|
||||
|
|
@ -3594,6 +3629,7 @@ type UpdateMessageBoxEditRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -3633,6 +3669,7 @@ func (q *Queries) UpdateMessageBoxEdit(ctx context.Context, arg UpdateMessageBox
|
|||
arg.Body,
|
||||
arg.EntitiesJson,
|
||||
arg.EditDate,
|
||||
arg.HideEdited,
|
||||
arg.Pts,
|
||||
arg.SetReplyMarkup,
|
||||
arg.ReplyMarkupJson,
|
||||
|
|
@ -3652,6 +3689,7 @@ func (q *Queries) UpdateMessageBoxEdit(ctx context.Context, arg UpdateMessageBox
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -3693,18 +3731,20 @@ UPDATE private_messages
|
|||
SET body = $1::text,
|
||||
entities = $2::jsonb,
|
||||
edit_date = $3::int,
|
||||
hide_edited = $4::boolean,
|
||||
reply_markup = CASE
|
||||
WHEN $4::boolean THEN $5::jsonb
|
||||
WHEN $5::boolean THEN $6::jsonb
|
||||
ELSE reply_markup
|
||||
END
|
||||
WHERE sender_user_id = $6::bigint
|
||||
AND id = $7::bigint
|
||||
WHERE sender_user_id = $7::bigint
|
||||
AND id = $8::bigint
|
||||
`
|
||||
|
||||
type UpdatePrivateMessageEditParams struct {
|
||||
Body string
|
||||
EntitiesJson []byte
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
SetReplyMarkup bool
|
||||
ReplyMarkupJson []byte
|
||||
SenderUserID int64
|
||||
|
|
@ -3716,6 +3756,7 @@ func (q *Queries) UpdatePrivateMessageEdit(ctx context.Context, arg UpdatePrivat
|
|||
arg.Body,
|
||||
arg.EntitiesJson,
|
||||
arg.EditDate,
|
||||
arg.HideEdited,
|
||||
arg.SetReplyMarkup,
|
||||
arg.ReplyMarkupJson,
|
||||
arg.SenderUserID,
|
||||
|
|
|
|||
|
|
@ -53,6 +53,15 @@ type AccountReactionSetting struct {
|
|||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type AccountSendRestriction struct {
|
||||
UserID int64
|
||||
Frozen bool
|
||||
Reason string
|
||||
Actor string
|
||||
CommandID string
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type AccountSetting struct {
|
||||
UserID int64
|
||||
ArchiveAndMuteNewNoncontactPeers bool
|
||||
|
|
@ -68,6 +77,60 @@ type AccountSetting struct {
|
|||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type AdminAuditLog struct {
|
||||
ID int64
|
||||
CommandID string
|
||||
Actor string
|
||||
Action string
|
||||
TargetUserID int64
|
||||
TargetPeerType string
|
||||
TargetPeerID int64
|
||||
DryRun bool
|
||||
Reason string
|
||||
Request []byte
|
||||
Result []byte
|
||||
Status string
|
||||
Error string
|
||||
CreatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type AdminCommand struct {
|
||||
CommandID string
|
||||
Actor string
|
||||
Action string
|
||||
TargetUserID int64
|
||||
TargetPeerType string
|
||||
TargetPeerID int64
|
||||
DryRun bool
|
||||
Reason string
|
||||
Request []byte
|
||||
Result []byte
|
||||
Status string
|
||||
Error string
|
||||
CreatedAt pgtype.Timestamptz
|
||||
CompletedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type AiComposeTone struct {
|
||||
ID int64
|
||||
AccessHash int64
|
||||
OwnerUserID int64
|
||||
Slug string
|
||||
Title string
|
||||
EmojiID int64
|
||||
Prompt string
|
||||
DisplayAuthor bool
|
||||
InstallsCount int32
|
||||
CreatedAt pgtype.Timestamptz
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type AiComposeToneSafe struct {
|
||||
UserID int64
|
||||
ToneID int64
|
||||
SavedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type AppConfig struct {
|
||||
Client string
|
||||
Hash int32
|
||||
|
|
@ -75,6 +138,31 @@ type AppConfig struct {
|
|||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type AttachMenuBot struct {
|
||||
BotUserID int64
|
||||
AppID *int64
|
||||
ShortName string
|
||||
Inactive bool
|
||||
HasSettings bool
|
||||
RequestWriteAccess bool
|
||||
ShowInAttachMenu bool
|
||||
ShowInSideMenu bool
|
||||
SideMenuDisclaimerNeeded bool
|
||||
PeerTypes []string
|
||||
Icons []byte
|
||||
CreatedAt pgtype.Timestamptz
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type AttachMenuUserState struct {
|
||||
UserID int64
|
||||
BotUserID int64
|
||||
Enabled bool
|
||||
WriteAllowed bool
|
||||
CreatedAt pgtype.Timestamptz
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type AuthKey struct {
|
||||
AuthKeyID int64
|
||||
Body []byte
|
||||
|
|
@ -130,6 +218,46 @@ type Bot struct {
|
|||
BotInlineGeo bool
|
||||
}
|
||||
|
||||
type BotApp struct {
|
||||
ID int64
|
||||
BotUserID int64
|
||||
ShortName string
|
||||
Title string
|
||||
Description string
|
||||
Url string
|
||||
PhotoID int64
|
||||
DocumentID int64
|
||||
AccessHash int64
|
||||
Hash int64
|
||||
Inactive bool
|
||||
RequestWriteAccess bool
|
||||
HasSettings bool
|
||||
IsMain bool
|
||||
CreatedAt pgtype.Timestamptz
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type BotAppPreviewMedium struct {
|
||||
ID int64
|
||||
BotUserID int64
|
||||
AppID int64
|
||||
Position int32
|
||||
PhotoID int64
|
||||
DocumentID int64
|
||||
CreatedAt pgtype.Timestamptz
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type BotAppSetting struct {
|
||||
BotUserID int64
|
||||
PlaceholderPath []byte
|
||||
BackgroundColor *int32
|
||||
BackgroundDarkColor *int32
|
||||
HeaderColor *int32
|
||||
HeaderDarkColor *int32
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type BotChatState struct {
|
||||
BotUserID int64
|
||||
UserID int64
|
||||
|
|
@ -137,6 +265,14 @@ type BotChatState struct {
|
|||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type BotEmojiStatusPermission struct {
|
||||
BotUserID int64
|
||||
UserID int64
|
||||
Allowed bool
|
||||
CreatedAt pgtype.Timestamptz
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type BotUserPermission struct {
|
||||
BotUserID int64
|
||||
UserID int64
|
||||
|
|
@ -244,6 +380,8 @@ type Channel struct {
|
|||
BoostsUnrestrict int32
|
||||
Monoforum bool
|
||||
LinkedMonoforumID int64
|
||||
Wallpaper []byte
|
||||
Verified bool
|
||||
}
|
||||
|
||||
type ChannelAdminLogEvent struct {
|
||||
|
|
@ -525,12 +663,6 @@ type ChannelUpdateEvent struct {
|
|||
CreatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type ChannelUsername struct {
|
||||
UsernameLower string
|
||||
ChannelID int64
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type Contact struct {
|
||||
UserID int64
|
||||
ContactUserID int64
|
||||
|
|
@ -707,19 +839,44 @@ type FileBlob struct {
|
|||
}
|
||||
|
||||
type GroupCall struct {
|
||||
CallID int64
|
||||
AccessHash int64
|
||||
ChannelID int64
|
||||
CreatorUserID int64
|
||||
State string
|
||||
Title string
|
||||
JoinMuted bool
|
||||
Version int32
|
||||
ParticipantsCount int32
|
||||
CreatedAt int32
|
||||
DiscardedAt int32
|
||||
Duration int32
|
||||
StartedMsgID int32
|
||||
CallID int64
|
||||
AccessHash int64
|
||||
ChannelID int64
|
||||
CreatorUserID int64
|
||||
State string
|
||||
Title string
|
||||
JoinMuted bool
|
||||
Version int32
|
||||
ParticipantsCount int32
|
||||
CreatedAt int32
|
||||
DiscardedAt int32
|
||||
Duration int32
|
||||
StartedMsgID int32
|
||||
Kind string
|
||||
InviteSlug string
|
||||
InviteLink string
|
||||
RandomID int64
|
||||
MigratedFromPhoneCallID int64
|
||||
}
|
||||
|
||||
type GroupCallChainBlock struct {
|
||||
CallID int64
|
||||
SubChainID int32
|
||||
BlockOffset int32
|
||||
Block []byte
|
||||
CreatedAt int32
|
||||
AuthorUserID int64
|
||||
}
|
||||
|
||||
type GroupCallInvite struct {
|
||||
CallID int64
|
||||
InviterUserID int64
|
||||
InviteeUserID int64
|
||||
MessageID int32
|
||||
Status string
|
||||
Video bool
|
||||
CreatedAt int32
|
||||
UpdatedAt int32
|
||||
}
|
||||
|
||||
type GroupCallParticipant struct {
|
||||
|
|
@ -736,6 +893,8 @@ type GroupCallParticipant struct {
|
|||
PresentationJson []byte
|
||||
LeftCall bool
|
||||
LastCheckDate int32
|
||||
PublicKey []byte
|
||||
JoinBlock []byte
|
||||
}
|
||||
|
||||
type GroupCallParticipantOverride struct {
|
||||
|
|
@ -817,6 +976,7 @@ type MessageBox struct {
|
|||
GroupedID int64
|
||||
ReplyToStoryID int32
|
||||
Effect int64
|
||||
HideEdited bool
|
||||
}
|
||||
|
||||
type MessageBoxMedium struct {
|
||||
|
|
@ -853,6 +1013,29 @@ type PasskeyCredential struct {
|
|||
LastUsedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type PeerStarGift struct {
|
||||
ID int64
|
||||
OwnerPeerID int64
|
||||
FromUserID int64
|
||||
GiftID int64
|
||||
MsgID int32
|
||||
GiftDate int32
|
||||
NameHidden bool
|
||||
Unsaved bool
|
||||
Converted bool
|
||||
ConvertStars int64
|
||||
Message string
|
||||
OwnerPeerType string
|
||||
SavedID int64
|
||||
}
|
||||
|
||||
type PeerUsername struct {
|
||||
UsernameLower string
|
||||
PeerType string
|
||||
PeerID int64
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type Photo struct {
|
||||
ID int64
|
||||
AccessHash int64
|
||||
|
|
@ -930,6 +1113,7 @@ type PrivateMessage struct {
|
|||
GroupedID int64
|
||||
ReplyToStoryID int32
|
||||
Effect int64
|
||||
HideEdited bool
|
||||
}
|
||||
|
||||
type PrivateMessageReaction struct {
|
||||
|
|
@ -1065,6 +1249,12 @@ type SecretQtsWatermark struct {
|
|||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type SeedState struct {
|
||||
Key string
|
||||
ContentHash string
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type StarsBalance struct {
|
||||
UserID int64
|
||||
Balance int64
|
||||
|
|
@ -1109,6 +1299,12 @@ type StickerSet struct {
|
|||
SortOrder int32
|
||||
SystemKey string
|
||||
CreatedAt pgtype.Timestamptz
|
||||
CreatorUserID int64
|
||||
TextColor bool
|
||||
Deleted bool
|
||||
Software string
|
||||
Keywords []byte
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type Story struct {
|
||||
|
|
@ -1139,6 +1335,16 @@ type Story struct {
|
|||
FwdFrom []byte
|
||||
}
|
||||
|
||||
type StoryExposure struct {
|
||||
OwnerPeerType string
|
||||
OwnerPeerID int64
|
||||
StoryID int32
|
||||
ViewerUserID int64
|
||||
Date int32
|
||||
CreatedAt pgtype.Timestamptz
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type StoryHiddenPeer struct {
|
||||
ViewerUserID int64
|
||||
OwnerPeerType string
|
||||
|
|
@ -1295,20 +1501,6 @@ type UserSavedReactionTag struct {
|
|||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type UserStarGift struct {
|
||||
ID int64
|
||||
OwnerUserID int64
|
||||
FromUserID int64
|
||||
GiftID int64
|
||||
MsgID int32
|
||||
GiftDate int32
|
||||
NameHidden bool
|
||||
Unsaved bool
|
||||
Converted bool
|
||||
ConvertStars int64
|
||||
Message string
|
||||
}
|
||||
|
||||
type UserStickerCollection struct {
|
||||
OwnerUserID int64
|
||||
Kind string
|
||||
|
|
@ -1316,6 +1508,16 @@ type UserStickerCollection struct {
|
|||
UsedAt int32
|
||||
}
|
||||
|
||||
type UserStickerSet struct {
|
||||
OwnerUserID int64
|
||||
StickerSetID int64
|
||||
SetKind string
|
||||
Archived bool
|
||||
InstalledDate int32
|
||||
OrderValue int64
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type UserTopReaction struct {
|
||||
UserID int64
|
||||
ReactionType string
|
||||
|
|
@ -1369,3 +1571,25 @@ type WebPage struct {
|
|||
CreatedAt int64
|
||||
RefreshedAt int64
|
||||
}
|
||||
|
||||
type WebviewCustomMethodQuery struct {
|
||||
ID string
|
||||
BotUserID int64
|
||||
UserID int64
|
||||
CustomMethod string
|
||||
Params []byte
|
||||
CreatedAt pgtype.Timestamptz
|
||||
ExpiresAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type WebviewRequestedButton struct {
|
||||
WebappReqID string
|
||||
BotUserID int64
|
||||
UserID int64
|
||||
ButtonID int32
|
||||
Text string
|
||||
PeerType string
|
||||
MaxQuantity int32
|
||||
CreatedAt pgtype.Timestamptz
|
||||
ExpiresAt pgtype.Timestamptz
|
||||
}
|
||||
|
|
|
|||
|
|
@ -260,6 +260,7 @@ SELECT
|
|||
m.ttl_period,
|
||||
m.expires_at,
|
||||
m.edit_date,
|
||||
m.hide_edited,
|
||||
m.outgoing,
|
||||
m.body,
|
||||
m.entities::text AS entities_json,
|
||||
|
|
@ -317,6 +318,7 @@ type ListPinnedSavedDialogTopsRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -374,6 +376,7 @@ func (q *Queries) ListPinnedSavedDialogTops(ctx context.Context, ownerUserID int
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -443,6 +446,7 @@ SELECT
|
|||
m.ttl_period,
|
||||
m.expires_at,
|
||||
m.edit_date,
|
||||
m.hide_edited,
|
||||
m.outgoing,
|
||||
m.body,
|
||||
m.entities::text AS entities_json,
|
||||
|
|
@ -510,6 +514,7 @@ type ListSavedDialogTopsRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -576,6 +581,7 @@ func (q *Queries) ListSavedDialogTops(ctx context.Context, arg ListSavedDialogTo
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
@ -653,6 +659,7 @@ SELECT
|
|||
m.ttl_period,
|
||||
m.expires_at,
|
||||
m.edit_date,
|
||||
m.hide_edited,
|
||||
m.outgoing,
|
||||
m.body,
|
||||
m.entities::text AS entities_json,
|
||||
|
|
@ -716,6 +723,7 @@ type ListSavedDialogTopsByPeersRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
EntitiesJson string
|
||||
|
|
@ -773,6 +781,7 @@ func (q *Queries) ListSavedDialogTopsByPeers(ctx context.Context, arg ListSavedD
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.EntitiesJson,
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ SELECT
|
|||
COALESCE(m.ttl_period, 0)::int AS ttl_period,
|
||||
COALESCE(m.expires_at, 0)::int AS expires_at,
|
||||
COALESCE(m.edit_date, 0)::int AS edit_date,
|
||||
COALESCE(m.hide_edited, false)::boolean AS hide_edited,
|
||||
COALESCE(m.outgoing, false)::boolean AS outgoing,
|
||||
COALESCE(m.body, '')::text AS body,
|
||||
COALESCE(m.entities::text, '[]')::text AS message_entities_json,
|
||||
|
|
@ -285,6 +286,7 @@ type BatchListDispatchEventsRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
MessageEntitiesJson string
|
||||
|
|
@ -418,6 +420,7 @@ func (q *Queries) BatchListDispatchEvents(ctx context.Context, arg BatchListDisp
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.MessageEntitiesJson,
|
||||
|
|
@ -704,6 +707,7 @@ SELECT
|
|||
COALESCE(m.ttl_period, 0)::int AS ttl_period,
|
||||
COALESCE(m.expires_at, 0)::int AS expires_at,
|
||||
COALESCE(m.edit_date, 0)::int AS edit_date,
|
||||
COALESCE(m.hide_edited, false)::boolean AS hide_edited,
|
||||
COALESCE(m.outgoing, false)::boolean AS outgoing,
|
||||
COALESCE(m.body, '')::text AS body,
|
||||
COALESCE(m.entities::text, '[]')::text AS message_entities_json,
|
||||
|
|
@ -842,6 +846,7 @@ type ListUserUpdateEventsAfterRow struct {
|
|||
TtlPeriod int32
|
||||
ExpiresAt int32
|
||||
EditDate int32
|
||||
HideEdited bool
|
||||
Outgoing bool
|
||||
Body string
|
||||
MessageEntitiesJson string
|
||||
|
|
@ -973,6 +978,7 @@ func (q *Queries) ListUserUpdateEventsAfter(ctx context.Context, arg ListUserUpd
|
|||
&i.TtlPeriod,
|
||||
&i.ExpiresAt,
|
||||
&i.EditDate,
|
||||
&i.HideEdited,
|
||||
&i.Outgoing,
|
||||
&i.Body,
|
||||
&i.MessageEntitiesJson,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue