From ba1a81dab13b7f4750945c8ce4a29e3076267c6d Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 7 Apr 2018 06:13:40 +0900 Subject: Bug fixes and some refactors --- src/remote/activitypub/renderer/note.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/remote/activitypub/renderer/note.ts') 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 { -- cgit v1.3.1-freya