Skip to content
This repository has been archived by the owner on Sep 4, 2022. It is now read-only.

Commit

Permalink
schema updates. next to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sualeh Asif committed Jul 7, 2022
1 parent 0d8e2e2 commit e710faf
Showing 1 changed file with 28 additions and 18 deletions.
46 changes: 28 additions & 18 deletions schema/daemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -168,38 +168,48 @@ message RemoveFriendRequest { string unique_name = 1; }
message RemoveFriendResponse {}

message SendMessageRequest {
string unique_name = 1;
repeated string unique_name = 1;
string message = 2;
}

message SendMessageResponse {}

message BaseMessage {
// this ID is NOT the same as the ID in message.proto
// in particular, this ID is guaranteed to be unique among ALL messages (on a
// given device), whereas the ID in message.proto is only unique for each
// <sender, recipient> pair. the format of this ID is something like
// (to|from):sender:sequence_number
int32 id = 1;
string message = 2;
string unique_name = 3;
string display_name = 4;
message IncomingMaybeFriend {
string public_id = 1;

optional string unique_name = 2;
optional string display_name = 3;
}

message IncomingMessage {
BaseMessage m = 1;
google.protobuf.Timestamp delivered_at = 2;
bool seen = 3;
bool delivered = 4;
int32 uid = 1;
string message = 2;

string from_unique_name = 3;
string from_display_name = 4;

repeated IncomingMaybeFriend other_recipients = 5;

google.protobuf.Timestamp delivered_at = 6;
bool seen = 7;
bool delivered = 8;
}

message OutgoingMessage {
BaseMessage m = 1;
google.protobuf.Timestamp sent_at = 2;
message OutgoingFriend {
string unique_name = 1;
string display_name = 2;
bool delivered = 3;
google.protobuf.Timestamp delivered_at = 4;
}

message OutgoingMessage {
int32 uid = 1;
string message = 2;

repeated OutgoingFriend to_friends = 3;
google.protobuf.Timestamp sent_at = 4;
}

message GetMessagesRequest {
enum Filter {
ALL = 0;
Expand Down

0 comments on commit e710faf

Please sign in to comment.