summaryrefslogtreecommitdiff
path: root/src/server/activitypub
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-01 18:28:10 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-01 18:28:10 +0900
commit0cb6fbea8c8cf451b33fde510a1008ecd4884e80 (patch)
tree02c4aa60a35f5ed143398a81ec28b742cbb5e6fe /src/server/activitypub
parentFix type annotation (diff)
downloadsharkey-0cb6fbea8c8cf451b33fde510a1008ecd4884e80.tar.gz
sharkey-0cb6fbea8c8cf451b33fde510a1008ecd4884e80.tar.bz2
sharkey-0cb6fbea8c8cf451b33fde510a1008ecd4884e80.zip
Refactor: Better variable name
Diffstat (limited to 'src/server/activitypub')
-rw-r--r--src/server/activitypub/post.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/activitypub/post.ts b/src/server/activitypub/post.ts
index 261d7ca4a5..bdfce0606d 100644
--- a/src/server/activitypub/post.ts
+++ b/src/server/activitypub/post.ts
@@ -36,7 +36,7 @@ app.get('/@:user/:post', async (req, res, next) => {
return res.sendStatus(404);
}
- const asyncFiles = DriveFile.find({ _id: { $in: post.mediaIds } });
+ const promisedFiles = DriveFile.find({ _id: { $in: post.mediaIds } });
let inReplyTo;
if (post.replyId) {
@@ -69,7 +69,7 @@ app.get('/@:user/:post', async (req, res, next) => {
to: 'https://www.w3.org/ns/activitystreams#Public',
cc: `${attributedTo}/followers`,
inReplyTo,
- attachment: (await asyncFiles).map(({ _id, contentType }) => ({
+ attachment: (await promisedFiles).map(({ _id, contentType }) => ({
type: 'Document',
mediaType: contentType,
url: `${config.drive_url}/${_id}`