projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into feature/elasticsearch
[akkoma]
/
lib
/
pleroma
/
web
/
common_api.ex
diff --git
a/lib/pleroma/web/common_api.ex
b/lib/pleroma/web/common_api.ex
index 6f685cb7ba570b117d768f34f79a1d1be8441e6c..3266b1c607017676a00dcb8dd2d45969b8e74a46 100644
(file)
--- a/
lib/pleroma/web/common_api.ex
+++ b/
lib/pleroma/web/common_api.ex
@@
-397,7
+397,13
@@
defmodule Pleroma.Web.CommonAPI do
def post(user, %{status: _} = data) do
with {:ok, draft} <- ActivityDraft.create(user, data) do
def post(user, %{status: _} = data) do
with {:ok, draft} <- ActivityDraft.create(user, data) do
- ActivityPub.create(draft.changes, draft.preview?)
+ activity = ActivityPub.create(draft.changes, draft.preview?)
+
+ unless draft.preview? do
+ Pleroma.Elasticsearch.maybe_put_into_elasticsearch(activity)
+ end
+
+ activity
end
end
end
end