Skip to content

Commit d6e47ba

Browse files
committed
Bump to version v1.0.50 (matrix-rust-sdk/main f576c72)
1 parent 7e9a927 commit d6e47ba

File tree

2 files changed

+68
-2
lines changed

2 files changed

+68
-2
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// swift-tools-version:5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33
import PackageDescription
4-
let checksum = "c12456b2f7cb0b39482e0b99cfe4b48def48d5171f3fa85deb4c02f7fba7b057"
5-
let version = "v1.0.49"
4+
let checksum = "abed4450a7a64620e3f47f926fe844c13a0197a9f0ed098d5a739804ba1c5d24"
5+
let version = "v1.0.50"
66
let url = "https://github.com/element-hq/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
77
let package = Package(
88
name: "MatrixRustSDK",

Sources/MatrixRustSDK/matrix_sdk_ffi.swift

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,28 @@ public protocol ClientProtocol : AnyObject {
624624
*/
625625
func cachedAvatarUrl() throws -> String?
626626

627+
/**
628+
* Lets the user know whether this is an `m.login.password` based
629+
* auth and if the account can actually be deactivated
630+
*/
631+
func canDeactivateAccount() -> Bool
632+
627633
func createRoom(request: CreateRoomParameters) async throws -> String
628634

635+
/**
636+
* Deactivate this account definitively.
637+
* Similarly to `encryption::reset_identity` this
638+
* will only work with password-based authentication (`m.login.password`)
639+
*
640+
* # Arguments
641+
*
642+
* * `auth_data` - This request uses the [User-Interactive Authentication
643+
* API][uiaa]. The first request needs to set this to `None` and will
644+
* always fail and the same request needs to be made but this time with
645+
* some `auth_data` provided.
646+
*/
647+
func deactivateAccount(authData: AuthData?, eraseData: Bool) async throws
648+
629649
/**
630650
* Deletes a pusher of given pusher ids
631651
*/
@@ -1033,6 +1053,17 @@ open func cachedAvatarUrl()throws -> String? {
10331053
uniffi_matrix_sdk_ffi_fn_method_client_cached_avatar_url(self.uniffiClonePointer(),$0
10341054
)
10351055
})
1056+
}
1057+
1058+
/**
1059+
* Lets the user know whether this is an `m.login.password` based
1060+
* auth and if the account can actually be deactivated
1061+
*/
1062+
open func canDeactivateAccount() -> Bool {
1063+
return try! FfiConverterBool.lift(try! rustCall() {
1064+
uniffi_matrix_sdk_ffi_fn_method_client_can_deactivate_account(self.uniffiClonePointer(),$0
1065+
)
1066+
})
10361067
}
10371068

10381069
open func createRoom(request: CreateRoomParameters)async throws -> String {
@@ -1052,6 +1083,35 @@ open func createRoom(request: CreateRoomParameters)async throws -> String {
10521083
)
10531084
}
10541085

1086+
/**
1087+
* Deactivate this account definitively.
1088+
* Similarly to `encryption::reset_identity` this
1089+
* will only work with password-based authentication (`m.login.password`)
1090+
*
1091+
* # Arguments
1092+
*
1093+
* * `auth_data` - This request uses the [User-Interactive Authentication
1094+
* API][uiaa]. The first request needs to set this to `None` and will
1095+
* always fail and the same request needs to be made but this time with
1096+
* some `auth_data` provided.
1097+
*/
1098+
open func deactivateAccount(authData: AuthData?, eraseData: Bool)async throws {
1099+
return
1100+
try await uniffiRustCallAsync(
1101+
rustFutureFunc: {
1102+
uniffi_matrix_sdk_ffi_fn_method_client_deactivate_account(
1103+
self.uniffiClonePointer(),
1104+
FfiConverterOptionTypeAuthData.lower(authData),FfiConverterBool.lower(eraseData)
1105+
)
1106+
},
1107+
pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void,
1108+
completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void,
1109+
freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void,
1110+
liftFunc: { $0 },
1111+
errorHandler: FfiConverterTypeClientError.lift
1112+
)
1113+
}
1114+
10551115
/**
10561116
* Deletes a pusher of given pusher ids
10571117
*/
@@ -27230,9 +27290,15 @@ private var initializationResult: InitializationResult = {
2723027290
if (uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url() != 58990) {
2723127291
return InitializationResult.apiChecksumMismatch
2723227292
}
27293+
if (uniffi_matrix_sdk_ffi_checksum_method_client_can_deactivate_account() != 39890) {
27294+
return InitializationResult.apiChecksumMismatch
27295+
}
2723327296
if (uniffi_matrix_sdk_ffi_checksum_method_client_create_room() != 52700) {
2723427297
return InitializationResult.apiChecksumMismatch
2723527298
}
27299+
if (uniffi_matrix_sdk_ffi_checksum_method_client_deactivate_account() != 20658) {
27300+
return InitializationResult.apiChecksumMismatch
27301+
}
2723627302
if (uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher() != 45990) {
2723727303
return InitializationResult.apiChecksumMismatch
2723827304
}

0 commit comments

Comments
 (0)