-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support EncodedContent and transcript messages
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Message content encoding structures | ||
// Copied from V2 code so that we can eventually retire all V2 message content | ||
syntax = "proto3"; | ||
|
||
package xmtp.mls.message_contents; | ||
|
||
option go_package = "github.com/xmtp/proto/v3/go/mls/message_contents"; | ||
option java_package = "org.xmtp.proto.mls.message.contents"; | ||
|
||
// ContentTypeId is used to identify the type of content stored in a Message. | ||
message ContentTypeId { | ||
string authority_id = 1; // authority governing this content type | ||
string type_id = 2; // type identifier | ||
uint32 version_major = 3; // major version of the type | ||
uint32 version_minor = 4; // minor version of the type | ||
} | ||
|
||
// Recognized compression algorithms | ||
// protolint:disable ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH | ||
enum Compression { | ||
COMPRESSION_DEFLATE = 0; | ||
COMPRESSION_GZIP = 1; | ||
} | ||
// protolint:enable ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH | ||
|
||
// EncodedContent bundles the content with metadata identifying its type | ||
// and parameters required for correct decoding and presentation of the content. | ||
message EncodedContent { | ||
// content type identifier used to match the payload with | ||
// the correct decoding machinery | ||
ContentTypeId type = 1; | ||
// optional encoding parameters required to correctly decode the content | ||
map<string, string> parameters = 2; | ||
// optional fallback description of the content that can be used in case | ||
// the client cannot decode or render the content | ||
optional string fallback = 3; | ||
// optional compression; the value indicates algorithm used to | ||
// compress the encoded content bytes | ||
optional Compression compression = 5; | ||
// encoded content itself | ||
bytes content = 4; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Message content encoding structures | ||
syntax = "proto3"; | ||
|
||
package xmtp.mls.message_contents; | ||
|
||
option go_package = "github.com/xmtp/proto/v3/go/mls/message_contents"; | ||
option java_package = "org.xmtp.proto.mls.message.contents"; | ||
|
||
// A group member and affected installation IDs | ||
message Member { | ||
repeated bytes installation_ids = 1; | ||
string wallet_address = 2; | ||
} | ||
|
||
// The group membership change proto | ||
message GroupMembershipChange { | ||
repeated Member members_added = 1; | ||
repeated Member members_removed = 2; | ||
repeated Member installations_added = 3; | ||
repeated Member installations_removed = 4; | ||
} |