This commit is contained in:
parent
7f9a35d7ac
commit
22e79675ad
16 changed files with 205 additions and 66 deletions
|
@ -59,6 +59,13 @@ export const meta = {
|
|||
}
|
||||
}),
|
||||
|
||||
includeLocalRenotes: $.bool.optional.note({
|
||||
default: true,
|
||||
desc: {
|
||||
ja: 'Renoteされたローカルの投稿を含めるかどうか'
|
||||
}
|
||||
}),
|
||||
|
||||
mediaOnly: $.bool.optional.note({
|
||||
desc: {
|
||||
ja: 'true にすると、メディアが添付された投稿だけ取得します'
|
||||
|
@ -180,6 +187,22 @@ export default async (params: any, user: ILocalUser) => {
|
|||
});
|
||||
}
|
||||
|
||||
if (ps.includeLocalRenotes === false) {
|
||||
query.$and.push({
|
||||
$or: [{
|
||||
'_renote.user.host': { $ne: null }
|
||||
}, {
|
||||
renoteId: null
|
||||
}, {
|
||||
text: { $ne: null }
|
||||
}, {
|
||||
mediaIds: { $ne: [] }
|
||||
}, {
|
||||
poll: { $ne: null }
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
if (ps.mediaOnly) {
|
||||
query.$and.push({
|
||||
mediaIds: { $exists: true, $ne: [] }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue