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" },
|
untilId: { type: "string", format: "misskey:id" },
|
||||||
sinceDate: { type: "integer" },
|
sinceDate: { type: "integer" },
|
||||||
untilDate: { type: "integer" },
|
untilDate: { type: "integer" },
|
||||||
|
includeRenotes: { type: "boolean", default: true },
|
||||||
|
renotesOnly: { type: "boolean", default: false },
|
||||||
includeMyRenotes: { type: "boolean", default: true },
|
includeMyRenotes: { type: "boolean", default: true },
|
||||||
withFiles: { type: "boolean", default: false },
|
withFiles: { type: "boolean", default: false },
|
||||||
fileType: {
|
fileType: {
|
||||||
|
@ -122,6 +124,14 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
query.andWhere("note.replyId IS NULL");
|
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) {
|
if (ps.includeMyRenotes === false) {
|
||||||
query.andWhere(
|
query.andWhere(
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
|
|
Loading…
Reference in a new issue