Skip to content

Commit

Permalink
reactji hotfix - bumped version to 1.4.4
Browse files Browse the repository at this point in the history
can't do defaults like this when things just get merged into the list instead of
replacing the existing values.
  • Loading branch information
kamaln7 committed Oct 11, 2017
1 parent 44896e3 commit c37c9cd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ karmabot is a Slack bot that listens for and performs karma operations (aka upvo
### Build from Source

1. clone the repo:
1. `git clone -b v1.4.3 https://github.com/kamaln7/karmabot.git`
1. `git clone -b v1.4.4 https://github.com/kamaln7/karmabot.git`
2. run `go get` and then `go build` in `/cmd/karmabot` and `/cmd/karmabotctl`
1. `cd karmabot`
2. `go get`
Expand Down
18 changes: 11 additions & 7 deletions cmd/karmabot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ func main() {

ll := log.KV("version", karmabot.Version)

// reactji defaults
upvotereactji.Set("+1")
upvotereactji.Set("thumbsup")
upvotereactji.Set("thumbsup_all")
downvotereactji.Set("-1")
downvotereactji.Set("thumbsdown")

// cli flags

flag.Var(&blacklist, "blacklist", "blacklist users from having karma operations applied on them")
Expand All @@ -60,6 +53,17 @@ func main() {
ll.Info("starting karmabot")

// reactjis

// reactji defaults
if len(upvotereactji) == 0 {
upvotereactji.Set("+1")
upvotereactji.Set("thumbsup")
upvotereactji.Set("thumbsup_all")
}
if len(downvotereactji) == 0 {
downvotereactji.Set("-1")
downvotereactji.Set("thumbsdown")
}
reactjiConfig := &karmabot.ReactjiConfig{
Enabled: *reactji,
Upvote: upvotereactji,
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package karmabot

// Version is the current version of karmabot.
const Version = "1.4.3"
const Version = "1.4.4"

0 comments on commit c37c9cd

Please sign in to comment.