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

Commit

Permalink
fix a lot of things (but more things left to do)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvid220u committed Jul 12, 2022
1 parent 3ca2a38 commit cda89f0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions schema/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -31,19 +34,16 @@ 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 <sender,
// receiver> ordered pair. if the id is 0, then the message is a dummy
// message, with no actual msg to display to the user.
// TODO: to optimize space usage, we should merge the id here and the nonce
// 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.
Expand Down

0 comments on commit cda89f0

Please sign in to comment.