mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-24 00:50:29 +00:00
Use Object.change instead of Ecto.Changeset.change
This commit is contained in:
parent
9a0163db53
commit
a32e23905a
1 changed files with 1 additions and 2 deletions
|
@ -300,7 +300,6 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|
||||||
if !(new_scrubber_cache == scrubber_cache) or scrubbed_html == nil do
|
if !(new_scrubber_cache == scrubber_cache) or scrubbed_html == nil do
|
||||||
scrubbed_html = HTML.filter_tags(content, scrubbers)
|
scrubbed_html = HTML.filter_tags(content, scrubbers)
|
||||||
new_scrubber_cache = [%{:scrubbers => key, :content => scrubbed_html} | new_scrubber_cache]
|
new_scrubber_cache = [%{:scrubbers => key, :content => scrubbed_html} | new_scrubber_cache]
|
||||||
IO.puts(activity)
|
|
||||||
|
|
||||||
activity =
|
activity =
|
||||||
Map.put(
|
Map.put(
|
||||||
|
@ -309,7 +308,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|
||||||
Kernel.put_in(activity.data, ["object", "scrubber_cache"], new_scrubber_cache)
|
Kernel.put_in(activity.data, ["object", "scrubber_cache"], new_scrubber_cache)
|
||||||
)
|
)
|
||||||
|
|
||||||
cng = Ecto.Changeset.change(activity)
|
cng = Object.change(activity)
|
||||||
Repo.update(cng)
|
Repo.update(cng)
|
||||||
scrubbed_html
|
scrubbed_html
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue