File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -184,9 +184,6 @@ module.exports = function (Topics) {
184184 . filter ( p => p && p . hasOwnProperty ( 'toPid' ) && ( activitypub . helpers . isUri ( p . toPid ) || utils . isNumber ( p . toPid ) ) )
185185 . map ( postObj => postObj . toPid ) ;
186186
187- const exists = await posts . exists ( parentPids ) ;
188- parentPids = parentPids . filter ( ( _ , idx ) => exists [ idx ] ) ;
189-
190187 if ( ! parentPids . length ) {
191188 return ;
192189 }
@@ -212,7 +209,7 @@ module.exports = function (Topics) {
212209 parentPost . content = foundPost . content ;
213210 return ;
214211 }
215- parentPost = await posts . parsePost ( parentPost ) ;
212+ await posts . parsePost ( parentPost ) ;
216213 } ) ) ;
217214
218215 const parents = { } ;
@@ -230,7 +227,7 @@ module.exports = function (Topics) {
230227 } ) ;
231228
232229 postData . forEach ( ( post ) => {
233- if ( parents [ post . toPid ] ) {
230+ if ( parents [ post . toPid ] && parents [ post . toPid ] . content ) {
234231 post . parent = parents [ post . toPid ] ;
235232 }
236233 } ) ;
You can’t perform that action at this time.
0 commit comments