@primary_key {:id, FlakeId.Ecto.CompatType, autogenerate: true}
+ @cachex Pleroma.Config.get([:cachex, :provider], Cachex)
+
schema "activities" do
field(:data, :map)
field(:local, :boolean, default: true)
from([a] in query,
left_join: b in Bookmark,
on: b.user_id == ^user.id and b.activity_id == a.id,
+ as: :bookmark,
preload: [bookmark: b]
)
end
from([a] in query,
left_join: r in ReportNote,
on: a.id == r.activity_id,
+ as: :report_note,
preload: [report_notes: r]
)
end
defp purge_web_resp_cache(%Activity{} = activity) do
%{path: path} = URI.parse(activity.data["id"])
- Cachex.del(:web_resp_cache, path)
+ @cachex.del(:web_resp_cache, path)
activity
end