mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
fix: incorrect author uid saved in topic
This commit is contained in:
@@ -86,7 +86,7 @@ Notes.assertTopic = async (uid, id) => {
|
||||
*/
|
||||
|
||||
const chain = Array.from(await Notes.getParentChain(uid, id));
|
||||
const tid = chain[chain.length - 1].pid;
|
||||
const { pid: tid, uid: authorId } = chain[chain.length - 1];
|
||||
|
||||
const members = await db.isSortedSetMembers(`tidRemote:${tid}:posts`, chain.map(p => p.pid));
|
||||
if (members.every(Boolean)) {
|
||||
@@ -106,7 +106,7 @@ Notes.assertTopic = async (uid, id) => {
|
||||
await Promise.all([
|
||||
db.setObject(`topicRemote:${tid}`, {
|
||||
tid,
|
||||
uid,
|
||||
uid: authorId,
|
||||
cid: -1,
|
||||
mainPid: tid,
|
||||
title: 'TBD',
|
||||
|
||||
Reference in New Issue
Block a user