@ -9,11 +9,11 @@ export class MastodonHandler extends Mastodon{
});
}
postMedia(status, mediaPath, retry, onError){
if (retry <= 0){
onError();
return;
this.post('media', { file: fs.createReadStream(mediaPath) }).then(resp => {
if (!resp.data.id){
this.postMedia(status, mediaPath, --retry);
console.log("issue while uploading, retry")