WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit c786b3f

Browse files
author
github-actions
committed
Bump SDK version to 25.12.4 (matrix-rust-sdk to bfd8cfa1c8da74bedf3a651ec719d5464cab1485)
1 parent 5bfecde commit c786b3f

File tree

7 files changed

+2852
-1930
lines changed

7 files changed

+2852
-1930
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
object BuildVersionsSDK {
22
const val majorVersion = 25
33
const val minorVersion = 12
4-
const val patchVersion = 2
4+
const val patchVersion = 4
55
}

sdk/sdk-android/src/main/kotlin/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt

Lines changed: 2731 additions & 1913 deletions
Large diffs are not rendered by default.

sdk/sdk-android/src/main/kotlin/uniffi/matrix_sdk/matrix_sdk.kt

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,9 @@ internal inline fun<T> uniffiTraitInterfaceCall(
282282
try {
283283
writeReturn(makeCall())
284284
} catch(e: kotlin.Exception) {
285+
val err = try { e.stackTraceToString() } catch(_: Throwable) { "" }
285286
callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR
286-
callStatus.error_buf = FfiConverterString.lower(e.toString())
287+
callStatus.error_buf = FfiConverterString.lower(err)
287288
}
288289
}
289290

@@ -300,8 +301,9 @@ internal inline fun<T, reified E: Throwable> uniffiTraitInterfaceCallWithError(
300301
callStatus.code = UNIFFI_CALL_ERROR
301302
callStatus.error_buf = lowerError(e)
302303
} else {
304+
val err = try { e.stackTraceToString() } catch(_: Throwable) { "" }
303305
callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR
304-
callStatus.error_buf = FfiConverterString.lower(e.toString())
306+
callStatus.error_buf = FfiConverterString.lower(err)
305307
}
306308
}
307309
}
@@ -779,7 +781,7 @@ private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) {
779781
}
780782
@Suppress("UNUSED_PARAMETER")
781783
private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
782-
if (lib.uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url() != 25566.toShort()) {
784+
if (lib.uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url() != 47865.toShort()) {
783785
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
784786
}
785787
}
@@ -1161,7 +1163,6 @@ public object FfiConverterString: FfiConverter<String, RustBuffer.ByValue> {
11611163
//
11621164

11631165

1164-
//
11651166
/**
11661167
* The data needed to perform authorization using OAuth 2.0.
11671168
*/
@@ -1200,11 +1201,11 @@ open class OAuthAuthorizationData: Disposable, AutoCloseable, OAuthAuthorization
12001201
@Suppress("UNUSED_PARAMETER")
12011202
constructor(noHandle: NoHandle) {
12021203
this.handle = 0
1203-
this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle))
1204+
this.cleanable = null
12041205
}
12051206

12061207
protected val handle: Long
1207-
protected val cleanable: UniffiCleaner.Cleanable
1208+
protected val cleanable: UniffiCleaner.Cleanable?
12081209

12091210
private val wasDestroyed = AtomicBoolean(false)
12101211
private val callCounter = AtomicLong(1)
@@ -1215,7 +1216,7 @@ open class OAuthAuthorizationData: Disposable, AutoCloseable, OAuthAuthorization
12151216
if (this.wasDestroyed.compareAndSet(false, true)) {
12161217
// This decrement always matches the initial count of 1 given at creation time.
12171218
if (this.callCounter.decrementAndGet() == 0L) {
1218-
cleanable.clean()
1219+
cleanable?.clean()
12191220
}
12201221
}
12211222
}
@@ -1243,7 +1244,7 @@ open class OAuthAuthorizationData: Disposable, AutoCloseable, OAuthAuthorization
12431244
} finally {
12441245
// This decrement always matches the increment we performed above.
12451246
if (this.callCounter.decrementAndGet() == 0L) {
1246-
cleanable.clean()
1247+
cleanable?.clean()
12471248
}
12481249
}
12491250
}
@@ -1395,6 +1396,8 @@ data class RoomPowerLevelChanges (
13951396

13961397

13971398

1399+
1400+
13981401
companion object
13991402
}
14001403

@@ -1467,6 +1470,8 @@ data class ServerVendorInfo (
14671470

14681471

14691472

1473+
1474+
14701475
companion object
14711476
}
14721477

