Use `User.is_internal_user?` instead

This commit is contained in:
kPherox 2020-05-27 05:24:36 +00:00
parent 9df5b1e6ae
commit 228ff3760e
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,6 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
alias Pleroma.Repo alias Pleroma.Repo
alias Pleroma.User alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Relay
alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.ActivityPub.Utils
def handle(object, meta \\ []) def handle(object, meta \\ [])
@ -34,10 +33,11 @@ def handle(%{data: %{"type" => "Like"}} = object, meta) do
# - Stream out the announce # - Stream out the announce
def handle(%{data: %{"type" => "Announce"}} = object, meta) do def handle(%{data: %{"type" => "Announce"}} = object, meta) do
announced_object = Object.get_by_ap_id(object.data["object"]) announced_object = Object.get_by_ap_id(object.data["object"])
user = User.get_cached_by_ap_id(object.data["actor"])
Utils.add_announce_to_object(object, announced_object) Utils.add_announce_to_object(object, announced_object)
if object.data["actor"] != Relay.relay_ap_id() do if !User.is_internal_user?(user) do
Notification.create_notifications(object) Notification.create_notifications(object)
ActivityPub.stream_out(object) ActivityPub.stream_out(object)
end end