sensitive: false,
pleroma: %{
actor_type: "Person",
- is_discoverable: true
+ discoverable: true
},
fields: []
},
sensitive: false,
pleroma: %{
actor_type: "Service",
- is_discoverable: true
+ discoverable: true
},
fields: []
},
user = insert(:user)
other_user = insert(:user)
- {:ok, user} = User.follow(user, other_user)
- {:ok, other_user} = User.follow(other_user, user)
+ {:ok, user, other_user} = User.follow(user, other_user)
+ {:ok, other_user, user} = User.follow(other_user, user)
{:ok, _subscription} = User.subscribe(user, other_user)
- {:ok, _user_relationships} = User.mute(user, other_user, true)
+ {:ok, _user_relationships} = User.mute(user, other_user, %{notifications: true})
{:ok, _reblog_mute} = CommonAPI.hide_reblogs(user, other_user)
expected =
user = insert(:user)
other_user = insert(:user)
- {:ok, user} = User.follow(user, other_user)
+ {:ok, user, other_user} = User.follow(user, other_user)
{:ok, _subscription} = User.subscribe(user, other_user)
{:ok, _user_relationship} = User.block(user, other_user)
{:ok, _user_relationship} = User.block(other_user, user)
test "represent a relationship for the user with a pending follow request" do
user = insert(:user)
- other_user = insert(:user, locked: true)
+ other_user = insert(:user, is_locked: true)
{:ok, user, other_user, _} = CommonAPI.follow(user, other_user)
user = User.get_cached_by_id(user.id)
end
test "shows non-zero when follow requests are pending" do
- user = insert(:user, locked: true)
+ user = insert(:user, is_locked: true)
assert %{locked: true} = AccountView.render("show.json", %{user: user, for: user})
end
test "decreases when accepting a follow request" do
- user = insert(:user, locked: true)
+ user = insert(:user, is_locked: true)
assert %{locked: true} = AccountView.render("show.json", %{user: user, for: user})
end
test "decreases when rejecting a follow request" do
- user = insert(:user, locked: true)
+ user = insert(:user, is_locked: true)
assert %{locked: true} = AccountView.render("show.json", %{user: user, for: user})
end
test "shows non-zero when historical unapproved requests are present" do
- user = insert(:user, locked: true)
+ user = insert(:user, is_locked: true)
assert %{locked: true} = AccountView.render("show.json", %{user: user, for: user})
other_user = insert(:user)
{:ok, _other_user, user, _activity} = CommonAPI.follow(other_user, user)
- {:ok, user} = User.update_and_set_cache(user, %{locked: false})
+ {:ok, user} = User.update_and_set_cache(user, %{is_locked: false})
assert %{locked: false, follow_requests_count: 1} =
AccountView.render("show.json", %{user: user, for: user})