File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -193,15 +193,15 @@ public final class RealtimeChannelV2: Sendable {
193193 )
194194 }
195195
196- public func updateAuth( jwt: String ) async {
196+ public func updateAuth( jwt: String ? ) async {
197197 logger? . debug ( " Updating auth token for channel \( topic) " )
198198 await push (
199199 RealtimeMessageV2 (
200200 joinRef: mutableState. joinRef,
201201 ref: socket. makeRef ( ) . description,
202202 topic: topic,
203203 event: ChannelEvent . accessToken,
204- payload: [ " access_token " : . string( jwt ) ]
204+ payload: [ " access_token " : jwt . map { . string( $0 ) } ?? . null ]
205205 )
206206 )
207207 }
Original file line number Diff line number Diff line change @@ -347,7 +347,7 @@ public final class RealtimeClientV2: Sendable {
347347 }
348348
349349 for channel in channels. values {
350- if let token , channel. status == . subscribed {
350+ if channel. status == . subscribed {
351351 await channel. updateAuth ( jwt: token)
352352 }
353353 }
You can’t perform that action at this time.
0 commit comments