diff --git a/message.go b/message.go index f2456c1..ac73d31 100644 --- a/message.go +++ b/message.go @@ -6,6 +6,7 @@ import ( "fmt" "io/ioutil" "net/http" + "strconv" ) // Message structure for message data @@ -61,10 +62,14 @@ func (s *Session) GetInbox() ([]Message, error) { // SendMessage will send a message via post func (s *Session) SendMessage(subject string, body string, recipientid string) error { + reciever, err := strconv.Atoi(recipientid) + if err != nil { + return err + } payload := map[string]interface{}{ "subject": subject, "body": body, - "recipientId": recipientid, + "recipientId": reciever, } data, err := json.Marshal(&payload) if err != nil {