@@ -91,11 +91,11 @@ public function bootstrap(Tenant $tenant): void
9191 // contract gets the same tenant broadcaster that the manager uses, instead of the stale central one.
9292 // The closure runs immediately (the extended singleton is already resolved), and it's also what makes
9393 // channel auth work in tenant context -- the broadcaster resolved here gets cached as the tenant
94- // manager's default driver and receives the central broadcaster's auth state (see copyAuthState ()).
94+ // manager's default driver and receives the central broadcaster's auth properties (see copyAuthProperties ()).
9595 $ this ->app ->extend (BroadcasterContract::class, function (BroadcasterContract $ centralBroadcaster ) {
9696 $ tenantBroadcaster = $ this ->app ->make (BroadcastManager::class)->connection ();
9797
98- $ this ->copyAuthState ($ centralBroadcaster , $ tenantBroadcaster );
98+ $ this ->copyAuthProperties ($ centralBroadcaster , $ tenantBroadcaster );
9999
100100 return $ tenantBroadcaster ;
101101 });
@@ -107,18 +107,19 @@ public function bootstrap(Tenant $tenant): void
107107 }
108108
109109 /**
110- * Copy the auth state (the channel auth closures, their options, and the authenticated user
111- * callback) from one broadcaster to another. A freshly resolved broadcaster has no auth state,
112- * so without the copying, channel auth and user auth would stop working (403) in tenant context.
110+ * Copy the channel and auth properties (the registered channel auth closures, their
111+ * options, and the authenticated user callback) from one broadcaster to another. A
112+ * freshly resolved broadcaster has none of these set, so without the copying, channel
113+ * auth and user auth would stop working (403) in tenant context.
113114 *
114- * The auth state is stored on the abstract Broadcaster class, not in the Broadcaster
115- * contract, and it's stored in protected properties. Because of that, we have
115+ * These properties are stored on the abstract Broadcaster class, not in the Broadcaster
116+ * contract, and they're stored in protected properties. Because of that, we have
116117 * to check that both broadcasters are instances of the abstract Broadcaster class and
117118 * use invade() to access the protected properties (for the $channels property, there
118119 * is a public accessor -- getChannels() -- but since invade is already used here,
119120 * we access the property directly for consistency).
120121 */
121- protected function copyAuthState (BroadcasterContract $ from , BroadcasterContract $ to ): void
122+ protected function copyAuthProperties (BroadcasterContract $ from , BroadcasterContract $ to ): void
122123 {
123124 if (! $ from instanceof Broadcaster || ! $ to instanceof Broadcaster) {
124125 return ;
0 commit comments