fix scope
This commit is contained in:
parent
5ea7cae63f
commit
95f537024b
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user