Browse Source

Change ChatSendReaction and ChatSendReactionTeam to ChatReact and ChatReactTeam

main v0.01
Sam 6 years ago
parent
commit
f8cc1058af
  1. 8
      chatOut.go
  2. 4
      keybase.go

8
chatOut.go

@ -111,8 +111,8 @@ func (k Keybase) ChatSendTextTeam(team, channel string, message ...string) (Chat
return r.Result, nil return r.Result, nil
} }
// ChatSendReaction() sends a reaction to a user's message. // ChatReact() sends a reaction to a user's message.
func (k Keybase) ChatSendReaction(user, reaction string, messageId int) (ChatOut, error) { func (k Keybase) ChatReact(user, reaction string, messageId int) (ChatOut, error) {
m := chatOut{} m := chatOut{}
m.Method = "reaction" m.Method = "reaction"
m.Params.Options.Channel.Name = user m.Params.Options.Channel.Name = user
@ -126,8 +126,8 @@ func (k Keybase) ChatSendReaction(user, reaction string, messageId int) (ChatOut
return r.Result, nil return r.Result, nil
} }
// ChatSendReactionTeam() sends a reaction to a message on a team. // ChatReactTeam() sends a reaction to a message on a team.
func (k Keybase) ChatSendReactionTeam(team, channel, reaction string, messageId int) (ChatOut, error) { func (k Keybase) ChatReactTeam(team, channel, reaction string, messageId int) (ChatOut, error) {
m := chatOut{} m := chatOut{}
m.Method = "reaction" m.Method = "reaction"
m.Params.Options.Channel.Name = team m.Params.Options.Channel.Name = team

4
keybase.go

@ -12,8 +12,8 @@ type Keybase struct {
type keybase interface { type keybase interface {
ChatSendText(user string, message ...string) (ChatOut, error) ChatSendText(user string, message ...string) (ChatOut, error)
ChatSendTextTeam(team, channel, message string) (ChatOut, error) ChatSendTextTeam(team, channel, message string) (ChatOut, error)
ChatSendReaction(user, reaction string, messageId int) (ChatOut, error) ChatReact(user, reaction string, messageId int) (ChatOut, error)
ChatSendReactionTeam(team, channel, reaction string, messageId int) (ChatOut, error) ChatReactTeam(team, channel, reaction string, messageId int) (ChatOut, error)
ChatDeleteMessage(user string, messageId int) (ChatOut, error) ChatDeleteMessage(user string, messageId int) (ChatOut, error)
ChatDeleteMessageTeam(team, channel string, messageId int) (ChatOut, error) ChatDeleteMessageTeam(team, channel string, messageId int) (ChatOut, error)
ChatList() ([]chatOutResultConversations, error) ChatList() ([]chatOutResultConversations, error)

Loading…
Cancel
Save