Skip to content

Commit

Permalink
fix: false detections can occur when possibly_sensitionive_editable i…
Browse files Browse the repository at this point in the history
…s null #16 (#20)
  • Loading branch information
Robot-Inventor authored Jun 13, 2023
1 parent b1791d6 commit 5b05b1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/ts/core/tweetChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ class TweetChecker {
const reactProps = new TweetReactProps(menuBar).get();
const tweetStatus: TweetStatus = {
tweet: {
possiblySensitive: reactProps.possibly_sensitive,
possiblySensitiveEditable: reactProps.possibly_sensitive_editable,
possiblySensitive: Boolean(reactProps.possibly_sensitive),
// ref: https://github.com/Robot-Inventor/shadowban-scanner/issues/16
possiblySensitiveEditable: !(reactProps.possibly_sensitive_editable === false),
isTweetByCurrentUser: reactProps.user.following === null
},
user: {
possiblySensitive: reactProps.user.possibly_sensitive
possiblySensitive: Boolean(reactProps.user.possibly_sensitive)
}
};

Expand Down
Loading

0 comments on commit 5b05b1b

Please sign in to comment.