summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/endpoints/notes/renotes.ts
diff options
context:
space:
mode:
authorJulia <julia@insertdomain.name>2025-06-19 21:35:18 +0000
committerJulia <julia@insertdomain.name>2025-06-19 21:35:18 +0000
commita77c32b17da63d3932b219f74152cce023a30f4a (patch)
treed2a05796e942c8f250bbd01369eab0cbe5a14531 /packages/backend/src/server/api/endpoints/notes/renotes.ts
parentmerge: release 2025.4.2 (!1051) (diff)
parentMerge branch 'develop' into release/2025.4.3 (diff)
downloadsharkey-a77c32b17da63d3932b219f74152cce023a30f4a.tar.gz
sharkey-a77c32b17da63d3932b219f74152cce023a30f4a.tar.bz2
sharkey-a77c32b17da63d3932b219f74152cce023a30f4a.zip
merge: prepare release 2025.4.3 (!1125)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1125 Approved-by: Marie <github@yuugi.dev> Approved-by: Julia <julia@insertdomain.name>
Diffstat (limited to 'packages/backend/src/server/api/endpoints/notes/renotes.ts')
-rw-r--r--packages/backend/src/server/api/endpoints/notes/renotes.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts
index 0f08cc9cf2..be7cb0320f 100644
--- a/packages/backend/src/server/api/endpoints/notes/renotes.ts
+++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts
@@ -47,7 +47,7 @@ export const paramDef = {
type: 'object',
properties: {
noteId: { type: 'string', format: 'misskey:id' },
- userId: { type: "string", format: "misskey:id" },
+ userId: { type: 'string', format: 'misskey:id' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
@@ -81,19 +81,21 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.leftJoinAndSelect('renote.user', 'renoteUser');
if (ps.userId) {
- query.andWhere("user.id = :userId", { userId: ps.userId });
+ query.andWhere('user.id = :userId', { userId: ps.userId });
}
if (ps.quote) {
- query.andWhere("note.text IS NOT NULL");
+ this.queryService.andIsQuote(query, 'note');
} else {
- query.andWhere("note.text IS NULL");
+ this.queryService.andIsRenote(query, 'note');
}
this.queryService.generateVisibilityQuery(query, me);
this.queryService.generateBlockedHostQueryForNote(query);
- if (me) this.queryService.generateMutedUserQueryForNotes(query, me);
- if (me) this.queryService.generateBlockedUserQueryForNotes(query, me);
+ if (me) {
+ this.queryService.generateMutedUserQueryForNotes(query, me);
+ this.queryService.generateBlockedUserQueryForNotes(query, me);
+ }
const renotes = await query.limit(ps.limit).getMany();