Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
feat: only add body for muting requests
Browse files Browse the repository at this point in the history
  • Loading branch information
FineFindus committed Jan 14, 2024
1 parent 28a811a commit 68ace0e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
public class SetAccountMuted extends MastodonAPIRequest<Relationship>{
public SetAccountMuted(String id, boolean muted, long duration, boolean muteNotifications){
super(HttpMethod.POST, "/accounts/"+id+"/"+(muted ? "mute" : "unmute"), Relationship.class);
setRequestBody(new Request(duration, muteNotifications));
if(muted)
setRequestBody(new Request(duration, muteNotifications));
}

private static class Request{
Expand Down

0 comments on commit 68ace0e

Please sign in to comment.