diff --git a/message.go b/message.go index 5b0b9ad..3ec2715 100644 --- a/message.go +++ b/message.go @@ -100,6 +100,10 @@ func (s *Session) SendMessage(subject string, body string, recipientid int) erro // ArchiveMessages will archive a list of messages func (s *Session) ArchiveMessages(ids []string) error { + if len(ids) <= 0 { + return fmt.Errorf("ID list was empty") + } + payload := map[string][]string{ "messageIds": ids, }