Bug fixes and some refactors
This commit is contained in:
parent
ef30390e76
commit
ba1a81dab1
3 changed files with 31 additions and 15 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue