X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fcommon_api.ex;h=3266b1c607017676a00dcb8dd2d45969b8e74a46;hb=3a9b83413ed123680b83680ecc3da55c58019fb5;hp=f6a131c21bc4d2fc2b014b4597484da81cf43607;hpb=ef9dea66b2b980aabc76b314b36c6b0f38cc27e8;p=akkoma diff --git a/lib/pleroma/web/common_api.ex b/lib/pleroma/web/common_api.ex index f6a131c21..3266b1c60 100644 --- a/lib/pleroma/web/common_api.ex +++ b/lib/pleroma/web/common_api.ex @@ -398,9 +398,11 @@ defmodule Pleroma.Web.CommonAPI do def post(user, %{status: _} = data) do with {:ok, draft} <- ActivityDraft.create(user, data) do activity = ActivityPub.create(draft.changes, draft.preview?) + unless draft.preview? do Pleroma.Elasticsearch.maybe_put_into_elasticsearch(activity) end + activity end end