cmd/toot.go
changeset 70 155fdea254c3
parent 45 b58a7ea1aeb2
child 71 67e3234c26a9
equal deleted inserted replaced
69:7217174c217a 70:155fdea254c3
    80 		if fileMediaID > 0 {
    80 		if fileMediaID > 0 {
    81 			ids = append(ids, fileMediaID)
    81 			ids = append(ids, fileMediaID)
    82 		}
    82 		}
    83 	}
    83 	}
    84 
    84 
       
    85 	if tootText == "" && len(ids) == 0 && opt.spoiler == "" {
       
    86 		return nil, errors.New("toot is empty")
       
    87 	}
       
    88 
    85 	return gClient.PostStatus(tootText, opt.inReplyToID, ids, opt.sensitive, opt.spoiler, opt.visibility)
    89 	return gClient.PostStatus(tootText, opt.inReplyToID, ids, opt.sensitive, opt.spoiler, opt.visibility)
    86 }
    90 }