diff --git a/chat.go b/chat.go index 97b47e6..8009e23 100644 --- a/chat.go +++ b/chat.go @@ -363,3 +363,19 @@ func (c Chat) Unpin() (ChatAPI, error) { } 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 +} diff --git a/types.go b/types.go index 0a84229..da04e7f 100644 --- a/types.go +++ b/types.go @@ -470,6 +470,7 @@ type chat interface { LoadFlip(messageID int, conversationID string, flipConversationID string, gameID string) (ChatAPI, error) Pin(messageID int) (ChatAPI, error) Unpin() (ChatAPI, error) + Mark(messageID int) (ChatAPI, error) } type chatAPI interface {