@@ -2519,6 +2519,10 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(
2519
2519
2520
2520
2521
2521
2522
+
2523
+
2524
+
2525
+
2522
2526
2523
2527
2524
2528
@@ -2594,6 +2598,8 @@ internal interface UniffiLib : Library {
2594
2598
): Long
2595
2599
fun uniffi_matrix_sdk_ffi_fn_method_client_account_url(`ptr`: Pointer,`action`: RustBuffer.ByValue,
2596
2600
): Long
2601
+ fun uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji(`ptr`: Pointer,`emoji`: RustBuffer.ByValue,
2602
+ ): Long
2597
2603
fun uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_versions(`ptr`: Pointer,
2598
2604
): Long
2599
2605
fun uniffi_matrix_sdk_ffi_fn_method_client_avatar_url(`ptr`: Pointer,
@@ -2644,6 +2650,8 @@ internal interface UniffiLib : Library {
2644
2650
): Long
2645
2651
fun uniffi_matrix_sdk_ffi_fn_method_client_get_profile(`ptr`: Pointer,`userId`: RustBuffer.ByValue,
2646
2652
): Long
2653
+ fun uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis(`ptr`: Pointer,
2654
+ ): Long
2647
2655
fun uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms(`ptr`: Pointer,
2648
2656
): Long
2649
2657
fun uniffi_matrix_sdk_ffi_fn_method_client_get_room(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
@@ -3890,6 +3898,8 @@ internal interface UniffiLib : Library {
3890
3898
): Short
3891
3899
fun uniffi_matrix_sdk_ffi_checksum_method_client_account_url(
3892
3900
): Short
3901
+ fun uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji(
3902
+ ): Short
3893
3903
fun uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions(
3894
3904
): Short
3895
3905
fun uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url(
@@ -3940,6 +3950,8 @@ internal interface UniffiLib : Library {
3940
3950
): Short
3941
3951
fun uniffi_matrix_sdk_ffi_checksum_method_client_get_profile(
3942
3952
): Short
3953
+ fun uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis(
3954
+ ): Short
3943
3955
fun uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms(
3944
3956
): Short
3945
3957
fun uniffi_matrix_sdk_ffi_checksum_method_client_get_room(
@@ -4917,6 +4929,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
4917
4929
if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_account_url() != 42373.toShort()) {
4918
4930
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4919
4931
}
4932
+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji() != 29688.toShort()) {
4933
+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4934
+ }
4920
4935
if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions() != 35296.toShort()) {
4921
4936
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4922
4937
}
@@ -4992,6 +5007,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
4992
5007
if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_profile() != 60062.toShort()) {
4993
5008
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4994
5009
}
5010
+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis() != 64362.toShort()) {
5011
+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
5012
+ }
4995
5013
if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms() != 22399.toShort()) {
4996
5014
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4997
5015
}
@@ -6090,7 +6108,7 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
6090
6108
if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status() != 46161.toShort()) {
6091
6109
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
6092
6110
}
6093
- if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction() != 29303 .toShort()) {
6111
+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction() != 13555 .toShort()) {
6094
6112
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
6095
6113
}
6096
6114
if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event() != 52414.toShort()) {
@@ -6830,6 +6848,12 @@ public interface ClientInterface {
6830
6848
6831
6849
suspend fun `accountUrl`(`action`: AccountManagementAction?): kotlin.String?
6832
6850
6851
+ /**
6852
+ * Adds a recently used emoji to the list and uploads the updated
6853
+ * `io.element.recent_emoji` content to the global account data.
6854
+ */
6855
+ suspend fun `addRecentEmoji`(`emoji`: kotlin.String)
6856
+
6833
6857
/**
6834
6858
* Find all sliding sync versions that are available.
6835
6859
*
@@ -6984,6 +7008,12 @@ public interface ClientInterface {
6984
7008
6985
7009
suspend fun `getProfile`(`userId`: kotlin.String): UserProfile
6986
7010
7011
+ /**
7012
+ * Gets the list of recently used emojis from the `io.element.recent_emoji`
7013
+ * global account data.
7014
+ */
7015
+ suspend fun `getRecentEmojis`(): List<RecentEmoji>
7016
+
6987
7017
suspend fun `getRecentlyVisitedRooms`(): List<kotlin.String>
6988
7018
6989
7019
/**
@@ -7507,6 +7537,32 @@ open class Client: Disposable, AutoCloseable, ClientInterface {
7507
7537
}
7508
7538
7509
7539
7540
+ /**
7541
+ * Adds a recently used emoji to the list and uploads the updated
7542
+ * `io.element.recent_emoji` content to the global account data.
7543
+ */
7544
+ @Throws(ClientException::class)
7545
+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
7546
+ override suspend fun `addRecentEmoji`(`emoji`: kotlin.String) {
7547
+ return uniffiRustCallAsync(
7548
+ callWithPointer { thisPtr ->
7549
+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji(
7550
+ thisPtr,
7551
+ FfiConverterString.lower(`emoji`),
7552
+ )
7553
+ },
7554
+ { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) },
7555
+ { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) },
7556
+ { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) },
7557
+ // lift function
7558
+ { Unit },
7559
+
7560
+ // Error FFI converter
7561
+ ClientException.ErrorHandler,
7562
+ )
7563
+ }
7564
+
7565
+
7510
7566
/**
7511
7567
* Find all sliding sync versions that are available.
7512
7568
*
@@ -8094,6 +8150,31 @@ open class Client: Disposable, AutoCloseable, ClientInterface {
8094
8150
}
8095
8151
8096
8152
8153
+ /**
8154
+ * Gets the list of recently used emojis from the `io.element.recent_emoji`
8155
+ * global account data.
8156
+ */
8157
+ @Throws(ClientException::class)
8158
+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
8159
+ override suspend fun `getRecentEmojis`() : List<RecentEmoji> {
8160
+ return uniffiRustCallAsync(
8161
+ callWithPointer { thisPtr ->
8162
+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis(
8163
+ thisPtr,
8164
+
8165
+ )
8166
+ },
8167
+ { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) },
8168
+ { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) },
8169
+ { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) },
8170
+ // lift function
8171
+ { FfiConverterSequenceTypeRecentEmoji.lift(it) },
8172
+ // Error FFI converter
8173
+ ClientException.ErrorHandler,
8174
+ )
8175
+ }
8176
+
8177
+
8097
8178
@Throws(ClientException::class)
8098
8179
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
8099
8180
override suspend fun `getRecentlyVisitedRooms`() : List<kotlin.String> {
@@ -24733,8 +24814,10 @@ public interface TimelineInterface {
24733
24814
*
24734
24815
* Ensures that only one reaction is sent at a time to avoid race
24735
24816
* conditions and spamming the homeserver with requests.
24817
+ *
24818
+ * Returns `true` if the reaction was added, `false` if it was removed.
24736
24819
*/
24737
- suspend fun `toggleReaction`(`itemId`: EventOrTransactionId, `key`: kotlin.String)
24820
+ suspend fun `toggleReaction`(`itemId`: EventOrTransactionId, `key`: kotlin.String): kotlin.Boolean
24738
24821
24739
24822
/**
24740
24823
* Adds a new pinned event by sending an updated `m.room.pinned_events`
@@ -25427,23 +25510,24 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface {
25427
25510
*
25428
25511
* Ensures that only one reaction is sent at a time to avoid race
25429
25512
* conditions and spamming the homeserver with requests.
25513
+ *
25514
+ * Returns `true` if the reaction was added, `false` if it was removed.
25430
25515
*/
25431
25516
@Throws(ClientException::class)
25432
25517
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
25433
- override suspend fun `toggleReaction`(`itemId`: EventOrTransactionId, `key`: kotlin.String) {
25518
+ override suspend fun `toggleReaction`(`itemId`: EventOrTransactionId, `key`: kotlin.String) : kotlin.Boolean {
25434
25519
return uniffiRustCallAsync(
25435
25520
callWithPointer { thisPtr ->
25436
25521
UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_toggle_reaction(
25437
25522
thisPtr,
25438
25523
FfiConverterTypeEventOrTransactionId.lower(`itemId`),FfiConverterString.lower(`key`),
25439
25524
)
25440
25525
},
25441
- { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void (future, callback, continuation) },
25442
- { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void (future, continuation) },
25443
- { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void (future) },
25526
+ { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_i8 (future, callback, continuation) },
25527
+ { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_i8 (future, continuation) },
25528
+ { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_i8 (future) },
25444
25529
// lift function
25445
- { Unit },
25446
-
25530
+ { FfiConverterBoolean.lift(it) },
25447
25531
// Error FFI converter
25448
25532
ClientException.ErrorHandler,
25449
25533
)
@@ -29806,6 +29890,44 @@ public object FfiConverterTypeReceipt: FfiConverterRustBuffer<Receipt> {
29806
29890
29807
29891
29808
29892
29893
+ /**
29894
+ * Represents an emoji recently used for reactions.
29895
+ */
29896
+ data class RecentEmoji (
29897
+ /**
29898
+ * The actual emoji text representation.
29899
+ */
29900
+ var `emoji`: kotlin.String,
29901
+ /**
29902
+ * The number of times this emoji has been used for reactions.
29903
+ */
29904
+ var `count`: kotlin.ULong
29905
+ ) {
29906
+
29907
+ companion object
29908
+ }
29909
+
29910
+ public object FfiConverterTypeRecentEmoji: FfiConverterRustBuffer<RecentEmoji> {
29911
+ override fun read(buf: ByteBuffer): RecentEmoji {
29912
+ return RecentEmoji(
29913
+ FfiConverterString.read(buf),
29914
+ FfiConverterULong.read(buf),
29915
+ )
29916
+ }
29917
+
29918
+ override fun allocationSize(value: RecentEmoji) = (
29919
+ FfiConverterString.allocationSize(value.`emoji`) +
29920
+ FfiConverterULong.allocationSize(value.`count`)
29921
+ )
29922
+
29923
+ override fun write(value: RecentEmoji, buf: ByteBuffer) {
29924
+ FfiConverterString.write(value.`emoji`, buf)
29925
+ FfiConverterULong.write(value.`count`, buf)
29926
+ }
29927
+ }
29928
+
29929
+
29930
+
29809
29931
/**
29810
29932
* The config to use for HTTP requests by default in this client.
29811
29933
*/
@@ -49080,6 +49202,31 @@ public object FfiConverterSequenceTypeReactionSenderData: FfiConverterRustBuffer
49080
49202
49081
49203
49082
49204
49205
+ public object FfiConverterSequenceTypeRecentEmoji: FfiConverterRustBuffer<List<RecentEmoji>> {
49206
+ override fun read(buf: ByteBuffer): List<RecentEmoji> {
49207
+ val len = buf.getInt()
49208
+ return List<RecentEmoji>(len) {
49209
+ FfiConverterTypeRecentEmoji.read(buf)
49210
+ }
49211
+ }
49212
+
49213
+ override fun allocationSize(value: List<RecentEmoji>): ULong {
49214
+ val sizeForLength = 4UL
49215
+ val sizeForItems = value.map { FfiConverterTypeRecentEmoji.allocationSize(it) }.sum()
49216
+ return sizeForLength + sizeForItems
49217
+ }
49218
+
49219
+ override fun write(value: List<RecentEmoji>, buf: ByteBuffer) {
49220
+ buf.putInt(value.size)
49221
+ value.iterator().forEach {
49222
+ FfiConverterTypeRecentEmoji.write(it, buf)
49223
+ }
49224
+ }
49225
+ }
49226
+
49227
+
49228
+
49229
+
49083
49230
public object FfiConverterSequenceTypeRoomDescription: FfiConverterRustBuffer<List<RoomDescription>> {
49084
49231
override fun read(buf: ByteBuffer): List<RoomDescription> {
49085
49232
val len = buf.getInt()
0 commit comments