-
Notifications
You must be signed in to change notification settings - Fork 0
feat: enhance Elem message with additional fields and define Face, Tr… #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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; | ||||||||||||||||||||||||||||
|
|
@@ -22,6 +25,12 @@ message Text { | |||||||||||||||||||||||||||
| optional bytes pb_reserve = 12; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| message Face { | ||||||||||||||||||||||||||||
| optional int32 index = 1; | ||||||||||||||||||||||||||||
| optional bytes old = 2; | ||||||||||||||||||||||||||||
| optional bytes buf = 11; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| message NotOnlineImage { | ||||||||||||||||||||||||||||
| optional bytes file_path = 1; | ||||||||||||||||||||||||||||
| optional uint32 file_len = 2; | ||||||||||||||||||||||||||||
|
|
@@ -54,6 +63,27 @@ message NotOnlineImage { | |||||||||||||||||||||||||||
| optional bytes pb_reserve = 29; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| message TransElem { | ||||||||||||||||||||||||||||
| optional int32 elem_type = 1; | ||||||||||||||||||||||||||||
|
Comment on lines
+66
to
+67
|
||||||||||||||||||||||||||||
| 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
AI
Mar 11, 2026
There was a problem hiding this comment.
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.
| optional bytes mobileparam = 12; | |
| optional bytes mobile_param = 12; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Face.bufuses tag11, skipping tags3..10. If this gap is intentional for wire-compatibility with an upstream schema, it would help to addreserved 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.