fix(request/mute): add correct body on unmute

This commit is contained in:
FineFindus 2023-03-06 22:00:49 +01:00
parent 3619be71ab
commit 4152179dea
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import org.joinmastodon.android.model.Relationship;
public class SetAccountMuted extends MastodonAPIRequest<Relationship>{
public SetAccountMuted(String id, boolean muted, long duration){
super(HttpMethod.POST, "/accounts/"+id+"/"+(muted ? "mute" : "unmute"), Relationship.class);
setRequestBody(new Request(duration));
setRequestBody(muted ? new Request(duration): new Object());
}
private static class Request{