diff options
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index fc5e1abc92..0d947ec225 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -396,7 +396,10 @@ func SlackHooksNewPost(ctx *middleware.Context, form auth.NewSlackHookForm) { } meta, err := json.Marshal(&models.SlackMeta{ - Channel: form.Channel, + Channel: form.Channel, + Username: form.Username, + IconURL: form.IconURL, + Color: form.Color, }) if err != nil { ctx.Handle(500, "Marshal", err) @@ -452,7 +455,6 @@ func checkWebhook(ctx *middleware.Context) (*OrgRepoCtx, *models.Webhook) { default: ctx.Data["HookType"] = "gogs" } - w.GetEvent() ctx.Data["History"], err = w.History(1) if err != nil { @@ -530,7 +532,10 @@ func SlackHooksEditPost(ctx *middleware.Context, form auth.NewSlackHookForm) { } meta, err := json.Marshal(&models.SlackMeta{ - Channel: form.Channel, + Channel: form.Channel, + Username: form.Username, + IconURL: form.IconURL, + Color: form.Color, }) if err != nil { ctx.Handle(500, "Marshal", err) |