1
0
Fork 0
forked from mirror/pixelfed
pixelfed/routes/channels.php

25 lines
755 B
PHP
Raw Normal View History

2018-04-15 23:56:48 +00:00
<?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;
});
2022-06-26 22:06:08 +00:00
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']]);