Skip to content

Commit

Permalink
Drop the receivedAtTimestamp field from Reaction
Browse files Browse the repository at this point in the history
  • Loading branch information
sashaweiss committed Aug 20, 2024
1 parent d787489 commit 33e90be
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 7 deletions.
5 changes: 2 additions & 3 deletions Backup.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
Binary file modified test-cases/incoming-message-with-edits.binproto
Binary file not shown.
2 changes: 0 additions & 2 deletions test-cases/incoming-message-with-edits.jsonproto
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
Expand Down
Binary file modified test-cases/outgoing-message-with-edits.binproto
Binary file not shown.
2 changes: 0 additions & 2 deletions test-cases/outgoing-message-with-edits.jsonproto
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
Expand Down

0 comments on commit 33e90be

Please sign in to comment.