Fix tests

This commit is contained in:
Egor Kislitsyn 2019-11-12 19:13:19 +07:00
parent 63c493cd53
commit 768c1a5de1
No known key found for this signature in database
GPG Key ID: 1B49CB15B71E7805
1 changed files with 6 additions and 2 deletions

View File

@ -486,8 +486,12 @@ def maybe_notify_subscribers(recipients, %Activity{
recipients
end
def maybe_notify_subscribers(recipients, %Activity{data: %{"type" => "Create"}} = activity) do
with %User{} = user <- User.get_cached_by_ap_id(activity.actor) do
def maybe_notify_subscribers(
recipients,
%Activity{data: %{"actor" => actor, "type" => type}} = activity
)
when type == "Create" do
with %User{} = user <- User.get_cached_by_ap_id(actor) do
subscriber_ids =
user
|> User.subscribers()