mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-12-23 11:55:06 +01:00
Use User.is_internal_user?
instead
This commit is contained in:
parent
9df5b1e6ae
commit
228ff3760e
@ -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 @@ defmodule Pleroma.Web.ActivityPub.SideEffects 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 New Issue
Block a user