mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
fix: accidental passing-in of an array into getUserField, breaks in pgsql?
This commit is contained in:
@@ -277,14 +277,14 @@ Mocks.note = async (post) => {
|
||||
name = `Re: ${name}`;
|
||||
|
||||
const parentId = await posts.getPostField(post.toPid, 'uid');
|
||||
followersUrl = await user.getUserField(parentId, ['followersUrl']);
|
||||
followersUrl = await user.getUserField(parentId, 'followersUrl');
|
||||
to.add(utils.isNumber(parentId) ? `${nconf.get('url')}/uid/${parentId}` : parentId);
|
||||
} else if (!post.isMainPost) { // reply to OP
|
||||
inReplyTo = utils.isNumber(post.topic.mainPid) ? `${nconf.get('url')}/post/${post.topic.mainPid}` : post.topic.mainPid;
|
||||
name = `Re: ${name}`;
|
||||
|
||||
to.add(utils.isNumber(post.topic.uid) ? `${nconf.get('url')}/uid/${post.topic.uid}` : post.topic.uid);
|
||||
followersUrl = await user.getUserField(post.topic.uid, ['followersUrl']);
|
||||
followersUrl = await user.getUserField(post.topic.uid, 'followersUrl');
|
||||
} else { // new topic
|
||||
tag = post.topic.tags.map(tag => ({
|
||||
type: 'Hashtag',
|
||||
|
||||
Reference in New Issue
Block a user