Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion modules/twitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ zeeschuimer.register_module(
&& source_url.indexOf('Likes') < 0
&& source_url.indexOf('SearchTimeline') < 0
&& source_url.indexOf('TweetDetail') < 0
&& source_url.indexOf('TweetResultByRestId') < 0
// this one is not enabled because it is always loaded when viewing a user profile
// even when not viewing the media tab
// && source_url.indexOf('UserMedia') < 0
Expand Down Expand Up @@ -116,6 +117,12 @@ zeeschuimer.register_module(
}
}

} else if (child.hasOwnProperty('__typename') && child['__typename'] === "Tweet") {
// this only fires when we hit the TweetResultByRestId endpoint, and that only happens
// when the user views a post without being logged in, in which case it doesn't
// load all the replies so the normal endpoints aren't used.
child["id"] = child['legacy']['id_str'];
tweets.push(child);
} else if (typeof (child) === "object") {
traverse(child);
}
Expand All @@ -126,4 +133,4 @@ zeeschuimer.register_module(
return tweets;
},
'twitter.com'
);
);