Browse Source

Code review

pull/116/head
Luke Barnard 8 years ago
parent
commit
8ae5905e1e
  1. 1
      config.sample.yaml
  2. 4
      src/github.com/matrix-org/go-neb/services/slackapi/slackapi.go

1
config.sample.yaml

@ -111,7 +111,6 @@ services:
- ID: "slackapi_service"
Type: "slackapi"
UserID: "@slackapi:localhost" # requires a Syncing client
Config:
Hooks:
"hook1":

4
src/github.com/matrix-org/go-neb/services/slackapi/slackapi.go

@ -38,14 +38,14 @@ func (s *Service) OnReceiveWebhook(w http.ResponseWriter, req *http.Request, cli
slackMessage, err := getSlackMessage(*req)
if err != nil {
log.WithFields(log.Fields{"slackMessage":slackMessage, "err":err}).Print("Slack message error")
log.WithFields(log.Fields{"slackMessage":slackMessage, log.ErrorKey:err}).Error("Slack message error")
w.WriteHeader(500)
return
}
htmlMessage, err := slackMessageToHTMLMessage(slackMessage)
if err != nil {
log.WithField("err", err).Error("Converting slack message to HTML")
log.WithError(err).Error("Converting slack message to HTML")
w.WriteHeader(500)
return
}

Loading…
Cancel
Save