Bluesky app fork with some witchin' additions 💫

Tweak feed manip to show cases of A -> B without further children (#4883)

authored by hailey.at and committed by

GitHub 753a2334 5845e08e

+10 -8
+10 -8
src/lib/api/feed-manip.ts
··· 428 428 // Only show replies from self or people you follow. 429 429 return false 430 430 } 431 - if (!parentAuthor || !grandparentAuthor || !rootAuthor) { 432 - // Don't surface orphaned reply subthreads. 433 - return false 434 - } 435 431 if ( 436 - parentAuthor.did === author.did && 437 - grandparentAuthor.did === author.did && 438 - rootAuthor.did === author.did 432 + (!parentAuthor || parentAuthor.did === author.did) && 433 + (!rootAuthor || rootAuthor.did === author.did) && 434 + (!grandparentAuthor || grandparentAuthor.did === author.did) 439 435 ) { 440 436 // Always show self-threads. 441 437 return true 442 438 } 443 439 // From this point on we need at least one more reason to show it. 444 440 if ( 441 + parentAuthor && 445 442 parentAuthor.did !== author.did && 446 443 isSelfOrFollowing(parentAuthor, userDid) 447 444 ) { 448 445 return true 449 446 } 450 447 if ( 448 + grandparentAuthor && 451 449 grandparentAuthor.did !== author.did && 452 450 isSelfOrFollowing(grandparentAuthor, userDid) 453 451 ) { 454 452 return true 455 453 } 456 - if (rootAuthor.did !== author.did && isSelfOrFollowing(rootAuthor, userDid)) { 454 + if ( 455 + rootAuthor && 456 + rootAuthor.did !== author.did && 457 + isSelfOrFollowing(rootAuthor, userDid) 458 + ) { 457 459 return true 458 460 } 459 461 return false