forked from AkkomaGang/akkoma
Use User.is_internal_user?
instead
This commit is contained in:
parent
9df5b1e6ae
commit
228ff3760e
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,6 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
|
|||
alias Pleroma.Repo
|
||||
alias Pleroma.User
|
||||
alias Pleroma.Web.ActivityPub.ActivityPub
|
||||
alias Pleroma.Web.ActivityPub.Relay
|
||||
alias Pleroma.Web.ActivityPub.Utils
|
||||
|
||||
def handle(object, meta \\ [])
|
||||
|
@ -34,10 +33,11 @@ def handle(%{data: %{"type" => "Like"}} = object, meta) do
|
|||
# - Stream out the announce
|
||||
def handle(%{data: %{"type" => "Announce"}} = object, meta) do
|
||||
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)
|
||||
|
||||
if object.data["actor"] != Relay.relay_ap_id() do
|
||||
if !User.is_internal_user?(user) do
|
||||
Notification.create_notifications(object)
|
||||
ActivityPub.stream_out(object)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue