mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
clean up channels
This commit is contained in:
parent
0a5ac9b332
commit
7b7974fbfa
@ -11,8 +11,6 @@
|
||||
|
|
||||
*/
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
// Broadcast::channel('App.User.{id}', function ($user, $id) {
|
||||
// nlog($id);
|
||||
|
||||
@ -20,18 +18,6 @@ use App\Models\User;
|
||||
// // return (int) $user->id === (int) $id;
|
||||
// });
|
||||
|
||||
Broadcast::channel('company-{company_key}', function (User $user, string $company_key) {
|
||||
Broadcast::channel('company-{company_key}', function (\App\Models\User $user, string $company_key) {
|
||||
return $user->company()->company_key === $company_key;
|
||||
});
|
||||
|
||||
Broadcast::channel('company-${company.company_key}.{roomId}', function (User $user, int $roomId) {
|
||||
if ($user->canJoinRoom($roomId)) {
|
||||
return ['id' => $user->id, 'name' => $user->name];
|
||||
}
|
||||
});
|
||||
|
||||
Broadcast::channel('company-{company_key}.invoices.{invoice_id}', function (User $user, string $company_key, string $invoice_id) {
|
||||
// @todo
|
||||
|
||||
return true;
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user