Skip to content

Commit

Permalink
fix(reportcard): fix issues identified in go report card
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3rw3rk committed Sep 5, 2018
1 parent f251d0c commit 0b1960e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func configureChatApplication(bot *models.Bot) {
if err != nil {
bot.Log.Errorf("Could not set Slack Events API callback path: %s", err.Error())
bot.Log.Warn("Defaulting to use Slack RTM")
vToken = ""
bot.SlackVerificationToken = ""
}
bot.SlackEventsCallbackPath = eCallbackPath

Expand Down
4 changes: 1 addition & 3 deletions remote/discord/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,11 @@ func handleDiscordMessage(bot *models.Bot, inputMsgs chan<- models.Message) inte
message := models.NewMessage()
switch m.Type {
case discordgo.MessageTypeDefault:
timestamp := ""
t, err := m.Timestamp.Parse()
if err != nil {
bot.Log.Errorf("Discord Remote: Failed to parse message timestamp.")
timestamp = "0"
}
timestamp = strconv.FormatInt(t.Unix(), 10)
timestamp := strconv.FormatInt(t.Unix(), 10)
msgType := models.MsgTypeChannel
switch ch.Type {
case discordgo.ChannelTypeDM:
Expand Down
2 changes: 2 additions & 0 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import (
)

var (
// Version supplies the semantic version
Version string
// GitHash supplies the git sha hash used
GitHash string
)

Expand Down

0 comments on commit 0b1960e

Please sign in to comment.