summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5c573a8)
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
type: :boolean,
description: "Receive this account's reblogs in home timeline? Defaults to true.",
default: true
type: :boolean,
description: "Receive this account's reblogs in home timeline? Defaults to true.",
default: true
+ },
+ notify: %Schema{
+ type: :boolean,
+ description:
+ "Receive notifications for all statuses posted by the account? Defaults to false.",
+ default: false
with {:ok, follower, _followed, _} <- result do
options = cast_params(params)
set_reblogs_visibility(options[:reblogs], result)
with {:ok, follower, _followed, _} <- result do
options = cast_params(params)
set_reblogs_visibility(options[:reblogs], result)
+ set_subscription(options[:notify], result)
CommonAPI.show_reblogs(follower, followed)
end
CommonAPI.show_reblogs(follower, followed)
end
+ defp set_subscription(true, {:ok, follower, followed, _}) do
+ User.subscribe(follower, followed)
+ end
+
+ defp set_subscription(_, {:ok, follower, followed, _}) do
+ User.unsubscribe(follower, followed)
+ end
+
@spec get_followers(User.t(), map()) :: list(User.t())
def get_followers(user, params \\ %{}) do
user
@spec get_followers(User.t(), map()) :: list(User.t())
def get_followers(user, params \\ %{}) do
user
exclude_visibilities: {:array, :string},
reblogs: :boolean,
with_muted: :boolean,
exclude_visibilities: {:array, :string},
reblogs: :boolean,
with_muted: :boolean,
+ account_ap_id: :string,
+ notify: :boolean
}
changeset = cast({%{}, param_types}, params, Map.keys(param_types))
}
changeset = cast({%{}, param_types}, params, Map.keys(param_types))