mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 04:47:06 +02:00
fix: topic events disappearing if there are queued posts
This commit is contained in:
@@ -111,7 +111,7 @@ async function modifyEvent({ tid, uid, eventIds, timestamps, events }) {
|
|||||||
const isPrivileged = await user.isPrivileged(uid);
|
const isPrivileged = await user.isPrivileged(uid);
|
||||||
if (isPrivileged) {
|
if (isPrivileged) {
|
||||||
const queuedPosts = await posts.getQueuedPosts({ tid }, { metadata: false });
|
const queuedPosts = await posts.getQueuedPosts({ tid }, { metadata: false });
|
||||||
Object.assign(events, queuedPosts.map(item => ({
|
events.push(...queuedPosts.map(item => ({
|
||||||
type: 'post-queue',
|
type: 'post-queue',
|
||||||
timestamp: item.data.timestamp || Date.now(),
|
timestamp: item.data.timestamp || Date.now(),
|
||||||
uid: item.data.uid,
|
uid: item.data.uid,
|
||||||
|
|||||||
Reference in New Issue
Block a user