fix(request/mute): add correct body on unmute
This commit is contained in:
@@ -6,7 +6,7 @@ import org.joinmastodon.android.model.Relationship;
|
|||||||
public class SetAccountMuted extends MastodonAPIRequest<Relationship>{
|
public class SetAccountMuted extends MastodonAPIRequest<Relationship>{
|
||||||
public SetAccountMuted(String id, boolean muted, long duration){
|
public SetAccountMuted(String id, boolean muted, long duration){
|
||||||
super(HttpMethod.POST, "/accounts/"+id+"/"+(muted ? "mute" : "unmute"), Relationship.class);
|
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{
|
private static class Request{
|
||||||
|
|||||||
Reference in New Issue
Block a user