MM-14741 Add default option to post action dropdown (#10659)

Этот коммит содержится в:
Harrison Healey
2019-04-22 11:57:54 -04:00
коммит произвёл Lev
родитель 7031846243
Коммит 2b6691e5cc

Просмотреть файл

@@ -47,8 +47,16 @@ type PostAction struct {
// DataSource indicates the data source for the select action. If left
// empty, the select is populated from Options. Other supported values
// are "users" and "channels".
DataSource string `json:"data_source,omitempty"`
Options []*PostActionOptions `json:"options,omitempty"`
DataSource string `json:"data_source,omitempty"`
// Options contains either the buttons that will be displayed on the post
// or the values listed in a select dropdowon on the post.
Options []*PostActionOptions `json:"options,omitempty"`
// DefaultOption contains the option, if any, that will appear as the
// default selection in a select box. It has no effect when used with
// other types of actions.
DefaultOption string `json:"default_option,omitempty"`
// Defines the interaction with the backend upon a user action.
// Integration contains Context, which is private plugin data;
@@ -75,6 +83,10 @@ func (p *PostAction) Equals(input *PostAction) bool {
return false
}
if p.DefaultOption != input.DefaultOption {
return false
}
if p.Cookie != input.Cookie {
return false
}