summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-08-22 09:33:59 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-08-22 09:33:59 +0900
commitfe1e60a28cae3ce8932c9aa57b15532ec0b76057 (patch)
treefa262b4b0d0f6d656f6050feb9bdc84125a05120 /src/server
parentMerge branch 'master' of https://github.com/syuilo/misskey (diff)
downloadsharkey-fe1e60a28cae3ce8932c9aa57b15532ec0b76057.tar.gz
sharkey-fe1e60a28cae3ce8932c9aa57b15532ec0b76057.tar.bz2
sharkey-fe1e60a28cae3ce8932c9aa57b15532ec0b76057.zip
Fix #2334
Diffstat (limited to 'src/server')
-rw-r--r--src/server/api/endpoints/drive/stream.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/api/endpoints/drive/stream.ts b/src/server/api/endpoints/drive/stream.ts
index 53f94a2639..a9f3f7e9a5 100644
--- a/src/server/api/endpoints/drive/stream.ts
+++ b/src/server/api/endpoints/drive/stream.ts
@@ -34,9 +34,12 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
const sort = {
_id: -1
};
+
const query = {
- 'metadata.userId': user._id
+ 'metadata.userId': user._id,
+ 'metadata.deletedAt': { $exists: false }
} as any;
+
if (sinceId) {
sort._id = 1;
query._id = {
@@ -47,6 +50,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
$lt: untilId
};
}
+
if (type) {
query.contentType = new RegExp(`^${type.replace(/\*/g, '.+?')}$`);
}
@@ -59,6 +63,5 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
});
// Serialize
- res(await Promise.all(files.map(async file =>
- await pack(file))));
+ res(await Promise.all(files.map(file => pack(file))));
});