mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
updated SDK and improved report flow
the report flow is now based on the matrix version and the new one will only be used if the SDK checks if the server supports it.
This commit is contained in:
@@ -28,7 +28,6 @@ extension OIDCConfigurationProxy {
|
||||
logoUri: logoURI.absoluteString,
|
||||
tosUri: tosURI.absoluteString,
|
||||
policyUri: policyURI.absoluteString,
|
||||
contacts: nil,
|
||||
staticRegistrations: staticRegistrations)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ class ClientProxy: ClientProxyProtocol {
|
||||
syncServiceStateUpdateTaskHandle = createSyncServiceStateObserver(syncService)
|
||||
roomListStateUpdateTaskHandle = createRoomListServiceObserver(roomListService)
|
||||
roomListStateLoadingStateUpdateTaskHandle = createRoomListLoadingStateUpdateObserver(roomListService)
|
||||
|
||||
|
||||
delegateHandle = client.setDelegate(delegate: ClientDelegateWrapper { [weak self] isSoftLogout in
|
||||
self?.hasEncounteredAuthError = true
|
||||
self?.actionsSubject.send(.receivedAuthError(isSoftLogout: isSoftLogout))
|
||||
@@ -269,6 +269,17 @@ class ClientProxy: ClientProxyProtocol {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
var isReportRoomSupported: Bool {
|
||||
get async {
|
||||
do {
|
||||
return try await client.isReportRoomApiSupported()
|
||||
} catch {
|
||||
MXLog.error("Failed checking report room support with error: \(error)")
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private(set) lazy var pusherNotificationClientIdentifier: String? = {
|
||||
// NOTE: The result is stored as part of the restoration token. Any changes
|
||||
|
||||
@@ -113,6 +113,8 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
|
||||
|
||||
var sessionVerificationController: SessionVerificationControllerProxyProtocol? { get }
|
||||
|
||||
var isReportRoomSupported: Bool { get async }
|
||||
|
||||
func isOnlyDeviceLeft() async -> Result<Bool, ClientProxyError>
|
||||
|
||||
func startSync()
|
||||
|
||||
@@ -233,7 +233,7 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
MXLog.info("Sending audio")
|
||||
|
||||
do {
|
||||
let handle = try timeline.sendAudio(params: .init(filename: url.path(percentEncoded: false),
|
||||
let handle = try timeline.sendAudio(params: .init(source: .file(filename: url.path(percentEncoded: false)),
|
||||
caption: caption,
|
||||
formattedCaption: nil, // Rust will build this from the caption's markdown.
|
||||
mentions: nil,
|
||||
@@ -261,7 +261,7 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
MXLog.info("Sending file")
|
||||
|
||||
do {
|
||||
let handle = try timeline.sendFile(params: .init(filename: url.path(percentEncoded: false),
|
||||
let handle = try timeline.sendFile(params: .init(source: .file(filename: url.path(percentEncoded: false)),
|
||||
caption: caption,
|
||||
formattedCaption: nil, // Rust will build this from the caption's markdown.
|
||||
mentions: nil,
|
||||
@@ -290,7 +290,7 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
MXLog.info("Sending image")
|
||||
|
||||
do {
|
||||
let handle = try timeline.sendImage(params: .init(filename: url.path(percentEncoded: false),
|
||||
let handle = try timeline.sendImage(params: .init(source: .file(filename: url.path(percentEncoded: false)),
|
||||
caption: caption,
|
||||
formattedCaption: nil, // Rust will build this from the caption's markdown.
|
||||
mentions: nil,
|
||||
@@ -338,7 +338,7 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
MXLog.info("Sending video")
|
||||
|
||||
do {
|
||||
let handle = try timeline.sendVideo(params: .init(filename: url.path(percentEncoded: false),
|
||||
let handle = try timeline.sendVideo(params: .init(source: .file(filename: url.path(percentEncoded: false)),
|
||||
caption: caption,
|
||||
formattedCaption: nil,
|
||||
mentions: nil,
|
||||
@@ -367,7 +367,7 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
MXLog.info("Sending voice message")
|
||||
|
||||
do {
|
||||
let handle = try timeline.sendVoiceMessage(params: .init(filename: url.path(percentEncoded: false),
|
||||
let handle = try timeline.sendVoiceMessage(params: .init(source: .file(filename: url.path(percentEncoded: false)),
|
||||
caption: nil,
|
||||
formattedCaption: nil,
|
||||
mentions: nil,
|
||||
|
||||
Reference in New Issue
Block a user