Skip to content

Commit

Permalink
fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Jul 19, 2022
1 parent f560322 commit 23c0f56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Old Twitter Layout (2022)",
"description": "A new extension that returns old Twitter's look.",
"version": "1.0.8",
"version": "1.0.9",
"manifest_version": 3,
"homepage_url": "https://github.com/dimdenGD/OldTwitter",
"background": {
Expand Down
4 changes: 2 additions & 2 deletions scripts/apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@ API.searchV2 = (obj, cursor) => {
cursor: undefined
});
entries = entries.addEntries.entries;
let list = entries.filter(e => e.entryId.startsWith('sq-I-t-') || e.entryId.startsWith('user-'));
let list = entries.filter(e => e.entryId.startsWith('sq-I-t-') || e.entryId.startsWith('user-') || e.entryId.startsWith('tweet-'));
let cursor = entries.find(e => e.entryId.startsWith('sq-cursor-bottom') || e.entryId.startsWith('cursor-bottom'));
if(!cursor) {
let entries = data.timeline.instructions.find(i => i.replaceEntry && (i.replaceEntry.entryIdToReplace === 'sq-cursor-bottom' || i.replaceEntry.entryIdToReplace === 'cursor-bottom'));
Expand All @@ -1848,7 +1848,7 @@ API.searchV2 = (obj, cursor) => {
}
return resolve({
list: list.map(e => {
if(e.entryId.startsWith('sq-I-t-')) {
if(e.entryId.startsWith('sq-I-t-') || e.entryId.startsWith('tweet-')) {
let tweet = tweets[e.content.item.content.tweet.id];
let user = users[tweet.user_id_str];
user.id_str = tweet.user_id_str;
Expand Down

0 comments on commit 23c0f56

Please sign in to comment.