Skip to content

Commit

Permalink
feat: MessagesPinBuilder add ConversationMessageID
Browse files Browse the repository at this point in the history
  • Loading branch information
SevereCloud committed Sep 19, 2020
1 parent 2309f22 commit 191223d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/params/messages.go
Expand Up @@ -1085,6 +1085,12 @@ func (b *MessagesPinBuilder) MessageID(v int) *MessagesPinBuilder {
return b
}

// ConversationMessageID parameter.
func (b *MessagesPinBuilder) ConversationMessageID(v int) *MessagesPinBuilder {
b.Params["conversation_message_id"] = v
return b
}

// MessagesRemoveChatUserBuilder builder.
//
// Allows the current user to leave a chat or, if the current user started the
Expand Down
2 changes: 2 additions & 0 deletions api/params/messages_test.go
Expand Up @@ -444,9 +444,11 @@ func TestMessagesPinBuilder(t *testing.T) {

b.PeerID(1)
b.MessageID(1)
b.ConversationMessageID(1)

assert.Equal(t, b.Params["peer_id"], 1)
assert.Equal(t, b.Params["message_id"], 1)
assert.Equal(t, b.Params["conversation_message_id"], 1)
}

func TestMessagesRemoveChatUserBuilder(t *testing.T) {
Expand Down

0 comments on commit 191223d

Please sign in to comment.