Browse Source

Log for nonsensical configs

kegan/gh-service-client-id-is-opt
Kegan Dougal 8 years ago
parent
commit
569587aa6b
  1. 6
      src/github.com/matrix-org/go-neb/services/github/github.go

6
src/github.com/matrix-org/go-neb/services/github/github.go

@ -224,7 +224,11 @@ func (s *githubService) PostRegister(oldService types.Service) {
// PostRegister handles creating/destroying webhooks, which is only valid if this service // PostRegister handles creating/destroying webhooks, which is only valid if this service
// is configured on behalf of a client. // is configured on behalf of a client.
if s.ClientUserID == "" { if s.ClientUserID == "" {
// TODO: We should log an error here if the service has any webhook config in Rooms
if len(s.Rooms) != 0 {
log.WithFields(log.Fields{
"Rooms": s.Rooms,
}).Error("Empty ClientUserID but a webhook config was supplied.")
}
return return
} }

Loading…
Cancel
Save