Add includeRenotes
and renotesOnly
options to /api/users/notes
This commit is contained in:
parent
3b56117fab
commit
e9376cc65c
1 changed files with 10 additions and 0 deletions
|
@ -45,6 +45,8 @@ export const paramDef = {
|
|||
untilId: { type: "string", format: "misskey:id" },
|
||||
sinceDate: { type: "integer" },
|
||||
untilDate: { type: "integer" },
|
||||
includeRenotes: { type: "boolean", default: true },
|
||||
renotesOnly: { type: "boolean", default: false },
|
||||
includeMyRenotes: { type: "boolean", default: true },
|
||||
withFiles: { type: "boolean", default: false },
|
||||
fileType: {
|
||||
|
@ -122,6 +124,14 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||
query.andWhere("note.replyId IS NULL");
|
||||
}
|
||||
|
||||
if (!ps.includeRenotes) {
|
||||
query.andWhere("note.renoteId IS NULL");
|
||||
}
|
||||
|
||||
if (ps.renotesOnly) {
|
||||
query.andWhere("note.renoteId IS NOT NULL");
|
||||
}
|
||||
|
||||
if (ps.includeMyRenotes === false) {
|
||||
query.andWhere(
|
||||
new Brackets((qb) => {
|
||||
|
|
Loading…
Reference in a new issue