Skip to content

Commit

Permalink
Handle incoming "viewed" sync messages
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn-Signal committed Jul 6, 2021
1 parent 4cd3da8 commit 45b599e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions protos/SignalService.proto
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,12 @@ message SyncMessage {
optional uint64 timestamp = 2;
}

message Viewed {
optional string senderE164 = 1;
optional string senderUuid = 3;
optional uint64 timestamp = 2;
}

message Configuration {
optional bool readReceipts = 1;
optional bool unidentifiedDeliveryIndicators = 2;
Expand Down Expand Up @@ -431,6 +437,8 @@ message SyncMessage {
optional FetchLatest fetchLatest = 12;
optional Keys keys = 13;
optional MessageRequestResponse messageRequestResponse = 14;
reserved 15; // not yet added
repeated Viewed viewed = 16;
}

message AttachmentPointer {
Expand Down
6 changes: 6 additions & 0 deletions ts/textsecure.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,7 @@ export declare class SyncMessageClass {
messageRequestResponse?: SyncMessageClass.MessageRequestResponse;
fetchLatest?: SyncMessageClass.FetchLatest;
keys?: SyncMessageClass.Keys;
viewed?: Array<SyncMessageClass.Viewed>;
}

// Note: we need to use namespaces to express nested classes in Typescript
Expand Down Expand Up @@ -1127,6 +1128,11 @@ export declare namespace SyncMessageClass {
senderUuid: string | null;
timestamp?: ProtoBigNumberType;
}
class Viewed {
sender: string | null;
senderUuid: string | null;
timestamp?: ProtoBigNumberType;
}
class Request {
type?: number;
}
Expand Down

0 comments on commit 45b599e

Please sign in to comment.