@@ -2519,6 +2519,10 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(
25192519
25202520
25212521
2522+
2523+
2524+
2525+
25222526
25232527
25242528
@@ -2594,6 +2598,8 @@ internal interface UniffiLib : Library {
25942598 ): Long
25952599 fun uniffi_matrix_sdk_ffi_fn_method_client_account_url(`ptr`: Pointer,`action`: RustBuffer.ByValue,
25962600 ): Long
2601+ fun uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji(`ptr`: Pointer,`emoji`: RustBuffer.ByValue,
2602+ ): Long
25972603 fun uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_versions(`ptr`: Pointer,
25982604 ): Long
25992605 fun uniffi_matrix_sdk_ffi_fn_method_client_avatar_url(`ptr`: Pointer,
@@ -2644,6 +2650,8 @@ internal interface UniffiLib : Library {
26442650 ): Long
26452651 fun uniffi_matrix_sdk_ffi_fn_method_client_get_profile(`ptr`: Pointer,`userId`: RustBuffer.ByValue,
26462652 ): Long
2653+ fun uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis(`ptr`: Pointer,
2654+ ): Long
26472655 fun uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms(`ptr`: Pointer,
26482656 ): Long
26492657 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 {
38903898 ): Short
38913899 fun uniffi_matrix_sdk_ffi_checksum_method_client_account_url(
38923900 ): Short
3901+ fun uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji(
3902+ ): Short
38933903 fun uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions(
38943904 ): Short
38953905 fun uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url(
@@ -3940,6 +3950,8 @@ internal interface UniffiLib : Library {
39403950 ): Short
39413951 fun uniffi_matrix_sdk_ffi_checksum_method_client_get_profile(
39423952 ): Short
3953+ fun uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis(
3954+ ): Short
39433955 fun uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms(
39443956 ): Short
39453957 fun uniffi_matrix_sdk_ffi_checksum_method_client_get_room(
@@ -4917,6 +4929,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
49174929 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_account_url() != 42373.toShort()) {
49184930 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
49194931 }
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+ }
49204935 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions() != 35296.toShort()) {
49214936 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
49224937 }
@@ -4992,6 +5007,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
49925007 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_profile() != 60062.toShort()) {
49935008 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
49945009 }
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+ }
49955013 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms() != 22399.toShort()) {
49965014 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
49975015 }
@@ -6090,7 +6108,7 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
60906108 if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status() != 46161.toShort()) {
60916109 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
60926110 }
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()) {
60946112 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
60956113 }
60966114 if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event() != 52414.toShort()) {
@@ -6830,6 +6848,12 @@ public interface ClientInterface {
68306848
68316849 suspend fun `accountUrl`(`action`: AccountManagementAction?): kotlin.String?
68326850
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+
68336857 /**
68346858 * Find all sliding sync versions that are available.
68356859 *
@@ -6984,6 +7008,12 @@ public interface ClientInterface {
69847008
69857009 suspend fun `getProfile`(`userId`: kotlin.String): UserProfile
69867010
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+
69877017 suspend fun `getRecentlyVisitedRooms`(): List<kotlin.String>
69887018
69897019 /**
@@ -7507,6 +7537,32 @@ open class Client: Disposable, AutoCloseable, ClientInterface {
75077537 }
75087538
75097539
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+
75107566 /**
75117567 * Find all sliding sync versions that are available.
75127568 *
@@ -8094,6 +8150,31 @@ open class Client: Disposable, AutoCloseable, ClientInterface {
80948150 }
80958151
80968152
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+
80978178 @Throws(ClientException::class)
80988179 @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
80998180 override suspend fun `getRecentlyVisitedRooms`() : List<kotlin.String> {
@@ -24733,8 +24814,10 @@ public interface TimelineInterface {
2473324814 *
2473424815 * Ensures that only one reaction is sent at a time to avoid race
2473524816 * conditions and spamming the homeserver with requests.
24817+ *
24818+ * Returns `true` if the reaction was added, `false` if it was removed.
2473624819 */
24737- suspend fun `toggleReaction`(`itemId`: EventOrTransactionId, `key`: kotlin.String)
24820+ suspend fun `toggleReaction`(`itemId`: EventOrTransactionId, `key`: kotlin.String): kotlin.Boolean
2473824821
2473924822 /**
2474024823 * Adds a new pinned event by sending an updated `m.room.pinned_events`
@@ -25427,23 +25510,24 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface {
2542725510 *
2542825511 * Ensures that only one reaction is sent at a time to avoid race
2542925512 * conditions and spamming the homeserver with requests.
25513+ *
25514+ * Returns `true` if the reaction was added, `false` if it was removed.
2543025515 */
2543125516 @Throws(ClientException::class)
2543225517 @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 {
2543425519 return uniffiRustCallAsync(
2543525520 callWithPointer { thisPtr ->
2543625521 UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_toggle_reaction(
2543725522 thisPtr,
2543825523 FfiConverterTypeEventOrTransactionId.lower(`itemId`),FfiConverterString.lower(`key`),
2543925524 )
2544025525 },
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) },
2544425529 // lift function
25445- { Unit },
25446-
25530+ { FfiConverterBoolean.lift(it) },
2544725531 // Error FFI converter
2544825532 ClientException.ErrorHandler,
2544925533 )
@@ -29806,6 +29890,44 @@ public object FfiConverterTypeReceipt: FfiConverterRustBuffer<Receipt> {
2980629890
2980729891
2980829892
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+
2980929931/**
2981029932 * The config to use for HTTP requests by default in this client.
2981129933 */
@@ -49080,6 +49202,31 @@ public object FfiConverterSequenceTypeReactionSenderData: FfiConverterRustBuffer
4908049202
4908149203
4908249204
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+
4908349230public object FfiConverterSequenceTypeRoomDescription: FfiConverterRustBuffer<List<RoomDescription>> {
4908449231 override fun read(buf: ByteBuffer): List<RoomDescription> {
4908549232 val len = buf.getInt()
0 commit comments