Better query
This commit is contained in:
parent
fada899b30
commit
4a9fc0c8ed
1 changed files with 9 additions and 2 deletions
|
@ -51,8 +51,15 @@ export default async (ctx: Koa.Context) => {
|
||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
userId: user._id,
|
userId: user._id,
|
||||||
$or: [ { visibility: 'public' }, { visibility: 'home' } ],
|
$and: [{
|
||||||
text: { $ne: null } // exclude renote, but include quote
|
$or: [ { visibility: 'public' }, { visibility: 'home' } ]
|
||||||
|
}, { // exclude renote, but include quote
|
||||||
|
$or: [{
|
||||||
|
text: { $ne: null }
|
||||||
|
}, {
|
||||||
|
mediaIds: { $ne: [] }
|
||||||
|
}]
|
||||||
|
}]
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
if (sinceId) {
|
if (sinceId) {
|
||||||
|
|
Loading…
Reference in a new issue