fix scope

master
adb 4 years ago
parent 5ea7cae63f
commit 95f537024b

@ -9,11 +9,11 @@ export class MastodonHandler extends Mastodon{
});
}
postMedia(status, mediaPath, retry, onError){
this.post('media', { file: fs.createReadStream(mediaPath) }).then(resp => {
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")

Loading…
Cancel
Save