summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/chat.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/keybase/go-keybase-chat-bot/kbchat/chat.go')
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/chat.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/chat.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/chat.go
index 129c43fa..bb2d26b8 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/chat.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/chat.go
@@ -122,7 +122,8 @@ func (a *API) GetTextMessages(channel chat1.ChatChannel, unreadOnly bool) ([]cha
return res, nil
}
-func (a *API) SendMessage(channel chat1.ChatChannel, body string, args ...interface{}) (SendResponse, error) {
+func (a *API) SendMessage(channel chat1.ChatChannel, body string, args ...interface{}) (resp SendResponse, err error) {
+ defer a.Trace(&err, "SendMessage")()
arg := newSendArg(sendMessageOptions{
Channel: channel,
Message: sendMessageBody{
@@ -139,7 +140,8 @@ func (a *API) Broadcast(body string, args ...interface{}) (SendResponse, error)
}, fmt.Sprintf(body, args...))
}
-func (a *API) SendMessageByConvID(convID chat1.ConvIDStr, body string, args ...interface{}) (SendResponse, error) {
+func (a *API) SendMessageByConvID(convID chat1.ConvIDStr, body string, args ...interface{}) (resp SendResponse, err error) {
+ defer a.Trace(&err, "SendMessageByConvID")()
arg := newSendArg(sendMessageOptions{
ConversationID: convID,
Message: sendMessageBody{
@@ -150,7 +152,8 @@ func (a *API) SendMessageByConvID(convID chat1.ConvIDStr, body string, args ...i
}
// SendMessageByTlfName sends a message on the given TLF name
-func (a *API) SendMessageByTlfName(tlfName string, body string, args ...interface{}) (SendResponse, error) {
+func (a *API) SendMessageByTlfName(tlfName string, body string, args ...interface{}) (resp SendResponse, err error) {
+ defer a.Trace(&err, "SendMessageByTlfName")()
arg := newSendArg(sendMessageOptions{
Channel: chat1.ChatChannel{
Name: tlfName,
@@ -162,7 +165,8 @@ func (a *API) SendMessageByTlfName(tlfName string, body string, args ...interfac
return a.doSend(arg)
}
-func (a *API) SendMessageByTeamName(teamName string, inChannel *string, body string, args ...interface{}) (SendResponse, error) {
+func (a *API) SendMessageByTeamName(teamName string, inChannel *string, body string, args ...interface{}) (resp SendResponse, err error) {
+ defer a.Trace(&err, "SendMessageByTeamName")()
channel := "general"
if inChannel != nil {
channel = *inChannel