mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-29 08:47:09 +00:00
fix buggos
This commit is contained in:
parent
a504e250a9
commit
06ab00d625
|
@ -17,7 +17,7 @@ defmodule Pleroma.Elasticsearch do
|
|||
maybe_put_into_elasticsearch(activity)
|
||||
end
|
||||
|
||||
def maybe_put_into_elasticsearch(%{data: %{"type" => "Create"}, object: %{data: %{type: "Note"}}} = activity) do
|
||||
def maybe_put_into_elasticsearch(%{data: %{"type" => "Create"}, object: %{data: %{"type" => "Note"}}} = activity) do
|
||||
if Config.get([:search, :provider]) == Pleroma.Search.Elasticsearch do
|
||||
actor = Pleroma.Activity.user_actor(activity)
|
||||
|
||||
|
|
|
@ -537,10 +537,18 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
|
|||
end
|
||||
|
||||
@impl true
|
||||
def handle_after_transaction(%{data: %{"type" => "Create"}} = activity) do
|
||||
def handle_after_transaction(%Pleroma.Activity{data: %{"type" => "Create"}} = activity) do
|
||||
Pleroma.Elasticsearch.put_by_id(activity.id)
|
||||
end
|
||||
|
||||
def handle_after_transaction(%Pleroma.Activity{}) do
|
||||
:ok
|
||||
end
|
||||
|
||||
def handle_after_transaction(%Pleroma.Object{}) do
|
||||
:ok
|
||||
end
|
||||
|
||||
def handle_after_transaction(meta) do
|
||||
meta
|
||||
|> send_notifications()
|
||||
|
|
Loading…
Reference in a new issue