rust sdk : handle api breaks for 0.2.59

This commit is contained in:
ganfra 2024-11-06 15:31:22 +01:00
parent d68afd2cbe
commit cc4a8d47eb
12 changed files with 55 additions and 24 deletions

View file

@ -108,7 +108,14 @@ interface MatrixClient : Closeable {
suspend fun trackRecentlyVisitedRoom(roomId: RoomId): Result<Unit>
suspend fun getRecentlyVisitedRooms(): Result<List<RoomId>>
suspend fun resolveRoomAlias(roomAlias: RoomAlias): Result<ResolvedRoomAlias>
/**
* Resolves the given room alias to a roomID (and a list of servers), if possible.
* @param roomAlias the room alias to resolve
* @return the resolved room alias if any, an empty result if not found,or an error if the resolution failed.
*
*/
suspend fun resolveRoomAlias(roomAlias: RoomAlias): Result<Optional<ResolvedRoomAlias>>
/**
* Enables or disables the sending queue, according to the given parameter.

View file

@ -10,8 +10,22 @@ package io.element.android.libraries.matrix.api.roomdirectory
import kotlinx.coroutines.flow.Flow
interface RoomDirectoryList {
suspend fun filter(filter: String?, batchSize: Int): Result<Unit>
/**
* Starts a filtered search for the server.
* If the filter is not provided it will search for all the rooms. You can specify a batch_size to control the number of rooms to fetch per request.
* If the via_server is not provided it will search in the current homeserver by default.
* This method will clear the current search results and start a new one
*/
suspend fun filter(filter: String?, batchSize: Int, viaServerName: String?): Result<Unit>
/**
* Load more rooms from the current search results.
*/
suspend fun loadMore(): Result<Unit>
/**
* The current search results as a state flow.
*/
val state: Flow<State>
data class State(