fix: clips and search sort
This commit is contained in:
parent
e909190d81
commit
0745a4a862
2 changed files with 4 additions and 0 deletions
|
@ -155,6 +155,8 @@ export default define(meta, paramDef, async (ps, user) => {
|
||||||
.execute(prepared.note.select.byIds, [noteIds], { prepare: true })
|
.execute(prepared.note.select.byIds, [noteIds], { prepare: true })
|
||||||
.then((result) => result.rows.map(parseScyllaNote));
|
.then((result) => result.rows.map(parseScyllaNote));
|
||||||
|
|
||||||
|
foundNotes.sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
|
||||||
|
|
||||||
return (await Notes.packMany((await filter(foundNotes)), user)).slice(0, ps.limit);
|
return (await Notes.packMany((await filter(foundNotes)), user)).slice(0, ps.limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,6 +163,8 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notes.sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
|
||||||
|
|
||||||
// The notes are checked for visibility and muted/blocked users when packed
|
// The notes are checked for visibility and muted/blocked users when packed
|
||||||
found.push(...(await Notes.packMany(notes, me)));
|
found.push(...(await Notes.packMany(notes, me)));
|
||||||
start += chunkSize;
|
start += chunkSize;
|
||||||
|
|
Loading…
Reference in a new issue