From cda89f090e21bcd9dc9afa87f0d5ac61f236ce29 Mon Sep 17 00:00:00 2001 From: Arvid Lunnemark Date: Tue, 12 Jul 2022 11:10:08 -0400 Subject: [PATCH] fix a lot of things (but more things left to do) --- schema/message.proto | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/schema/message.proto b/schema/message.proto index 8e47a37..befd159 100644 --- a/schema/message.proto +++ b/schema/message.proto @@ -16,8 +16,11 @@ package asphrclient; // keep this in sync with db.rs, SystemMessage enum SystemMessage { OUTGOING_INVITATION = 0; } -// TODO(sualeh): rename this to Message -message MsgProto { +// this message protobuf contains everything needed in +// a message. currently, messages only support a utf-8 message content +// as well as a list of cc-ed recipients. in the future, we may +// want to add pictures here, and more. +message Message { repeated string other_recipients = 1; string msg = 2; } @@ -31,8 +34,7 @@ message MsgProto { // // IMPORTANT: update GUARANTEED_MESSAGE_SIZE in client_lib.hpp whenever this is // updated. -// TODO(sualeh): rename this to Chunk -message Message { +message Chunk { // sequence_number is a unique id for the message. it is unique for a ordered pair. if the id is 0, then the message is a dummy // message, with no actual msg to display to the user. @@ -40,10 +42,8 @@ message Message { // used for encryption. this requires some careful thought with dummy // messages. uint32 sequence_number = 1; - // msg contains the actual UTF-8 message, if such a message exists - // In the future, we probably want this to be `bytes`, encoding a protobuf. - // The protobuf will contain a string message and possibly other information, - // like pictures or reply metadata. + // msg is a chunk of a byte sequence that alltogether form the serialization + // of a Message, defined above. this msg has a maximum length. bytes msg = 2; // if the message is a long message, this field contains the number of parts // it has this field is not set if the message isn't long.