Streamer: Stream boosts to the boosting user.

This commit is contained in:
lain 2020-04-22 17:21:13 +02:00
commit 7a3a88a13e
4 changed files with 51 additions and 19 deletions

View file

@ -987,6 +987,18 @@ defmodule Pleroma.UserTest do
end
describe "get_recipients_from_activity" do
test "works for announces" do
actor = insert(:user)
user = insert(:user, local: true)
{:ok, activity} = CommonAPI.post(actor, %{"status" => "hello"})
{:ok, announce, _} = CommonAPI.repeat(activity.id, user)
recipients = User.get_recipients_from_activity(announce)
assert user in recipients
end
test "get recipients" do
actor = insert(:user)
user = insert(:user, local: true)