mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 13:37:11 +00:00
Configure SDK to use the global/OS proxy (#2493)
This commit is contained in:
parent
d380c2de56
commit
9b949ce84e
@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 56;
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
@ -1076,7 +1076,7 @@
|
||||
033DB41C51865A2E83174E87 /* target.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = target.yml; sourceTree = "<group>"; };
|
||||
035177BCD8E8308B098AC3C2 /* WindowManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowManager.swift; sourceTree = "<group>"; };
|
||||
0376C429FAB1687C3D905F3E /* MockCoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockCoder.swift; sourceTree = "<group>"; };
|
||||
0392E3FDE372C9B56FEEED8B /* test_voice_message.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_voice_message.m4a; sourceTree = "<group>"; };
|
||||
0392E3FDE372C9B56FEEED8B /* test_voice_message.m4a */ = {isa = PBXFileReference; path = test_voice_message.m4a; sourceTree = "<group>"; };
|
||||
03DD998E523D4EC93C7ED703 /* RoomNotificationSettingsScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||
03FABD73FD8086EFAB699F42 /* MediaUploadPreviewScreenViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaUploadPreviewScreenViewModelTests.swift; sourceTree = "<group>"; };
|
||||
044E501B8331B339874D1B96 /* CompoundIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompoundIcon.swift; sourceTree = "<group>"; };
|
||||
@ -1137,7 +1137,7 @@
|
||||
127A57D053CE8C87B5EFB089 /* Consumable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Consumable.swift; sourceTree = "<group>"; };
|
||||
127C8472672A5BA09EF1ACF8 /* CurrentValuePublisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurrentValuePublisher.swift; sourceTree = "<group>"; };
|
||||
12F1E7F9C2BE8BB751037826 /* WaitlistScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenCoordinator.swift; sourceTree = "<group>"; };
|
||||
1304D9191300873EADA52D6E /* IntegrationTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = IntegrationTests.xctestplan; sourceTree = "<group>"; };
|
||||
1304D9191300873EADA52D6E /* IntegrationTests.xctestplan */ = {isa = PBXFileReference; path = IntegrationTests.xctestplan; sourceTree = "<group>"; };
|
||||
130ED565A078F7E0B59D9D25 /* UNTextInputNotificationResponse+Creator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UNTextInputNotificationResponse+Creator.swift"; sourceTree = "<group>"; };
|
||||
13802897C7AFA360EA74C0B0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
||||
1423AB065857FA546444DB15 /* NotificationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationManager.swift; sourceTree = "<group>"; };
|
||||
@ -1581,7 +1581,7 @@
|
||||
8D55702474F279D910D2D162 /* RoomStateEventStringBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomStateEventStringBuilder.swift; sourceTree = "<group>"; };
|
||||
8D8169443E5AC5FF71BFB3DB /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
8DC2C9E0E15C79BBDA80F0A2 /* TimelineStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineStyle.swift; sourceTree = "<group>"; };
|
||||
8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UITests.xctestplan; sourceTree = "<group>"; };
|
||||
8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; path = UITests.xctestplan; sourceTree = "<group>"; };
|
||||
8E1BBA73B611EDEEA6E20E05 /* InvitesScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvitesScreenModels.swift; sourceTree = "<group>"; };
|
||||
8EC57A32ABC80D774CC663DB /* SettingsScreenUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScreenUITests.swift; sourceTree = "<group>"; };
|
||||
8F21ED7205048668BEB44A38 /* AppActivityView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppActivityView.swift; sourceTree = "<group>"; };
|
||||
@ -1722,7 +1722,7 @@
|
||||
B50F03079F6B5EF9CA005F14 /* TimelineProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineProxyProtocol.swift; sourceTree = "<group>"; };
|
||||
B590BD4507D4F0A377FDE01A /* LoadableAvatarImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadableAvatarImage.swift; sourceTree = "<group>"; };
|
||||
B5B243E7818E5E9F6A4EDC7A /* NoticeRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeRoomTimelineView.swift; sourceTree = "<group>"; };
|
||||
B61C339A2FDDBD067FF6635C /* ConfettiScene.scn */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; path = ConfettiScene.scn; sourceTree = "<group>"; };
|
||||
B61C339A2FDDBD067FF6635C /* ConfettiScene.scn */ = {isa = PBXFileReference; path = ConfettiScene.scn; sourceTree = "<group>"; };
|
||||
B6311F21F911E23BE4DF51B4 /* ReadMarkerRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadMarkerRoomTimelineView.swift; sourceTree = "<group>"; };
|
||||
B63B69F9A2BC74DD40DC75C8 /* AdvancedSettingsScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedSettingsScreenViewModel.swift; sourceTree = "<group>"; };
|
||||
B697816AF93DA06EC58C5D70 /* WaitlistScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||
@ -1831,7 +1831,7 @@
|
||||
CE47A97726F0675DEE387BF9 /* TypingIndicatorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypingIndicatorView.swift; sourceTree = "<group>"; };
|
||||
CEE0E6043EFCF6FD2A341861 /* TimelineReplyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineReplyView.swift; sourceTree = "<group>"; };
|
||||
CEE20623EB4A9B88FB29F2BA /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/SAS.strings; sourceTree = "<group>"; };
|
||||
CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UnitTests.xctestplan; sourceTree = "<group>"; };
|
||||
CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; path = UnitTests.xctestplan; sourceTree = "<group>"; };
|
||||
CF48AF076424DBC1615C74AD /* AuthenticationServiceProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationServiceProxy.swift; sourceTree = "<group>"; };
|
||||
D0140615D2232612C813FD6C /* EncryptedHistoryRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedHistoryRoomTimelineItem.swift; sourceTree = "<group>"; };
|
||||
D071F86CD47582B9196C9D16 /* UserDiscoverySection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDiscoverySection.swift; sourceTree = "<group>"; };
|
||||
@ -1941,7 +1941,7 @@
|
||||
ECF79FB25E2D4BD6F50CE7C9 /* RoomMembersListScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMembersListScreenViewModel.swift; sourceTree = "<group>"; };
|
||||
ED044D00F2176681CC02CD54 /* HomeScreenRoomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreenRoomCell.swift; sourceTree = "<group>"; };
|
||||
ED1D792EB82506A19A72C8DE /* RoomTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemProtocol.swift; sourceTree = "<group>"; };
|
||||
ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = message.caf; sourceTree = "<group>"; };
|
||||
ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; path = message.caf; sourceTree = "<group>"; };
|
||||
ED983D4DCA5AFA6E1ED96099 /* StateRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StateRoomTimelineView.swift; sourceTree = "<group>"; };
|
||||
EDAA4472821985BF868CC21C /* ServerSelectionViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionViewModelTests.swift; sourceTree = "<group>"; };
|
||||
EE378083653EF0C9B5E9D580 /* EmoteRoomTimelineItemContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmoteRoomTimelineItemContent.swift; sourceTree = "<group>"; };
|
||||
@ -1959,7 +1959,7 @@
|
||||
F174A5627CDB3CAF280D1880 /* EmojiPickerScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerScreenModels.swift; sourceTree = "<group>"; };
|
||||
F17EFA1D3D09FC2F9C5E1CB2 /* MediaProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaProvider.swift; sourceTree = "<group>"; };
|
||||
F1B8500C152BC59445647DA8 /* UnsupportedRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnsupportedRoomTimelineItem.swift; sourceTree = "<group>"; };
|
||||
F2D513D2477B57F90E98EEC0 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = portrait_test_video.mp4; sourceTree = "<group>"; };
|
||||
F2D513D2477B57F90E98EEC0 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; path = portrait_test_video.mp4; sourceTree = "<group>"; };
|
||||
F31F59030205A6F65B057E1A /* MatrixEntityRegexTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatrixEntityRegexTests.swift; sourceTree = "<group>"; };
|
||||
F348B5F2C12F9D4F4B4D3884 /* VideoRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineItem.swift; sourceTree = "<group>"; };
|
||||
F36C0A6D59717193F49EA986 /* UserSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSessionTests.swift; sourceTree = "<group>"; };
|
||||
@ -6287,7 +6287,9 @@
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
||||
OTHER_SWIFT_FLAGS = "-DIS_NSE";
|
||||
OTHER_SWIFT_FLAGS = (
|
||||
"-DIS_NSE",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.nse";
|
||||
PRODUCT_DISPLAY_NAME = "$(APP_DISPLAY_NAME)";
|
||||
PRODUCT_NAME = NSE;
|
||||
@ -6318,7 +6320,9 @@
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
||||
OTHER_SWIFT_FLAGS = "-DIS_MAIN_APP";
|
||||
OTHER_SWIFT_FLAGS = (
|
||||
"-DIS_MAIN_APP",
|
||||
);
|
||||
PILLS_UT_TYPE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).pills";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)";
|
||||
PRODUCT_NAME = "$(APP_NAME)";
|
||||
@ -6344,7 +6348,9 @@
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
||||
OTHER_SWIFT_FLAGS = "-DIS_MAIN_APP";
|
||||
OTHER_SWIFT_FLAGS = (
|
||||
"-DIS_MAIN_APP",
|
||||
);
|
||||
PILLS_UT_TYPE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).pills";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)";
|
||||
PRODUCT_NAME = "$(APP_NAME)";
|
||||
@ -6587,7 +6593,9 @@
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
||||
OTHER_SWIFT_FLAGS = "-DIS_NSE";
|
||||
OTHER_SWIFT_FLAGS = (
|
||||
"-DIS_NSE",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.nse";
|
||||
PRODUCT_DISPLAY_NAME = "$(APP_DISPLAY_NAME)";
|
||||
PRODUCT_NAME = NSE;
|
||||
@ -6769,7 +6777,7 @@
|
||||
repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 1.1.41;
|
||||
version = 1.1.42;
|
||||
};
|
||||
};
|
||||
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
|
||||
|
@ -130,8 +130,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/matrix-org/matrix-rust-components-swift",
|
||||
"state" : {
|
||||
"revision" : "d773c12e46b01b6512b9b3581268093c8ba4d55d",
|
||||
"version" : "1.1.41"
|
||||
"revision" : "62a45668e8e8a70079b8fae0b8031852533900e9",
|
||||
"version" : "1.1.42"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Generated using Sourcery 2.1.3 — https://github.com/krzysztofzablocki/Sourcery
|
||||
// Generated using Sourcery 2.1.7 — https://github.com/krzysztofzablocki/Sourcery
|
||||
// DO NOT EDIT
|
||||
|
||||
// swiftlint:disable all
|
||||
@ -371,16 +371,37 @@ class SDKClientMock: SDKClientProtocol {
|
||||
}
|
||||
public var ignoreUserUserIdReceivedUserId: String?
|
||||
public var ignoreUserUserIdReceivedInvocations: [String] = []
|
||||
public var ignoreUserUserIdClosure: ((String) throws -> Void)?
|
||||
public var ignoreUserUserIdClosure: ((String) async throws -> Void)?
|
||||
|
||||
public func ignoreUser(userId: String) throws {
|
||||
public func ignoreUser(userId: String) async throws {
|
||||
if let error = ignoreUserUserIdThrowableError {
|
||||
throw error
|
||||
}
|
||||
ignoreUserUserIdCallsCount += 1
|
||||
ignoreUserUserIdReceivedUserId = userId
|
||||
ignoreUserUserIdReceivedInvocations.append(userId)
|
||||
try ignoreUserUserIdClosure?(userId)
|
||||
try await ignoreUserUserIdClosure?(userId)
|
||||
}
|
||||
//MARK: - ignoredUsers
|
||||
|
||||
public var ignoredUsersThrowableError: Error?
|
||||
public var ignoredUsersCallsCount = 0
|
||||
public var ignoredUsersCalled: Bool {
|
||||
return ignoredUsersCallsCount > 0
|
||||
}
|
||||
public var ignoredUsersReturnValue: [String]!
|
||||
public var ignoredUsersClosure: (() async throws -> [String])?
|
||||
|
||||
public func ignoredUsers() async throws -> [String] {
|
||||
if let error = ignoredUsersThrowableError {
|
||||
throw error
|
||||
}
|
||||
ignoredUsersCallsCount += 1
|
||||
if let ignoredUsersClosure = ignoredUsersClosure {
|
||||
return try await ignoredUsersClosure()
|
||||
} else {
|
||||
return ignoredUsersReturnValue
|
||||
}
|
||||
}
|
||||
//MARK: - login
|
||||
|
||||
@ -628,6 +649,27 @@ class SDKClientMock: SDKClientProtocol {
|
||||
setPusherIdentifiersKindAppDisplayNameDeviceDisplayNameProfileTagLangReceivedInvocations.append((identifiers: identifiers, kind: kind, appDisplayName: appDisplayName, deviceDisplayName: deviceDisplayName, profileTag: profileTag, lang: lang))
|
||||
try setPusherIdentifiersKindAppDisplayNameDeviceDisplayNameProfileTagLangClosure?(identifiers, kind, appDisplayName, deviceDisplayName, profileTag, lang)
|
||||
}
|
||||
//MARK: - subscribeToIgnoredUsers
|
||||
|
||||
public var subscribeToIgnoredUsersListenerCallsCount = 0
|
||||
public var subscribeToIgnoredUsersListenerCalled: Bool {
|
||||
return subscribeToIgnoredUsersListenerCallsCount > 0
|
||||
}
|
||||
public var subscribeToIgnoredUsersListenerReceivedListener: IgnoredUsersListener?
|
||||
public var subscribeToIgnoredUsersListenerReceivedInvocations: [IgnoredUsersListener] = []
|
||||
public var subscribeToIgnoredUsersListenerReturnValue: TaskHandle!
|
||||
public var subscribeToIgnoredUsersListenerClosure: ((IgnoredUsersListener) -> TaskHandle)?
|
||||
|
||||
public func subscribeToIgnoredUsers(listener: IgnoredUsersListener) -> TaskHandle {
|
||||
subscribeToIgnoredUsersListenerCallsCount += 1
|
||||
subscribeToIgnoredUsersListenerReceivedListener = listener
|
||||
subscribeToIgnoredUsersListenerReceivedInvocations.append(listener)
|
||||
if let subscribeToIgnoredUsersListenerClosure = subscribeToIgnoredUsersListenerClosure {
|
||||
return subscribeToIgnoredUsersListenerClosure(listener)
|
||||
} else {
|
||||
return subscribeToIgnoredUsersListenerReturnValue
|
||||
}
|
||||
}
|
||||
//MARK: - syncService
|
||||
|
||||
public var syncServiceCallsCount = 0
|
||||
@ -654,16 +696,16 @@ class SDKClientMock: SDKClientProtocol {
|
||||
}
|
||||
public var unignoreUserUserIdReceivedUserId: String?
|
||||
public var unignoreUserUserIdReceivedInvocations: [String] = []
|
||||
public var unignoreUserUserIdClosure: ((String) throws -> Void)?
|
||||
public var unignoreUserUserIdClosure: ((String) async throws -> Void)?
|
||||
|
||||
public func unignoreUser(userId: String) throws {
|
||||
public func unignoreUser(userId: String) async throws {
|
||||
if let error = unignoreUserUserIdThrowableError {
|
||||
throw error
|
||||
}
|
||||
unignoreUserUserIdCallsCount += 1
|
||||
unignoreUserUserIdReceivedUserId = userId
|
||||
unignoreUserUserIdReceivedInvocations.append(userId)
|
||||
try unignoreUserUserIdClosure?(userId)
|
||||
try await unignoreUserUserIdClosure?(userId)
|
||||
}
|
||||
//MARK: - uploadAvatar
|
||||
|
||||
|
@ -67,4 +67,17 @@ extension URL: ExpressibleByStringLiteral {
|
||||
|
||||
return url
|
||||
}
|
||||
|
||||
var globalProxy: String? {
|
||||
if let proxySettingsUnmanaged = CFNetworkCopySystemProxySettings() {
|
||||
let proxySettings = proxySettingsUnmanaged.takeRetainedValue()
|
||||
let proxiesUnmanaged = CFNetworkCopyProxiesForURL(self as CFURL, proxySettings)
|
||||
if let proxy = (proxiesUnmanaged.takeRetainedValue() as? [[AnyHashable: Any]])?.first,
|
||||
let hostname = proxy[kCFProxyHostNameKey] as? String,
|
||||
let port = proxy[kCFProxyPortNumberKey] as? Int {
|
||||
return "\(hostname):\(port)"
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
@ -46,11 +46,12 @@ class AuthenticationServiceProxy: AuthenticationServiceProxyProtocol {
|
||||
policyUri: appSettings.privacyURL.absoluteString,
|
||||
contacts: [appSettings.supportEmailAddress],
|
||||
staticRegistrations: appSettings.oidcStaticRegistrations.mapKeys { $0.absoluteString })
|
||||
|
||||
|
||||
authenticationService = AuthenticationService(basePath: userSessionStore.baseDirectory.path,
|
||||
passphrase: passphrase,
|
||||
userAgent: UserAgentBuilder.makeASCIIUserAgent(),
|
||||
additionalRootCertificates: [],
|
||||
proxy: appSettings.websiteURL.globalProxy,
|
||||
oidcConfiguration: oidcConfiguration,
|
||||
customSlidingSyncProxy: appSettings.slidingSyncProxyURL?.absoluteString,
|
||||
sessionDelegate: userSessionStore.clientSessionDelegate,
|
||||
|
@ -242,13 +242,11 @@ class RoomProxy: RoomProxyProtocol {
|
||||
sendMessageBackgroundTask?.stop()
|
||||
}
|
||||
|
||||
return await Task.dispatch(on: userInitiatedDispatchQueue) {
|
||||
do {
|
||||
try self.room.ignoreUser(userId: userID)
|
||||
return .success(())
|
||||
} catch {
|
||||
return .failure(.failedReportingContent)
|
||||
}
|
||||
do {
|
||||
try await room.ignoreUser(userId: userID)
|
||||
return .success(())
|
||||
} catch {
|
||||
return .failure(.failedIgnoringUser)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ import MatrixRustSDK
|
||||
enum RoomProxyError: Error, Equatable {
|
||||
case failedRedactingEvent
|
||||
case failedReportingContent
|
||||
case failedIgnoringUser
|
||||
case failedRetrievingMember
|
||||
case failedLeavingRoom
|
||||
case failedAcceptingInvite
|
||||
|
@ -115,19 +115,28 @@ class UserSessionStore: UserSessionStoreProtocol {
|
||||
if credentials.restorationToken.passphrase != nil {
|
||||
MXLog.info("Restoring client with encrypted store.")
|
||||
}
|
||||
let builder = ClientBuilder()
|
||||
|
||||
let homeserverURL = credentials.restorationToken.session.homeserverUrl
|
||||
|
||||
var builder = ClientBuilder()
|
||||
.basePath(path: baseDirectory.path)
|
||||
.username(username: credentials.userID)
|
||||
.homeserverUrl(url: credentials.restorationToken.session.homeserverUrl)
|
||||
.homeserverUrl(url: homeserverURL)
|
||||
.passphrase(passphrase: credentials.restorationToken.passphrase)
|
||||
.userAgent(userAgent: UserAgentBuilder.makeASCIIUserAgent())
|
||||
.enableCrossProcessRefreshLock(processId: InfoPlistReader.main.bundleIdentifier,
|
||||
sessionDelegate: keychainController)
|
||||
.serverVersions(versions: ["v1.0", "v1.1", "v1.2", "v1.3", "v1.4", "v1.5"]) // FIXME: Quick and dirty fix for stopping version requests on startup https://github.com/matrix-org/matrix-rust-sdk/pull/1376
|
||||
|
||||
|
||||
if let homeserverURL = URL(string: homeserverURL),
|
||||
let proxy = homeserverURL.globalProxy {
|
||||
builder = builder.proxy(url: proxy)
|
||||
}
|
||||
let completeBuilder = builder
|
||||
|
||||
do {
|
||||
let client: Client = try await Task.dispatch(on: .global()) {
|
||||
let client = try builder.build()
|
||||
let client = try completeBuilder.build()
|
||||
try client.restoreSession(session: credentials.restorationToken.session)
|
||||
return client
|
||||
}
|
||||
|
@ -31,15 +31,23 @@ final class NSEUserSession {
|
||||
if credentials.restorationToken.passphrase != nil {
|
||||
MXLog.info("Restoring client with encrypted store.")
|
||||
}
|
||||
baseClient = try ClientBuilder()
|
||||
|
||||
let homeserverURL = credentials.restorationToken.session.homeserverUrl
|
||||
var clientBuilder = ClientBuilder()
|
||||
.basePath(path: URL.sessionsBaseDirectory.path)
|
||||
.username(username: credentials.userID)
|
||||
.homeserverUrl(url: homeserverURL)
|
||||
.passphrase(passphrase: credentials.restorationToken.passphrase)
|
||||
.userAgent(userAgent: UserAgentBuilder.makeASCIIUserAgent())
|
||||
.enableCrossProcessRefreshLock(processId: InfoPlistReader.main.bundleIdentifier,
|
||||
sessionDelegate: clientSessionDelegate)
|
||||
.build()
|
||||
|
||||
if let homeserverURL = URL(string: homeserverURL),
|
||||
let proxy = homeserverURL.globalProxy {
|
||||
clientBuilder = clientBuilder.proxy(url: proxy)
|
||||
}
|
||||
|
||||
baseClient = try clientBuilder.build()
|
||||
delegateHandle = baseClient.setDelegate(delegate: ClientDelegateWrapper())
|
||||
try baseClient.restoreSession(session: credentials.restorationToken.session)
|
||||
|
||||
|
@ -47,7 +47,7 @@ packages:
|
||||
# Element/Matrix dependencies
|
||||
MatrixRustSDK:
|
||||
url: https://github.com/matrix-org/matrix-rust-components-swift
|
||||
exactVersion: 1.1.41
|
||||
exactVersion: 1.1.42
|
||||
# path: ../matrix-rust-sdk
|
||||
Compound:
|
||||
url: https://github.com/element-hq/compound-ios
|
||||
|
Loading…
x
Reference in New Issue
Block a user