summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/notes/global-timeline.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-09-05 19:32:46 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-09-05 19:32:46 +0900
commita1b82e97230eab994c06fc7c902e71539664d3d7 (patch)
tree18501f85f8d406777a3c11ef1d938657c256b32f /src/server/api/endpoints/notes/global-timeline.ts
parent:art: (diff)
downloadsharkey-a1b82e97230eab994c06fc7c902e71539664d3d7.tar.gz
sharkey-a1b82e97230eab994c06fc7c902e71539664d3d7.tar.bz2
sharkey-a1b82e97230eab994c06fc7c902e71539664d3d7.zip
#2620
Diffstat (limited to 'src/server/api/endpoints/notes/global-timeline.ts')
-rw-r--r--src/server/api/endpoints/notes/global-timeline.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/api/endpoints/notes/global-timeline.ts b/src/server/api/endpoints/notes/global-timeline.ts
index 8f7233e308..554245a0f4 100644
--- a/src/server/api/endpoints/notes/global-timeline.ts
+++ b/src/server/api/endpoints/notes/global-timeline.ts
@@ -33,9 +33,9 @@ export default async (params: any, user: ILocalUser) => {
throw 'only one of sinceId, untilId, sinceDate, untilDate can be specified';
}
- // Get 'mediaOnly' parameter
- const [mediaOnly, mediaOnlyErr] = $.bool.optional.get(params.mediaOnly);
- if (mediaOnlyErr) throw 'invalid mediaOnly param';
+ // Get 'withFiles' parameter
+ const [withFiles, withFilesErr] = $.bool.optional.get(params.withFiles);
+ if (withFilesErr) throw 'invalid withFiles param';
// ミュートしているユーザーを取得
const mutedUserIds = user ? (await Mute.find({
@@ -68,8 +68,8 @@ export default async (params: any, user: ILocalUser) => {
};
}
- if (mediaOnly) {
- query.mediaIds = { $exists: true, $ne: [] };
+ if (withFiles) {
+ query.fileIds = { $exists: true, $ne: [] };
}
if (sinceId) {