perf: sync protocol and core hardening updates
This commit is contained in:
parent
152fed3b87
commit
4390ebf5a9
283 changed files with 29231 additions and 2295 deletions
|
|
@ -4,6 +4,12 @@ WITH pm AS (
|
|||
sender_user_id,
|
||||
recipient_user_id,
|
||||
random_id,
|
||||
request_fingerprint,
|
||||
recipient_delivered,
|
||||
sender_box_id,
|
||||
sender_pts,
|
||||
recipient_box_id,
|
||||
recipient_pts,
|
||||
message_date,
|
||||
body,
|
||||
entities
|
||||
|
|
@ -11,6 +17,12 @@ WITH pm AS (
|
|||
sqlc.arg(from_user_id),
|
||||
sqlc.arg(owner_user_id),
|
||||
0,
|
||||
'\x'::bytea,
|
||||
false,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
sqlc.arg(message_date),
|
||||
sqlc.arg(body),
|
||||
sqlc.arg(entities_json)::jsonb
|
||||
|
|
@ -82,6 +94,12 @@ INSERT INTO private_messages (
|
|||
sender_user_id,
|
||||
recipient_user_id,
|
||||
random_id,
|
||||
request_fingerprint,
|
||||
recipient_delivered,
|
||||
sender_box_id,
|
||||
sender_pts,
|
||||
recipient_box_id,
|
||||
recipient_pts,
|
||||
message_date,
|
||||
ttl_period,
|
||||
expires_at,
|
||||
|
|
@ -108,7 +126,9 @@ INSERT INTO private_messages (
|
|||
grouped_id,
|
||||
effect
|
||||
) VALUES (
|
||||
$1, $2, $3, $4, sqlc.arg(ttl_period)::int, sqlc.arg(expires_at)::int, $5, sqlc.arg(entities_json)::jsonb,
|
||||
$1, $2, $3, sqlc.arg(request_fingerprint)::bytea, sqlc.arg(recipient_delivered)::boolean,
|
||||
0, 0, 0, 0,
|
||||
$4, sqlc.arg(ttl_period)::int, sqlc.arg(expires_at)::int, $5, sqlc.arg(entities_json)::jsonb,
|
||||
sqlc.arg(silent)::boolean,
|
||||
sqlc.arg(noforwards)::boolean,
|
||||
sqlc.arg(reply_to_msg_id)::int,
|
||||
|
|
@ -149,6 +169,17 @@ SELECT
|
|||
sender_user_id,
|
||||
recipient_user_id,
|
||||
random_id,
|
||||
request_fingerprint,
|
||||
recipient_delivered,
|
||||
sender_box_id,
|
||||
sender_pts,
|
||||
recipient_box_id,
|
||||
recipient_pts,
|
||||
sender_snapshot::text AS sender_snapshot_json,
|
||||
sender_delete_pts,
|
||||
sender_delete_pts_count,
|
||||
sender_delete_date,
|
||||
sender_delete_message_ids::text AS sender_delete_message_ids_json,
|
||||
message_date,
|
||||
ttl_period,
|
||||
expires_at,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue