mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 09:25:49 +03:00
Add api functions to delete account data.
This commit is contained in:
parent
6c94f1cd52
commit
d244f7324c
2 changed files with 26 additions and 0 deletions
|
@ -427,6 +427,19 @@ internal interface RoomAPI {
|
|||
@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.
|
||||
* Errors:
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.matrix.android.sdk.internal.session.user.accountdata
|
|||
|
||||
import org.matrix.android.sdk.internal.network.NetworkConstants
|
||||
import retrofit2.http.Body
|
||||
import retrofit2.http.DELETE
|
||||
import retrofit2.http.PUT
|
||||
import retrofit2.http.Path
|
||||
|
||||
|
@ -36,4 +37,16 @@ internal interface AccountDataAPI {
|
|||
@Path("type") type: String,
|
||||
@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 a new issue