File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -486,16 +486,18 @@ class Client {
486
486
break;
487
487
case 'event':
488
488
if (!message.data) return;
489
- let data = <RealtimeResponseEvent <unknown >>message.data;
490
- if (data?.channels) {
491
- const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel));
492
- if (!isSubscribed) return;
493
- this.realtime.subscriptions.forEach(subscription => {
494
- if (data.channels.some(channel => subscription.channels.includes(channel))) {
495
- setTimeout(() => subscription.callback(data));
496
- }
497
- })
498
- }
489
+
490
+ const data = message.data as RealtimeResponseEvent<unknown >;
491
+ if (!data?.channels) return;
492
+
493
+ const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel));
494
+ if (!isSubscribed) return;
495
+
496
+ this.realtime.subscriptions.forEach(subscription => {
497
+ if (data.channels.some(channel => subscription.channels.includes(channel))) {
498
+ setTimeout(() => subscription.callback(data));
499
+ }
500
+ });
499
501
break;
500
502
case 'pong':
501
503
break; // Handle pong response if needed
You can’t perform that action at this time.
0 commit comments