mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-25 00:38:33 +00:00
Merge "ThreadItem: Remove redundant check"
This commit is contained in:
commit
54d5d06e27
|
@ -65,10 +65,7 @@ abstract class ThreadItem implements JsonSerializable {
|
|||
$authors = [];
|
||||
$getAuthorSet = static function ( ThreadItem $comment ) use ( &$authors, &$getAuthorSet ) {
|
||||
if ( $comment instanceof CommentItem ) {
|
||||
$author = $comment->getAuthor();
|
||||
if ( $author ) {
|
||||
$authors[ $author ] = true;
|
||||
}
|
||||
$authors[ $comment->getAuthor() ] = true;
|
||||
}
|
||||
// Get the set of authors in the same format from each reply
|
||||
array_map( $getAuthorSet, $comment->getReplies() );
|
||||
|
|
Loading…
Reference in a new issue