Don't waste requests
This commit is contained in:
parent
631ba6e0b5
commit
0a5c89eb5d
@ -100,6 +100,10 @@ func (s *Session) SendMessage(subject string, body string, recipientid int) erro
|
|||||||
|
|
||||||
// ArchiveMessages will archive a list of messages
|
// ArchiveMessages will archive a list of messages
|
||||||
func (s *Session) ArchiveMessages(ids []string) error {
|
func (s *Session) ArchiveMessages(ids []string) error {
|
||||||
|
if len(ids) <= 0 {
|
||||||
|
return fmt.Errorf("ID list was empty")
|
||||||
|
}
|
||||||
|
|
||||||
payload := map[string][]string{
|
payload := map[string][]string{
|
||||||
"messageIds": ids,
|
"messageIds": ids,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user