File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change
1
+ Significance: minor
2
+ Type: changed
3
+
4
+ It’s now possible to reply to multiple posts using multiple reply blocks.
Original file line number Diff line number Diff line change @@ -615,16 +615,25 @@ protected function get_in_reply_to() {
615
615
return null ;
616
616
}
617
617
618
- $ blocks = \parse_blocks ( $ this ->item ->post_content );
618
+ $ reply_urls = array ();
619
+ $ blocks = \parse_blocks ( $ this ->item ->post_content );
619
620
620
621
foreach ( $ blocks as $ block ) {
621
622
if ( 'activitypub/reply ' === $ block ['blockName ' ] && isset ( $ block ['attrs ' ]['url ' ] ) ) {
622
623
// We only support one reply block per post for now.
623
- return $ block ['attrs ' ]['url ' ];
624
+ $ reply_urls [] = $ block ['attrs ' ]['url ' ];
624
625
}
625
626
}
626
627
627
- return null ;
628
+ if ( empty ( $ reply_urls ) ) {
629
+ return null ;
630
+ }
631
+
632
+ if ( 1 === count ( $ reply_urls ) ) {
633
+ return \current ( $ reply_urls );
634
+ }
635
+
636
+ return \array_values ( \array_unique ( $ reply_urls ) );
628
637
}
629
638
630
639
/**
You can’t perform that action at this time.
0 commit comments