summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-08-15 02:08:18 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-08-15 02:08:18 +0900
commit4a9fc0c8ed27c261a49223fc0598acec384d33d9 (patch)
tree9c49c2999609ae19eb9a4738671e1d65a603cfae /src
parentMerge pull request #2210 from mei23/mei-0814-ap3 (diff)
downloadsharkey-4a9fc0c8ed27c261a49223fc0598acec384d33d9.tar.gz
sharkey-4a9fc0c8ed27c261a49223fc0598acec384d33d9.tar.bz2
sharkey-4a9fc0c8ed27c261a49223fc0598acec384d33d9.zip
Better query
Diffstat (limited to 'src')
-rw-r--r--src/server/activitypub/outbox.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/server/activitypub/outbox.ts b/src/server/activitypub/outbox.ts
index e441e3dc4e..91473b77e3 100644
--- a/src/server/activitypub/outbox.ts
+++ b/src/server/activitypub/outbox.ts
@@ -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) {