$pusher->getChannels(['filter_by_prefix' => 'presence-', 'info' => 'user_count']); return wrong number for user_count.
If we check Pusher documentation we will see - user_count is number of distinct users currently subscribed to this channel (a single user may be subscribed many times, but will only count as one). So user_count must return only unique users count, not connections count.
2. users list on get presence users request
$pusher->getPresenceUsers('presence-channel-id'); return wrong list of users with duplicates for each connection. If we check Pusher documentation - fetch user IDs of user currently subscribed to a presence channel. Here must be only unique users, not connections.
Steps To Reproduce
Run $pusher->getChannels(['filter_by_prefix' => 'presence-', 'info' => 'user_count']);.
Run $pusher->getPresenceUsers('presence-channel-id');.
Reverb Version
1.x
Laravel Version
11
PHP Version
8.3
Description
1. user_count on get channels request
$pusher->getChannels(['filter_by_prefix' => 'presence-', 'info' => 'user_count']);
return wrong number foruser_count
.If we check Pusher documentation we will see -
user_count
is number of distinct users currently subscribed to this channel (a single user may be subscribed many times, but will only count as one). Souser_count
must return only unique users count, not connections count.2. users list on get presence users request
$pusher->getPresenceUsers('presence-channel-id');
return wrong list of users with duplicates for each connection. If we check Pusher documentation - fetch user IDs of user currently subscribed to a presence channel. Here must be only unique users, not connections.Steps To Reproduce
$pusher->getChannels(['filter_by_prefix' => 'presence-', 'info' => 'user_count']);
.$pusher->getPresenceUsers('presence-channel-id');
.