projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5943f4
)
MastodonAPI search: return only create activities.
author
lain
<lain@soykaf.club>
Thu, 5 Apr 2018 11:59:53 +0000
(13:59 +0200)
committer
lain
<lain@soykaf.club>
Thu, 5 Apr 2018 11:59:53 +0000
(13:59 +0200)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 64928fda5bed5aa1a3306caa45c48af67d23930a..ccba4710a7fe99579af3482ccbdd354ec03d5062 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@
-494,6
+494,10
@@
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
if Regex.match?(~r/https?:/, query) do
with {:ok, activities} <- OStatus.fetch_activity_from_url(query) do
activities
+ |> Enum.filter(fn
+ %{data: %{"type" => "Create"}} -> true
+ _ -> false
+ end)
else
_e -> []
end