Skip to content

Commit

Permalink
Add Accessers
Browse files Browse the repository at this point in the history
  • Loading branch information
baptistejamin committed May 5, 2018
1 parent de0fd45 commit cf02a8a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions messagequery.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ func (mq *MessageQuery) Notification(notification NotificationType) *MessageQuer
return mq
}

func (mq *MessageQuery) Type(messagingType MessagingType) *MessageQuery {
mq.MessagingType = messagingType
return mq
}

func (mq *MessageQuery) Tag(tag MessageTag) *MessageQuery {
mq.MessageTag = tag
return mq
}

func (mq *MessageQuery) Text(text string) error {
if mq.Message.Attachment != nil && mq.Message.Attachment.Type == AttachmentTypeTemplate {
return errors.New("Can't set both text and template.")
Expand Down

0 comments on commit cf02a8a

Please sign in to comment.