diff --git a/model/integration_action.go b/model/integration_action.go index 58741788a8..4490e4fde0 100644 --- a/model/integration_action.go +++ b/model/integration_action.go @@ -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 }