Skip to content

Commit

Permalink
refactor: only add body for muting requests
Browse files Browse the repository at this point in the history
  • Loading branch information
FineFindus committed Apr 2, 2024
1 parent 56540d7 commit 18f8c1d
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){
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{
Expand Down

0 comments on commit 18f8c1d

Please sign in to comment.