Skip to content

Commit

Permalink
fix: possibly fixes a crash where inReplyToId is null in a ThreadFrag…
Browse files Browse the repository at this point in the history
…ment

cc: @sk22

Btw check the commit before this one, because there is a fix that applies for Megalodon there as well
  • Loading branch information
LucasGGamerM committed Dec 8, 2023
1 parent 46115e8 commit 3d48443
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public static List<NeighborAncestryInfo> mapNeighborhoodAncestry(Status mainStat
// descendant neighbor
Optional
.ofNullable(count > index + 1 ? statuses.get(index + 1) : null)
.filter(s -> s.inReplyToId.equals(current.id))
.filter(s -> current.id.equals(s.inReplyToId))
.orElse(null),
// ancestoring neighbor
Optional.ofNullable(index > 0 ? ancestry.get(index - 1) : null)
Expand Down

0 comments on commit 3d48443

Please sign in to comment.