From 5e2596598f97e318f1e4e8bd835b08a011fa0b60 Mon Sep 17 00:00:00 2001 From: Nicolas Clerc Date: Mon, 15 Feb 2016 09:11:35 +0100 Subject: add external slashcommands management --- model/command.go | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'model') diff --git a/model/command.go b/model/command.go index 56d88f13c..8e0b31583 100644 --- a/model/command.go +++ b/model/command.go @@ -14,22 +14,23 @@ const ( ) type Command struct { - Id string `json:"id"` - Token string `json:"token"` - CreateAt int64 `json:"create_at"` - UpdateAt int64 `json:"update_at"` - DeleteAt int64 `json:"delete_at"` - CreatorId string `json:"creator_id"` - TeamId string `json:"team_id"` - Trigger string `json:"trigger"` - Method string `json:"method"` - Username string `json:"username"` - IconURL string `json:"icon_url"` - AutoComplete bool `json:"auto_complete"` - AutoCompleteDesc string `json:"auto_complete_desc"` - AutoCompleteHint string `json:"auto_complete_hint"` - DisplayName string `json:"display_name"` - URL string `json:"url"` + Id string `json:"id"` + Token string `json:"token"` + CreateAt int64 `json:"create_at"` + UpdateAt int64 `json:"update_at"` + DeleteAt int64 `json:"delete_at"` + CreatorId string `json:"creator_id"` + TeamId string `json:"team_id"` + ExternalManagement bool `json:"external_management"` + Trigger string `json:"trigger"` + Method string `json:"method"` + Username string `json:"username"` + IconURL string `json:"icon_url"` + AutoComplete bool `json:"auto_complete"` + AutoCompleteDesc string `json:"auto_complete_desc"` + AutoCompleteHint string `json:"auto_complete_hint"` + DisplayName string `json:"display_name"` + URL string `json:"url"` } func (o *Command) ToJson() string { -- cgit v1.2.3-1-g7c22 From 7cb817d5a777965c922fdad49d2024b5f0f86c40 Mon Sep 17 00:00:00 2001 From: Nicolas Clerc Date: Mon, 15 Feb 2016 10:24:58 +0100 Subject: fix TestListCommands --- model/client.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'model') diff --git a/model/client.go b/model/client.go index 3adcb980d..14c175fc1 100644 --- a/model/client.go +++ b/model/client.go @@ -363,8 +363,11 @@ func (c *Client) Command(channelId string, command string, suggest bool) (*Resul } } -func (c *Client) ListCommands() (*Result, *AppError) { - if r, err := c.DoApiGet("/commands/list", "", ""); err != nil { +func (c *Client) ListCommands(channelId string, command string) (*Result, *AppError) { + m := make(map[string]string) + m["command"] = command + m["channelId"] = channelId + if r, err := c.DoApiPost("/commands/list", MapToJson(m)); err != nil { return nil, err } else { return &Result{r.Header.Get(HEADER_REQUEST_ID), -- cgit v1.2.3-1-g7c22 From fdc3207724fde8c0c3fae7e18d7ec8463e72e737 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 16 Mar 2016 23:00:33 -0400 Subject: Webpack optimizations and fixes --- model/config.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'model') diff --git a/model/config.go b/model/config.go index 82c51224e..11ce260ee 100644 --- a/model/config.go +++ b/model/config.go @@ -21,6 +21,10 @@ const ( SERVICE_GITLAB = "gitlab" SERVICE_GOOGLE = "google" + + WEBSERVER_MODE_REGULAR = "regular" + WEBSERVER_MODE_GZIP = "gzip" + WEBSERVER_MODE_DISABLED = "disabled" ) type ServiceSettings struct { @@ -46,6 +50,7 @@ type ServiceSettings struct { SessionCacheInMinutes *int WebsocketSecurePort *int WebsocketPort *int + WebserverMode *string } type SSOSettings struct { @@ -383,6 +388,11 @@ func (o *Config) SetDefaults() { o.ServiceSettings.AllowCorsFrom = new(string) *o.ServiceSettings.AllowCorsFrom = "" } + + if o.ServiceSettings.WebserverMode == nil { + o.ServiceSettings.WebserverMode = new(string) + *o.ServiceSettings.WebserverMode = "regular" + } } func (o *Config) IsValid() *AppError { -- cgit v1.2.3-1-g7c22