mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Fix regression on PushRulesApi
This commit is contained in:
parent
03f8120b7d
commit
1197d4021d
2 changed files with 5 additions and 6 deletions
|
@ -15,7 +15,6 @@
|
|||
*/
|
||||
package im.vector.matrix.android.internal.session.pushers
|
||||
|
||||
import im.vector.matrix.android.api.pushrules.RuleKind
|
||||
import im.vector.matrix.android.api.pushrules.rest.GetPushRulesResponse
|
||||
import im.vector.matrix.android.api.pushrules.rest.PushRule
|
||||
import im.vector.matrix.android.internal.network.NetworkConstants
|
||||
|
@ -38,7 +37,7 @@ internal interface PushRulesApi {
|
|||
* @param enable the new enable status
|
||||
*/
|
||||
@PUT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "pushrules/global/{kind}/{ruleId}/enabled")
|
||||
fun updateEnableRuleStatus(@Path("kind") kind: RuleKind,
|
||||
fun updateEnableRuleStatus(@Path("kind") kind: String,
|
||||
@Path("ruleId") ruleId: String,
|
||||
@Body enable: Boolean?)
|
||||
: Call<Unit>
|
||||
|
@ -52,7 +51,7 @@ internal interface PushRulesApi {
|
|||
* @param actions the actions
|
||||
*/
|
||||
@PUT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "pushrules/global/{kind}/{ruleId}/actions")
|
||||
fun updateRuleActions(@Path("kind") kind: RuleKind,
|
||||
fun updateRuleActions(@Path("kind") kind: String,
|
||||
@Path("ruleId") ruleId: String,
|
||||
@Body actions: Any)
|
||||
: Call<Unit>
|
||||
|
@ -65,7 +64,7 @@ internal interface PushRulesApi {
|
|||
* @param ruleId the ruleId
|
||||
*/
|
||||
@DELETE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "pushrules/global/{kind}/{ruleId}")
|
||||
fun deleteRule(@Path("kind") kind: RuleKind,
|
||||
fun deleteRule(@Path("kind") kind: String,
|
||||
@Path("ruleId") ruleId: String)
|
||||
: Call<Unit>
|
||||
|
||||
|
@ -77,7 +76,7 @@ internal interface PushRulesApi {
|
|||
* @param rule the rule to add.
|
||||
*/
|
||||
@PUT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "pushrules/global/{kind}/{ruleId}")
|
||||
fun addRule(@Path("kind") kind: RuleKind,
|
||||
fun addRule(@Path("kind") kind: String,
|
||||
@Path("ruleId") ruleId: String,
|
||||
@Body rule: PushRule)
|
||||
: Call<Unit>
|
||||
|
|
|
@ -33,7 +33,7 @@ internal class DefaultUpdatePushRuleEnableStatusTask @Inject constructor(private
|
|||
|
||||
override suspend fun execute(params: UpdatePushRuleEnableStatusTask.Params) {
|
||||
return executeRequest {
|
||||
apiCall = pushRulesApi.updateEnableRuleStatus(params.kind, params.pushRule.ruleId, params.enabled)
|
||||
apiCall = pushRulesApi.updateEnableRuleStatus(params.kind.value, params.pushRule.ruleId, params.enabled)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue