Skip to content

Commit

Permalink
reddit: don't enable if theres missing config options
Browse files Browse the repository at this point in the history
  • Loading branch information
jogramming committed Apr 13, 2019
1 parent b5b221c commit 76102e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions reddit/reddit.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ func RegisterPlugin() {
stopFeedChan: make(chan *sync.WaitGroup),
}

if ClientID == "" || ClientSecret == "" || RefreshToken == "" {
log.Warn("[reddit] Missing reddit config, not enabling plugin")
return
}

plugin.redditClient = setupClient()

common.RegisterPlugin(plugin)
Expand Down

0 comments on commit 76102e2

Please sign in to comment.