mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
@@ -108,6 +108,10 @@ class ClientProxy: ClientProxyProtocol {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
var accountURL: URL? {
|
||||
client.accountUrl().flatMap(URL.init(string:))
|
||||
}
|
||||
|
||||
func startSync() {
|
||||
MXLog.info("Starting sync")
|
||||
@@ -305,7 +309,8 @@ class ClientProxy: ClientProxyProtocol {
|
||||
func logout() async {
|
||||
await Task.dispatch(on: clientQueue) {
|
||||
do {
|
||||
try self.client.logout()
|
||||
// We aren't currently handling the RP initiated sign out URL.
|
||||
_ = try self.client.logout()
|
||||
} catch {
|
||||
MXLog.error("Failed logging out with error: \(error)")
|
||||
}
|
||||
|
||||
@@ -76,6 +76,8 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
|
||||
|
||||
var restorationToken: RestorationToken? { get }
|
||||
|
||||
var accountURL: URL? { get }
|
||||
|
||||
var roomSummaryProvider: RoomSummaryProviderProtocol? { get }
|
||||
|
||||
var inviteSummaryProvider: RoomSummaryProviderProtocol? { get }
|
||||
|
||||
@@ -25,6 +25,7 @@ class MockClientProxy: ClientProxyProtocol {
|
||||
let deviceID: String?
|
||||
let homeserver = ""
|
||||
let restorationToken: RestorationToken? = nil
|
||||
let accountURL: URL?
|
||||
|
||||
var roomSummaryProvider: RoomSummaryProviderProtocol? = MockRoomSummaryProvider()
|
||||
|
||||
@@ -32,9 +33,10 @@ class MockClientProxy: ClientProxyProtocol {
|
||||
|
||||
var avatarURLPublisher: AnyPublisher<URL?, Never> { Empty().eraseToAnyPublisher() }
|
||||
|
||||
init(userID: String, deviceID: String? = nil, roomSummaryProvider: RoomSummaryProviderProtocol? = MockRoomSummaryProvider()) {
|
||||
init(userID: String, deviceID: String? = nil, accountURL: URL? = nil, roomSummaryProvider: RoomSummaryProviderProtocol? = MockRoomSummaryProvider()) {
|
||||
self.userID = userID
|
||||
self.deviceID = deviceID
|
||||
self.accountURL = accountURL
|
||||
self.roomSummaryProvider = roomSummaryProvider
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user