Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not parse tweet: Tombstone #219

Closed
rougetimelord opened this issue Dec 14, 2023 · 2 comments · Fixed by #221
Closed

Could not parse tweet: Tombstone #219

rougetimelord opened this issue Dec 14, 2023 · 2 comments · Fixed by #221
Assignees

Comments

@rougetimelord
Copy link
Collaborator

If the extension gets an API response with type: TweetTombstone the object gets passed to handleTweetObject which gracefully fails here:

if (ptr.__typename !== 'User') {

The TweetTombstone object looks like this:

{
    "__typename": "TweetTombstone",
    "tombstone": {
        "__typename": "TextTombstone",
        "text": {
            "rtl": false,
            "text": "You’re unable to view this Post because this account owner limits who can view their Posts. Learn more",
            "entities": [
                {
                    "fromIndex": 92,
                    "toIndex": 102,
                    "ref": {
                        "type": "TimelineUrl",
                        "url": "https://help.twitter.com/rules-and-policies/notices-on-twitter",
                        "urlType": "ExternalUrl"
                    }
                }
            ]
        }
    }
}
@rougetimelord
Copy link
Collaborator Author

rougetimelord commented Dec 14, 2023

Feel free to assign this issue to me, I'm working on a fix right now and just wanted an issue number to reference.

Further research notes: the tombstone object can sneak past this check by being embedded as a quoted status.

if (IgnoreTweetTypes.has(tweet.itemContent.itemType)) {
return;
}

So we have to check in handleTweetObject.

rougetimelord added a commit to rougetimelord/Blue-Blocker that referenced this issue Dec 14, 2023
This was referenced Dec 14, 2023
@cooljeanius
Copy link
Collaborator

Feel free to assign this issue to me, I'm working on a fix right now and just wanted an issue number to reference.

OK, done.

cooljeanius added a commit that referenced this issue Jan 17, 2024
* Update version strings
* Skip tombstones, fix #219
* Check if a tweet is eligible for editing (Addresses #195)
* Fix quotation marks
* Don't overwrite original blue verification
   Sometimes a twitter blue tweet won't be eligible but is marked as blue verified??
* Add check for extended tweets
* Revert "Merge pull request #217 from kheina-com/dependabot/npm_and_yarn/vite-2.9.16"
   This reverts commit 50cb1f8, reversing
   changes made to dc1d115.
* Update vite
* Check for expandable tweets as part of #195
* Fully update vite... oops
* Fix format task
* Run prettier on instructions.ts

---------

Co-authored-by: Eric Gallager <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants