Skip to content

Commit 61b770f

Browse files
committed
fix reply-context
1 parent 2705703 commit 61b770f

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

includes/transformer/class-comment.php

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -247,22 +247,11 @@ public function extract_reply_context( $mentions ) {
247247

248248
if ( $comment_query->comments ) {
249249
foreach ( $comment_query->comments as $comment ) {
250-
$id = null;
251-
$comment_meta = \get_comment_meta( $comment->comment_ID );
252-
253-
if ( ! empty( $comment_meta['source_id'][0] ) ) {
254-
$id = \esc_url( $comment_meta['source_id'][0] );
255-
} elseif ( ! empty( $comment_meta['source_url'][0] ) ) {
256-
$id = \esc_url( $comment_meta['source_url'][0] );
257-
} elseif ( ! empty( $comment->comment_author_url ) ) {
258-
$id = $comment->comment_author_url;
259-
}
260-
261-
if ( $id ) {
262-
$acct = Webfinger::uri_to_acct( $id );
250+
if ( ! empty( $comment->comment_author_url ) ) {
251+
$acct = Webfinger::uri_to_acct( $comment->comment_author_url );
263252
if ( $acct && ! is_wp_error( $acct ) ) {
264253
$acct = str_replace( 'acct:', '@', $acct );
265-
$mentions[ $acct ] = $id;
254+
$mentions[ $acct ] = $comment->comment_author_url;
266255
}
267256
}
268257
}

0 commit comments

Comments
 (0)