Add api functions to delete account data.
This commit is contained in:
parent
6c94f1cd52
commit
d244f7324c
|
@ -427,6 +427,19 @@ internal interface RoomAPI {
|
||||||
@Body content: JsonDict
|
@Body content: JsonDict
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove an account_data event from the room.
|
||||||
|
* @param userId the user id
|
||||||
|
* @param roomId the room id
|
||||||
|
* @param type the type
|
||||||
|
*/
|
||||||
|
@DELETE(NetworkConstants.URI_API_PREFIX_PATH_MEDIA_PROXY_UNSTABLE + "org.matrix.msc3391/user/{userId}/rooms/{roomId}/account_data/{type}")
|
||||||
|
suspend fun deleteRoomAccountData(
|
||||||
|
@Path("userId") userId: String,
|
||||||
|
@Path("roomId") roomId: String,
|
||||||
|
@Path("type") type: String
|
||||||
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Upgrades the given room to a particular room version.
|
* Upgrades the given room to a particular room version.
|
||||||
* Errors:
|
* Errors:
|
||||||
|
|
|
@ -18,6 +18,7 @@ package org.matrix.android.sdk.internal.session.user.accountdata
|
||||||
|
|
||||||
import org.matrix.android.sdk.internal.network.NetworkConstants
|
import org.matrix.android.sdk.internal.network.NetworkConstants
|
||||||
import retrofit2.http.Body
|
import retrofit2.http.Body
|
||||||
|
import retrofit2.http.DELETE
|
||||||
import retrofit2.http.PUT
|
import retrofit2.http.PUT
|
||||||
import retrofit2.http.Path
|
import retrofit2.http.Path
|
||||||
|
|
||||||
|
@ -36,4 +37,16 @@ internal interface AccountDataAPI {
|
||||||
@Path("type") type: String,
|
@Path("type") type: String,
|
||||||
@Body params: Any
|
@Body params: Any
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove an account_data for the client.
|
||||||
|
*
|
||||||
|
* @param userId the user id
|
||||||
|
* @param type the type
|
||||||
|
*/
|
||||||
|
@DELETE(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "org.matrix.msc3391/user/{userId}/account_data/{type}")
|
||||||
|
suspend fun deleteAccountData(
|
||||||
|
@Path("userId") userId: String,
|
||||||
|
@Path("type") type: String
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue