aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-04-22 14:37:54 +0200
committerRoger Braun <roger@rogerbraun.net>2017-04-22 14:37:54 +0200
commit923584d0467b2213bef0d3d78c8713f34b7b21d7 (patch)
tree483a711165b2fa09fb6b0b7d17c8a613ffb332ba /lib
parentc585f9e26ca81f0394cf3fc1a9271833506811e1 (diff)
downloadpleroma-923584d0467b2213bef0d3d78c8713f34b7b21d7.tar.gz
Remove unknown activities from feed.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/ostatus/activity_representer.ex2
-rw-r--r--lib/pleroma/web/ostatus/feed_representer.ex1
-rw-r--r--lib/pleroma/web/websub/websub.ex1
3 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/ostatus/activity_representer.ex b/lib/pleroma/web/ostatus/activity_representer.ex
index daaa4ef03..590abc8bb 100644
--- a/lib/pleroma/web/ostatus/activity_representer.ex
+++ b/lib/pleroma/web/ostatus/activity_representer.ex
@@ -22,4 +22,6 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenter do
{:updated, h.(updated_at)}
] ++ attachments
end
+
+ def to_simple_form(_,_), do: nil
end
diff --git a/lib/pleroma/web/ostatus/feed_representer.ex b/lib/pleroma/web/ostatus/feed_representer.ex
index 42be5f793..c9cd12937 100644
--- a/lib/pleroma/web/ostatus/feed_representer.ex
+++ b/lib/pleroma/web/ostatus/feed_representer.ex
@@ -11,6 +11,7 @@ defmodule Pleroma.Web.OStatus.FeedRepresenter do
entries = Enum.map(activities, fn(activity) ->
{:entry, ActivityRepresenter.to_simple_form(activity, user)}
end)
+ |> Enum.filter(fn ({_, form}) -> form end)
[{
:feed, [
diff --git a/lib/pleroma/web/websub/websub.ex b/lib/pleroma/web/websub/websub.ex
index cf819afd1..cc66b52dd 100644
--- a/lib/pleroma/web/websub/websub.ex
+++ b/lib/pleroma/web/websub/websub.ex
@@ -1,6 +1,5 @@
defmodule Pleroma.Web.Websub do
alias Pleroma.Repo
- alias Pleroma.Websub
alias Pleroma.Web.Websub.WebsubServerSubscription
alias Pleroma.Web.OStatus.FeedRepresenter
alias Pleroma.Web.OStatus