diff --git a/Mastonet/IMastodonClient.cs b/Mastonet/IMastodonClient.cs index ab292fe..f4116b1 100644 --- a/Mastonet/IMastodonClient.cs +++ b/Mastonet/IMastodonClient.cs @@ -478,7 +478,7 @@ Task UpdateCredentials(bool? discoverable = null, /// /// Whether the followed account’s reblogs will show up in the home timeline /// Returns the target Account - Task Follow(string accountId, bool reblogs = true); + Task Follow(string accountId, bool reblogs = true, bool notify = false); /// /// Unfollowing an account diff --git a/Mastonet/MastodonClient.AccountActions.cs b/Mastonet/MastodonClient.AccountActions.cs index f4c297d..2030d4e 100644 --- a/Mastonet/MastodonClient.AccountActions.cs +++ b/Mastonet/MastodonClient.AccountActions.cs @@ -19,9 +19,13 @@ partial class MastodonClient /// /// Whether the followed account’s reblogs will show up in the home timeline /// Returns the target Account - public Task Follow(string accountId, bool reblogs = true) + public Task Follow(string accountId, bool reblogs = true, bool notify = false) { - var data = reblogs ? null : Enumerable.Repeat(new KeyValuePair("reblogs", "false"), 1); + var data = new List>() + { + new KeyValuePair("reblogs", reblogs.ToString()), + new KeyValuePair("notify", notify.ToString().ToLowerInvariant()) + }; return this.Post($"/api/v1/accounts/{accountId}/follow", data); }