fix scope

This commit is contained in:
adb 2021-02-26 00:45:10 +01:00
parent 5ea7cae63f
commit 95f537024b

View File

@ -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 (retry <= 0){
onError();
return;
}
if (!resp.data.id){
this.postMedia(status, mediaPath, --retry);
console.log("issue while uploading, retry")