refactor: only add body for muting requests
This commit is contained in:
parent
56540d7e7b
commit
18f8c1d29e
|
@ -6,7 +6,8 @@ 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));
|
||||
if(muted)
|
||||
setRequestBody(new Request(duration, muteNotifications));
|
||||
}
|
||||
|
||||
private static class Request{
|
||||
|
|
Loading…
Reference in New Issue