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 @@ -198,15 +198,15 @@ public final class RealtimeChannelV2: Sendable {
198198 )
199199 }
200200
201- public func updateAuth( jwt: String ) async {
201+ public func updateAuth( jwt: String ? ) async {
202202 logger? . debug ( " Updating auth token for channel \( topic) " )
203203 await push (
204204 RealtimeMessageV2 (
205205 joinRef: mutableState. joinRef,
206206 ref: socket. makeRef ( ) . description,
207207 topic: topic,
208208 event: ChannelEvent . accessToken,
209- payload: [ " access_token " : . string( jwt ) ]
209+ payload: [ " access_token " : jwt . map { . string( $0 ) } ?? . null ]
210210 )
211211 )
212212 }
Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ public final class RealtimeClientV2: Sendable {
399399 }
400400
401401 for channel in subscriptions. values {
402- if let token , channel. status == . subscribed {
402+ if channel. status == . subscribed {
403403 await channel. updateAuth ( jwt: token)
404404 }
405405 }
You can’t perform that action at this time.
0 commit comments