summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/renderer/note.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-07 06:13:40 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-07 06:13:40 +0900
commitba1a81dab13b7f4750945c8ce4a29e3076267c6d (patch)
tree8c6aa578dbb839e20754cb92bc50ad199441a103 /src/remote/activitypub/renderer/note.ts
parentAdd todo (diff)
downloadmisskey-ba1a81dab13b7f4750945c8ce4a29e3076267c6d.tar.gz
misskey-ba1a81dab13b7f4750945c8ce4a29e3076267c6d.tar.bz2
misskey-ba1a81dab13b7f4750945c8ce4a29e3076267c6d.zip
Bug fixes and some refactors
Diffstat (limited to 'src/remote/activitypub/renderer/note.ts')
-rw-r--r--src/remote/activitypub/renderer/note.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts
index e45b10215a..b971a53951 100644
--- a/src/remote/activitypub/renderer/note.ts
+++ b/src/remote/activitypub/renderer/note.ts
@@ -19,11 +19,11 @@ export default async (user: IUser, post: IPost) => {
if (inReplyToPost !== null) {
const inReplyToUser = await User.findOne({
- _id: post.userId,
+ _id: inReplyToPost.userId,
});
if (inReplyToUser !== null) {
- inReplyTo = `${config.url}@${inReplyToUser.username}/${inReplyToPost._id}`;
+ inReplyTo = inReplyToPost.uri || `${config.url}/@${inReplyToUser.username}/${inReplyToPost._id}`;
}
}
} else {