@@ -1577,6 +1582,8 @@ data class VirtualElementCallWidgetConfig (
15771582

15781583

15791584

1585+
1586+
15801587
companion object
15811588
}
15821589

@@ -1723,6 +1730,8 @@ data class VirtualElementCallWidgetProperties (
17231730

17241731

17251732

1733+
1734+
17261735
companion object
17271736
}
17281737

@@ -1810,6 +1819,10 @@ enum class BackupDownloadStrategy {
18101819
* This is the default option.
18111820
*/
18121821
MANUAL;
1822+
1823+
1824+
1825+
18131826
companion object
18141827
}
18151828

@@ -1874,6 +1887,11 @@ sealed class EncryptionSystem {
18741887

18751888

18761889

1890+
1891+
1892+
1893+
1894+
18771895
companion object
18781896
}
18791897

@@ -1955,6 +1973,10 @@ enum class HeaderStyle {
19551973
* No Header (useful for webapps).
19561974
*/
19571975
NONE;
1976+
1977+
1978+
1979+
19581980
companion object
19591981
}
19601982

@@ -2005,6 +2027,10 @@ enum class Intent {
20052027
* The user wants to start a call in a "Direct Message" (DM) room.
20062028
*/
20072029
START_CALL_DM;
2030+
2031+
2032+
2033+
20082034
companion object
20092035
}
20102036

@@ -2044,6 +2070,10 @@ enum class NotificationType {
20442070
* The receiving client should ring with an audible sound.
20452071
*/
20462072
RING;
2073+
2074+
2075+
2076+
20472077
companion object
20482078
}
20492079

@@ -2092,6 +2122,10 @@ enum class PaginatorState {
20922122
* The paginator is… paginating one direction or another.
20932123
*/
20942124
PAGINATING;
2125+
2126+
2127+
2128+
20952129
companion object
20962130
}
20972131

@@ -2303,6 +2337,10 @@ enum class RoomMemberRole {
23032337
* The member is a regular user.
23042338
*/
23052339
USER;
2340+
2341+
2342+
2343+
23062344
companion object
23072345
}
23082346

@@ -2357,6 +2395,11 @@ sealed class RoomPaginationStatus {
23572395

23582396

23592397

2398+
2399+
2400+
2401+
2402+
23602403
companion object
23612404
}
23622405

sdk/sdk-android/src/main/kotlin/uniffi/matrix_sdk_base/matrix_sdk_base.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,9 @@ internal inline fun<T> uniffiTraitInterfaceCall(
281281
try {
282282
writeReturn(makeCall())
283283
} catch(e: kotlin.Exception) {
284+
val err = try { e.stackTraceToString() } catch(_: Throwable) { "" }
284285
callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR
285-
callStatus.error_buf = FfiConverterString.lower(e.toString())
286+
callStatus.error_buf = FfiConverterString.lower(err)
286287
}
287288
}
288289

@@ -299,8 +300,9 @@ internal inline fun<T, reified E: Throwable> uniffiTraitInterfaceCallWithError(
299300
callStatus.code = UNIFFI_CALL_ERROR
300301
callStatus.error_buf = lowerError(e)
301302
} else {
303+
val err = try { e.stackTraceToString() } catch(_: Throwable) { "" }
302304
callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR
303-
callStatus.error_buf = FfiConverterString.lower(e.toString())
305+
callStatus.error_buf = FfiConverterString.lower(err)
304306
}
305307
}
306308
}
@@ -1051,6 +1053,8 @@ data class MediaRetentionPolicy (
10511053

10521054

10531055

1056+
1057+
10541058
companion object
10551059
}
10561060

@@ -1103,6 +1107,10 @@ enum class EncryptionState {
11031107
* `/sync` did not provide all data needed to decide.
11041108
*/
11051109
UNKNOWN;
1110+
1111+
1112+
1113+
11061114
companion object
11071115
}
11081116

