Add Mark method to Chat
This commit is contained in:
16
chat.go
16
chat.go
@ -363,3 +363,19 @@ func (c Chat) Unpin() (ChatAPI, error) {
|
|||||||
}
|
}
|
||||||
return r, nil
|
return r, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mark marks a conversation as read up to a specified message
|
||||||
|
func (c Chat) Mark(messageID int) (ChatAPI, error) {
|
||||||
|
m := ChatAPI{
|
||||||
|
Params: ¶ms{},
|
||||||
|
}
|
||||||
|
m.Method = "mark"
|
||||||
|
m.Params.Options.Channel = c.Channel
|
||||||
|
m.Params.Options.MessageID = messageID
|
||||||
|
|
||||||
|
r, err := chatAPIOut(c.keybase, m)
|
||||||
|
if err != nil {
|
||||||
|
return ChatAPI{}, err
|
||||||
|
}
|
||||||
|
return r, nil
|
||||||
|
}
|
||||||
|
|||||||
1
types.go
1
types.go
@ -470,6 +470,7 @@ type chat interface {
|
|||||||
LoadFlip(messageID int, conversationID string, flipConversationID string, gameID string) (ChatAPI, error)
|
LoadFlip(messageID int, conversationID string, flipConversationID string, gameID string) (ChatAPI, error)
|
||||||
Pin(messageID int) (ChatAPI, error)
|
Pin(messageID int) (ChatAPI, error)
|
||||||
Unpin() (ChatAPI, error)
|
Unpin() (ChatAPI, error)
|
||||||
|
Mark(messageID int) (ChatAPI, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type chatAPI interface {
|
type chatAPI interface {
|
||||||
|
|||||||
Reference in New Issue
Block a user