diff --git a/Makefile b/Makefile index f5cd0da..92cca59 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ deps: go get github.com/boltdb/bolt/... go get github.com/golang/freetype go get github.com/llgcode/draw2d + go get github.com/llgcode/draw2d/draw2dimg install-tg: go install github.com/hamcha/clessy/tg diff --git a/tg/broker.go b/tg/broker.go index a39aefa..575e393 100644 --- a/tg/broker.go +++ b/tg/broker.go @@ -38,7 +38,7 @@ func (b *Broker) Close() { // SendTextMessage sends a HTML-styles text message to a chat. // A reply_to message ID can be specified as optional parameter. func (b *Broker) SendTextMessage(chat *APIChat, text string, original *int) { - sendCmd(ClientCommand{ + b.sendCmd(ClientCommand{ Type: CmdSendTextMessage, TextMessageData: &ClientTextMessageData{ Text: text, @@ -51,7 +51,7 @@ func (b *Broker) SendTextMessage(chat *APIChat, text string, original *int) { // SendPhoto sends a photo with an optional caption to a chat. // A reply_to message ID can be specified as optional parameter. func (b *Broker) SendPhoto(chat *APIChat, data []byte, caption *string, original *int) { - sendCmd(ClientCommand{ + b.sendCmd(ClientCommand{ Type: CmdSendPhoto, PhotoData: &ClientPhotoData{ ChatID: chat.ChatID,