diff options
author | rinpatch <rinpatch@sdf.org> | 2019-04-01 11:55:59 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-04-01 11:55:59 +0300 |
commit | 45ba10bf47baf350fd4d538cbe32cec447d496e6 (patch) | |
tree | 0bfae3a221072a73738a22687185eecd6054961c /lib/pleroma/object.ex | |
parent | cd387f8693c57b925576ab92f8202ef28007cfc0 (diff) | |
download | pleroma-45ba10bf47baf350fd4d538cbe32cec447d496e6.tar.gz |
Fix the issue with HTML scrubber
Diffstat (limited to 'lib/pleroma/object.ex')
-rw-r--r-- | lib/pleroma/object.ex | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/pleroma/object.ex b/lib/pleroma/object.ex index 8a670645d..013d62157 100644 --- a/lib/pleroma/object.ex +++ b/lib/pleroma/object.ex @@ -44,6 +44,11 @@ defmodule Pleroma.Object do # Use this whenever possible, especially when walking graphs in an O(N) loop! def normalize(%Activity{object: %Object{} = object}), do: object + # A hack for fake activities + def normalize(%Activity{data: %{"object" => %{"fake" => true} = data}}) do + %Object{id: "pleroma:fake_object_id", data: data} + end + # Catch and log Object.normalize() calls where the Activity's child object is not # preloaded. def normalize(%Activity{data: %{"object" => %{"id" => ap_id}}}) do |