Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dtsnko committed Jun 7, 2024
2 parents cc4df1b + 785a63e commit edbdae2
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
19 changes: 18 additions & 1 deletion chat/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ message Message {
repeated Buttons inline = 15;
// From sender user account
Account from = 16;
// Postback. Reply Button Click[ed].
Postback postback = 17;
// An option used to block input to force the user
// to respond with one of the `Buttons`.
// Instructs client agents to disable input capabilities.
// Can only be used with a set of `Buttons`.
bool no_input = 18;

// NewChatMembers description for {"type":"joined"} notification
repeated Account new_chat_members = 20;
Expand Down Expand Up @@ -95,4 +102,14 @@ message Button {
// message Contact {

// string phone_number = 1;
// }
// }

// Postback. Reply Button Click[ed].
message Postback {
// Message ID of the button.
int64 mid = 1;
// Button's callback data associated.
string code = 2;
// Button's caption. Text to display.
string text = 3;
}
54 changes: 54 additions & 0 deletions chat/messages/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ message Message {

// Context. Variables. Environment.
map<string, string> context = 9;

// Keyboard. Buttons. Quick Replies.
ReplyMarkup keyboard = 10;

// Postback. Reply Button Click[ed].
Postback postback = 11;

// MIME Type specific content.

Expand Down Expand Up @@ -84,4 +90,52 @@ message File {

// Filename
string name = 5;
}

message ReplyMarkup {
// An option used to block input to force
// the user to respond with one of the buttons.
bool no_input = 2;
// Markup of button(s)
repeated ButtonRow buttons = 1;
}

message ButtonRow {
// Button(s) in a row
repeated Button row = 1;
}

message Button {
// Caption to display.
string text = 1;
// Type of request to share contact info
enum Request {
// Phone Number
phone = 0;
// Email Address
email = 1;
// General Form
contact = 2;
// Current Location
location = 3;
}
// Type of the button.
oneof type {
// URL to navigate to ..
string url = 2;
// Postback/Callback data.
string code = 3;
// Request to share contact info.
Request share = 4;
}
}

// Postback. Reply Button Click[ed].
message Postback {
// Message ID of the button.
int64 mid = 1;
// Data associated with the Button.
string code = 2;
// Button's display caption.
string text = 3;
}

0 comments on commit edbdae2

Please sign in to comment.