sdk/sdk-android/src/main/kotlin/uniffi/matrix_sdk_common/matrix_sdk_common.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,9 @@ internal inline fun<T> uniffiTraitInterfaceCall(
281281
try {
282282
writeReturn(makeCall())
283283
} catch(e: kotlin.Exception) {
284+
val err = try { e.stackTraceToString() } catch(_: Throwable) { "" }
284285
callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR
285-
callStatus.error_buf = FfiConverterString.lower(e.toString())
286+
callStatus.error_buf = FfiConverterString.lower(err)
286287
}
287288
}
288289

@@ -299,8 +300,9 @@ internal inline fun<T, reified E: Throwable> uniffiTraitInterfaceCallWithError(
299300
callStatus.code = UNIFFI_CALL_ERROR
300301
callStatus.error_buf = lowerError(e)
301302
} else {
303+
val err = try { e.stackTraceToString() } catch(_: Throwable) { "" }
302304
callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR
303-
callStatus.error_buf = FfiConverterString.lower(e.toString())
305+
callStatus.error_buf = FfiConverterString.lower(err)
304306
}
305307
}
306308
}
@@ -952,6 +954,10 @@ enum class ShieldStateCode {
952954
* that established the Megolm session.
953955
*/
954956
MISMATCHED_SENDER;
957+
958+
959+
960+
955961
companion object
956962
}
957963

sdk/sdk-android/src/main/kotlin/uniffi/matrix_sdk_crypto/matrix_sdk_crypto.kt

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,9 @@ internal inline fun<T> uniffiTraitInterfaceCall(
281281
try {
282282
writeReturn(makeCall())
283283
} catch(e: kotlin.Exception) {
284+
val err = try { e.stackTraceToString() } catch(_: Throwable) { "" }
284285
callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR
285-
callStatus.error_buf = FfiConverterString.lower(e.toString())
286+
callStatus.error_buf = FfiConverterString.lower(err)
286287
}
287288
}
288289

@@ -299,8 +300,9 @@ internal inline fun<T, reified E: Throwable> uniffiTraitInterfaceCallWithError(
299300
callStatus.code = UNIFFI_CALL_ERROR
300301
callStatus.error_buf = lowerError(e)
301302
} else {
303+
val err = try { e.stackTraceToString() } catch(_: Throwable) { "" }
302304
callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR
303-
callStatus.error_buf = FfiConverterString.lower(e.toString())
305+
callStatus.error_buf = FfiConverterString.lower(err)
304306
}
305307
}
306308
}
@@ -932,6 +934,8 @@ data class DecryptionSettings (
932934

933935

934936

937+
938+
935939
companion object
936940
}
937941

@@ -1000,6 +1004,10 @@ enum class CollectStrategy {
10001004
* - It is the current own device of the user.
10011005
*/
10021006
ONLY_TRUSTED_DEVICES;
1007+
1008+
1009+
1010+
10031011
companion object
10041012
}
10051013

@@ -1056,6 +1064,10 @@ enum class IdentityState {
10561064
* [`UserIdentity::withdraw_verification`] to make it pinned.
10571065
*/
10581066
VERIFICATION_VIOLATION;
1067+
1068+
1069+
1070+
10591071
companion object
10601072
}
10611073

@@ -1103,6 +1115,10 @@ enum class LocalTrust {
11031115
* The trust state is unset.
11041116
*/
11051117
UNSET;
1118+
1119+
1120+
1121+
11061122
companion object
11071123
}
11081124

@@ -1262,6 +1278,10 @@ enum class SignatureState {
12621278
* signature is trusted.
12631279
*/
12641280
VALID_AND_TRUSTED;
1281+
1282+
1283+
1284+
12651285
companion object
12661286
}
12671287

@@ -1307,6 +1327,10 @@ enum class TrustRequirement {
13071327
* Only decrypt events from cross-signed devices.
13081328
*/
13091329
CROSS_SIGNED;
1330+
1331+
1332+
1333+
13101334
companion object
13111335
}
13121336

@@ -1420,6 +1444,10 @@ enum class UtdCause {
14201444
* Expected message to user: "You need to verify this device".
14211445
*/
14221446
HISTORICAL_MESSAGE_AND_DEVICE_IS_UNVERIFIED;
1447+
1448+
1449+
1450+
14231451
companion object
14241452
}
14251453

0 commit comments

Comments
 (0)