Fix mistake during rebase

This commit is contained in:
Francis Lavoie 2019-05-15 17:11:33 -04:00 committed by Francis Lavoie
parent faf2c75d3d
commit ed5503407e
No known key found for this signature in database
GPG Key ID: B9E0E04A76AF4692
1 changed files with 3 additions and 3 deletions

View File

@ -6,9 +6,9 @@ use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Support\Collection;
use React\Promise\PromiseInterface;
use Symfony\Component\HttpKernel\Exception\HttpException;
use BeyondCode\LaravelWebSockets\PubSub\ReplicationInterface;
use BeyondCode\LaravelWebSockets\WebSockets\Channels\PresenceChannel;
use Symfony\Component\HttpKernel\Exception\HttpException;
class FetchChannelsController extends Controller
{
@ -47,7 +47,7 @@ class FetchChannelsController extends Controller
// We return a promise since the backend runs async. We get $counts back
// as a key-value array of channel names and their member count.
return $memberCounts->then(function (array $counts) use ($channels) {
return $memberCounts->then(function (array $counts) use ($channels, $attributes) {
return $this->collectUserCounts($channels, $attributes, function (PresenceChannel $channel) use ($counts) {
return $counts[$channel->getChannelName()];
});
@ -67,7 +67,7 @@ class FetchChannelsController extends Controller
if (in_array('user_count', $attributes)) {
$info->user_count = $transformer($channel);
}
return $info;
})->toArray() ?: new \stdClass,
];