Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Small bug fixes (#62)
Browse files Browse the repository at this point in the history
* Fix possible log bug - also rocket messages aren't actions by definition.
  • Loading branch information
doenietzomoeilijk authored and fabioxgn committed Sep 2, 2017
1 parent 79dedcd commit b4a369f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rocket/rocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package rocket

import (
"fmt"
"log"

"github.com/go-chat-bot/bot"
"github.com/pyinx/gorocket/api"
"github.com/pyinx/gorocket/rest"
"log"
)

var (
Expand Down Expand Up @@ -49,7 +50,7 @@ func Run(c *Config) {
client = rest.NewClient(config.Server, config.Port, config.UseTLS, config.Debug)
err := client.Login(api.UserCredentials{Email: config.Email, Name: config.User, Password: config.Password})
if err != nil {
log.Fatal("login err: %s\n", err)
log.Fatalf("login err: %s\n", err)
}

b := bot.New(&bot.Handlers{
Expand All @@ -70,7 +71,7 @@ func Run(c *Config) {
Channel: msg.ChannelId,
IsPrivate: false,
},
&bot.Message{Text: msg.Text, IsAction: true},
&bot.Message{Text: msg.Text},
&bot.User{ID: msg.User.Id, RealName: msg.User.UserName, Nick: msg.User.UserName, IsBot: false})
}

Expand Down

0 comments on commit b4a369f

Please sign in to comment.