refactor: adding more fixes from Iceshrimp

Co-authored-by: CookiLover311 <jacoco@vivaldi.net>
This commit is contained in:
Laura Hausmann 2024-05-23 22:51:37 +00:00 committed by naskya
parent f282549900
commit 3e878984bd
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
3 changed files with 3 additions and 4 deletions

View file

@ -327,6 +327,7 @@ export class NoteConverter {
),
bookmarked: isBookmarked,
quote: reblog.then((reblog) => (isQuote(note) ? reblog : null)),
quote_id: isQuote(note) ? note.renoteId : null,
edited_at: note.updatedAt?.toISOString() ?? null,
filtered: filtered,
});
@ -438,9 +439,6 @@ export class NoteConverter {
ctx.pinAggregate = pinAggregate;
const users = notes.filter((p) => !!p.user).map((p) => p.user as User);
const renoteUserIds = notes
.filter((p) => p.renoteUserId !== null)
.map((p) => p.renoteUserId as string);
await UserConverter.aggregateData([...users], ctx);
await prefetchEmojis(aggregateNoteEmojis(notes));
}

View file

@ -41,6 +41,7 @@ namespace MastodonEntity {
pinned: boolean | undefined;
reactions: Array<Reaction>;
quote: Status | null;
quote_id: string | null;
bookmarked: boolean;
edited_at: string | null;
filtered: Array<FilterResult> | null;

View file

@ -266,7 +266,7 @@ export class SearchHelpers {
generateBlockedUserQuery(query, user);
}
query.setParameter("meId", user);
query.setParameter("meId", user.id);
return query
.skip(offset ?? 0)