summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-02-19 11:19:39 +0000
committerGeorge Goldberg <george@gberg.me>2018-02-19 11:19:39 +0000
commitf8289eb286d00c29859a8df495b957c7b46cb249 (patch)
tree1bc18d6a3a795482c7229786f7ab427fabbcd007 /model
parent8891fa2a5e9e08eb9fa99ec163c47a6e9761a816 (diff)
parent30197584d5a215a3b25bffa79a034ed9e360cf52 (diff)
downloadchat-f8289eb286d00c29859a8df495b957c7b46cb249.tar.gz
chat-f8289eb286d00c29859a8df495b957c7b46cb249.tar.bz2
chat-f8289eb286d00c29859a8df495b957c7b46cb249.zip
Merge branch 'master' into advanced-permissions-phase-1
Diffstat (limited to 'model')
-rw-r--r--model/config.go2
-rw-r--r--model/incoming_webhook.go9
2 files changed, 10 insertions, 1 deletions
diff --git a/model/config.go b/model/config.go
index f20a11ab8..93fa5957c 100644
--- a/model/config.go
+++ b/model/config.go
@@ -2100,7 +2100,7 @@ func (ss *ServiceSettings) isValid() *AppError {
}
switch *ss.ImageProxyType {
- case "", "willnorris/imageproxy":
+ case "":
case "atmos/camo":
if *ss.ImageProxyOptions == "" {
return NewAppError("Config.IsValid", "model.config.is_valid.atmos_camo_image_proxy_options.app_error", nil, "", http.StatusBadRequest)
diff --git a/model/incoming_webhook.go b/model/incoming_webhook.go
index b38cfeec0..ca9bd116d 100644
--- a/model/incoming_webhook.go
+++ b/model/incoming_webhook.go
@@ -204,3 +204,12 @@ func IncomingWebhookRequestFromJson(data io.Reader) (*IncomingWebhookRequest, *A
return o, nil
}
+
+func (o *IncomingWebhookRequest) ToJson() string {
+ b, err := json.Marshal(o)
+ if err != nil {
+ return ""
+ } else {
+ return string(b)
+ }
+}