|
|
@ -306,27 +306,6 @@ func (k *Keybase) ReplyToConvID(convID chat1.ConvIDStr, replyTo chat1.MessageID, |
|
|
|
return r, nil |
|
|
|
return r, nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Reply sends a reply to a chat message
|
|
|
|
|
|
|
|
func (c Chat) Reply(replyTo int, message ...string) (ChatAPI, error) { |
|
|
|
|
|
|
|
m := ChatAPI{ |
|
|
|
|
|
|
|
Params: ¶ms{}, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
m.Params.Options = options{ |
|
|
|
|
|
|
|
Message: &mesg{}, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m.Method = "send" |
|
|
|
|
|
|
|
m.Params.Options.Channel = &c.Channel |
|
|
|
|
|
|
|
m.Params.Options.ReplyTo = replyTo |
|
|
|
|
|
|
|
m.Params.Options.Message.Body = strings.Join(message, " ") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r, err := chatAPIOut(c.keybase, m) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
return r, err |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return r, nil |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Edit edits a previously sent chat message
|
|
|
|
// Edit edits a previously sent chat message
|
|
|
|
func (c Chat) Edit(messageID int, message ...string) (ChatAPI, error) { |
|
|
|
func (c Chat) Edit(messageID int, message ...string) (ChatAPI, error) { |
|
|
|
m := ChatAPI{ |
|
|
|
m := ChatAPI{ |
|
|
|