summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/notes/timeline.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-09-05 23:55:51 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-09-05 23:55:51 +0900
commitb5ff2abdb9ee0c086c8970c738cce5d61761f8f5 (patch)
treec23a8e7e5bec3ea21167795fd008942127823d41 /src/server/api/endpoints/notes/timeline.ts
parent[WIP] Update welcome page (diff)
downloadmisskey-b5ff2abdb9ee0c086c8970c738cce5d61761f8f5.tar.gz
misskey-b5ff2abdb9ee0c086c8970c738cce5d61761f8f5.tar.bz2
misskey-b5ff2abdb9ee0c086c8970c738cce5d61761f8f5.zip
互換性のためのコードを追加 & #2623
Diffstat (limited to 'src/server/api/endpoints/notes/timeline.ts')
-rw-r--r--src/server/api/endpoints/notes/timeline.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/server/api/endpoints/notes/timeline.ts b/src/server/api/endpoints/notes/timeline.ts
index 145f648c56..089e7a182a 100644
--- a/src/server/api/endpoints/notes/timeline.ts
+++ b/src/server/api/endpoints/notes/timeline.ts
@@ -69,7 +69,13 @@ export const meta = {
withFiles: $.bool.optional.note({
desc: {
- 'ja-JP': 'true にすると、メディアが添付された投稿だけ取得します'
+ 'ja-JP': 'true にすると、ファイルが添付された投稿だけ取得します'
+ }
+ }),
+
+ mediaOnly: $.bool.optional.note({
+ desc: {
+ 'ja-JP': 'true にすると、ファイルが添付された投稿だけ取得します (このパラメータは廃止予定です。代わりに withFiles を使ってください。)'
}
}),
}
@@ -193,7 +199,9 @@ export default async (params: any, user: ILocalUser) => {
});
}
- if (ps.withFiles) {
+ const withFiles = ps.withFiles != null ? ps.withFiles : ps.mediaOnly;
+
+ if (withFiles) {
query.$and.push({
fileIds: { $exists: true, $ne: [] }
});