status.go
changeset 134 588edbc9e14b
parent 132 639bbcddb4fe
child 138 23d3a518d0ad
--- a/status.go	Mon Apr 17 15:22:45 2017 +0200
+++ b/status.go	Mon Apr 17 16:22:56 2017 +0200
@@ -97,6 +97,9 @@
 			params["in_reply_to_id"] = strconv.Itoa(opts.InReplyToID)
 		}
 		for i, id := range opts.MediaIDs {
+			if id < 1 {
+				return ErrInvalidID
+			}
 			qID := fmt.Sprintf("media_ids[%d]", i+1)
 			params[qID] = strconv.Itoa(id)
 		}