Fix another bug where the app could crash on launch if the access token had expired. (#4733)

Updates the SDK.
This commit is contained in:
Doug
2025-11-11 15:29:23 +00:00
committed by GitHub
parent 8088cb1a7c
commit 2be321862f
6 changed files with 364 additions and 149 deletions
@@ -178,7 +178,7 @@ class AuthenticationService: AuthenticationServiceProtocol {
do {
let client = try await makeClient(homeserverAddress: scannedServerName)
let qrCodeHandler = client.loginWithQrCode(oidcConfiguration: appSettings.oidcConfiguration.rustValue)
let qrCodeHandler = client.newLoginWithQrCodeHandler(oidcConfiguration: appSettings.oidcConfiguration.rustValue)
try await qrCodeHandler.scan(qrCodeData: qrData, progressListener: listener)
return await userSession(for: client)
} catch let error as HumanQrLoginError {
@@ -49,7 +49,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
case .failedToParseState(let eventType, _, let error):
return buildUnsupportedTimelineItem(eventItemProxy, eventType, error, isOutgoing)
case .state(_, let content):
if isDM, content == .roomCreate {
if isDM, case .roomCreate = content {
return nil
}
return buildStateTimelineItem(for: eventItemProxy, state: content, isOutgoing: isOutgoing)