Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions proto/message/v2/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ package message.v2;

message Elem {
optional Text text = 1;
optional Face face = 2;
optional NotOnlineImage not_online_image = 4;
optional TransElem trans_elem = 5;
optional MarketFace market_face = 6;
optional CustomFace custom_face = 8;
optional RichMsg rich_msg = 12;
optional VideoFile video_file = 19;
Expand All @@ -22,6 +25,12 @@ message Text {
optional bytes pb_reserve = 12;
}

message Face {
optional int32 index = 1;
optional bytes old = 2;
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Face.buf uses tag 11, skipping tags 3..10. If this gap is intentional for wire-compatibility with an upstream schema, it would help to add reserved 3 to 10; (or a comment) to prevent accidental reuse later. If it's not intentional, consider using the next available sequential tag to reduce confusion.

Suggested change
optional bytes old = 2;
optional bytes old = 2;
reserved 3 to 10;

Copilot uses AI. Check for mistakes.
optional bytes buf = 11;
}

message NotOnlineImage {
optional bytes file_path = 1;
optional uint32 file_len = 2;
Expand Down Expand Up @@ -54,6 +63,27 @@ message NotOnlineImage {
optional bytes pb_reserve = 29;
}

message TransElem {
optional int32 elem_type = 1;
Comment on lines +66 to +67
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elem_type is a raw int32, which makes the set of supported values unclear in generated APIs. Consider introducing an enum for elem_type (even if incomplete) and adding a brief comment describing the encoding/format of elem_value for each type to make the contract self-describing.

Suggested change
message TransElem {
optional int32 elem_type = 1;
enum TransElemType {
// Default / unknown transport element type. When used, elem_value is opaque bytes.
TRANS_ELEM_TYPE_UNSPECIFIED = 0;
// Additional element types can be added here as they become known.
}
message TransElem {
// Logical type of elem_value. See TransElemType for known values.
optional TransElemType elem_type = 1;
// Payload whose encoding depends on elem_type. For UNSPECIFIED or unknown types,
// this field contains opaque bytes as defined by the upstream service.

Copilot uses AI. Check for mistakes.
optional bytes elem_value = 2;
}

message MarketFace {
optional bytes face_name = 1;
optional int32 item_type = 2;
optional int32 face_info = 3;
optional bytes face_id = 4;
optional int32 tab_id = 5;
optional int32 sub_type = 6;
optional bytes key = 7;
optional bytes param = 8;
optional int32 media_type = 9;
optional int32 image_width = 10;
optional int32 image_height = 11;
optional bytes mobileparam = 12;
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mobileparam breaks the established snake_case pattern used by other fields in MarketFace (e.g., face_name, tab_id). Consider renaming it to mobile_param for consistency and clearer generated API naming.

Suggested change
optional bytes mobileparam = 12;
optional bytes mobile_param = 12;

Copilot uses AI. Check for mistakes.
optional bytes pb_reserve = 13;
}

message CustomFace {
optional bytes guid = 1;
optional string file_path = 2;
Expand Down
Loading