From 33e90be18b1c73ec653c75bea3aeb2b5f8ef8863 Mon Sep 17 00:00:00 2001 From: sashaweiss Date: Tue, 20 Aug 2024 15:23:03 -0700 Subject: [PATCH] Drop the receivedAtTimestamp field from Reaction --- Backup.proto | 5 ++--- test-cases/incoming-message-with-edits.binproto | Bin 760 -> 758 bytes .../incoming-message-with-edits.jsonproto | 2 -- test-cases/outgoing-message-with-edits.binproto | Bin 363 -> 361 bytes .../outgoing-message-with-edits.jsonproto | 2 -- 5 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Backup.proto b/Backup.proto index 07fa115..a777f5f 100644 --- a/Backup.proto +++ b/Backup.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package signal.backup; option java_package = "org.thoughtcrime.securesms.backup.v2.proto"; +option swift_prefix = "BackupProto_"; message BackupInfo { uint64 version = 1; @@ -677,11 +678,9 @@ message Reaction { string emoji = 1; uint64 authorId = 2; uint64 sentTimestamp = 3; - // Optional because some clients may not track this data - optional uint64 receivedTimestamp = 4; // A higher sort order means that a reaction is more recent. Some clients may export this as // incrementing numbers (e.g. 1, 2, 3), others as timestamps. - uint64 sortOrder = 5; + uint64 sortOrder = 4; } message ChatUpdateMessage { diff --git a/test-cases/incoming-message-with-edits.binproto b/test-cases/incoming-message-with-edits.binproto index 6b6f0b8e1b8f22c32b8a3d8317f51d1917d0fee0..ce5c2996db103d73c5f16b08dec8871f929ded14 100644 GIT binary patch delta 39 vcmeyt`i*r1KNHJSMx{rSg_-&oLnbd`auHBqG~(f6`7nQJlK_iEngSC511<}d delta 41 xcmeyy`h#@?KNHJyMx`f{g_-&o!zM3cauL#CG~(l8`7nQJlK_iEnnJn;6964o3^o7& diff --git a/test-cases/incoming-message-with-edits.jsonproto b/test-cases/incoming-message-with-edits.jsonproto index 278943a..05fb6bf 100644 --- a/test-cases/incoming-message-with-edits.jsonproto +++ b/test-cases/incoming-message-with-edits.jsonproto @@ -174,14 +174,12 @@ "emoji": "👀", "authorId": 1, "sentTimestamp": 101, - // No `receivedTimestamp`, since we sent this reaction "sortOrder": 1 }, { "emoji": "🥂", "authorId": 4, // Self-react "sentTimestamp": 102, - "receivedTimestamp": 103, "sortOrder": 2 } ] diff --git a/test-cases/outgoing-message-with-edits.binproto b/test-cases/outgoing-message-with-edits.binproto index 57c232496b2081e27988b5b53803405d6f14c01e..d23d1011af8a6a0cd3397301f373bc5ceb72fe50 100644 GIT binary patch delta 37 tcmaFO^pa`9NtStxO0y@P&0*A^Y{e)qpulLv!^QGp{?aA^7KtWk&0#d0Y{e)qq`_#!$Hnqt{?aA^7Kt>4bPXl|6cY>q diff --git a/test-cases/outgoing-message-with-edits.jsonproto b/test-cases/outgoing-message-with-edits.jsonproto index 80916db..6d2f947 100644 --- a/test-cases/outgoing-message-with-edits.jsonproto +++ b/test-cases/outgoing-message-with-edits.jsonproto @@ -109,14 +109,12 @@ "emoji": "👀", "authorId": 1, // Self-react "sentTimestamp": 101, - // No `receivedTimestamp`, since we sent this reaction "sortOrder": 1 }, { "emoji": "🥂", "authorId": 4, "sentTimestamp": 102, - "receivedTimestamp": 103, "sortOrder": 2 } ]