Skip to content
Snippets Groups Projects
Commit 4a9fc0c8 authored by syuilo's avatar syuilo
Browse files

Better query

parent fada899b
No related merge requests found
......@@ -51,8 +51,15 @@ export default async (ctx: Koa.Context) => {
const query = {
userId: user._id,
$or: [ { visibility: 'public' }, { visibility: 'home' } ],
text: { $ne: null } // exclude renote, but include quote
$and: [{
$or: [ { visibility: 'public' }, { visibility: 'home' } ]
}, { // exclude renote, but include quote
$or: [{
text: { $ne: null }
}, {
mediaIds: { $ne: [] }
}]
}]
} as any;
if (sinceId) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment