mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-18 04:21:27 +00:00
24 lines
755 B
PHP
24 lines
755 B
PHP
<?php
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Broadcast Channels
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here you may register all of the event broadcasting channels that your
|
|
| application supports. The given channel authorization callbacks are
|
|
| used to check if an authenticated user can listen to the channel.
|
|
|
|
|
*/
|
|
|
|
Broadcast::channel('App.User.{id}', function ($user, $id) {
|
|
return (int) $user->id === (int) $id;
|
|
});
|
|
|
|
Broadcast::channel('live.chat.{id}', function ($user, $id) {
|
|
return true;
|
|
}, ['guards' => ['web', 'api']]);
|
|
|
|
Broadcast::channel('live.presence.{id}', function ($user, $id) {
|
|
return [ $user->profile_id ];
|
|
}, ['guards' => ['web', 'api']]);
|