diff options
| author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-11-12 19:13:19 +0700 | 
|---|---|---|
| committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-11-12 19:13:19 +0700 | 
| commit | 768c1a5de172151beb34e6dda13d4fb05e05ed87 (patch) | |
| tree | 730a7b26a0ecebbe4b8e51f85b7cc910fd28dd27 /lib | |
| parent | 63c493cd536155b98063be5cb680914413597312 (diff) | |
| download | pleroma-768c1a5de172151beb34e6dda13d4fb05e05ed87.tar.gz pleroma-768c1a5de172151beb34e6dda13d4fb05e05ed87.zip | |
Fix tests
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 43b67d0f0..cbb64f8d2 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -486,8 +486,12 @@ defmodule Pleroma.Web.CommonAPI.Utils do      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() | 
