diff --git a/config.sample.yaml b/config.sample.yaml index 456c8cc..c632fa6 100644 --- a/config.sample.yaml +++ b/config.sample.yaml @@ -111,7 +111,6 @@ services: - ID: "slackapi_service" Type: "slackapi" - UserID: "@slackapi:localhost" # requires a Syncing client Config: Hooks: "hook1": diff --git a/src/github.com/matrix-org/go-neb/services/slackapi/slackapi.go b/src/github.com/matrix-org/go-neb/services/slackapi/slackapi.go index c7cf278..de1a4e9 100644 --- a/src/github.com/matrix-org/go-neb/services/slackapi/slackapi.go +++ b/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 }