Skip to content

Screenshot needs to be deleted from filesystem #158

@Glench

Description

@Glench

Right now the only place the screenshot is being deleted is after a Twitter post:

twitter.post('statuses/update', params, function(err) {
    if (err) {
        console.log(err)
    }
})
fs.unlink(screenshot)

The screenshot needs to be deleted in the following cases: if the user only is posting to Mastodon and not Twitter, if the screenshot was not uploaded to Twitter successfully (the callback returns so the fs.unlink code is never hit).

I used async for the screenshot code before because it simplified the coordination of all these async network requests a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions