Save remote user bio and update if we see new data.
[akkoma] / lib / pleroma / object.ex
index 715a35591815394f5bfd25b1856b3252f9c98cce..72991fa1f028a3610867edc5cd5f8eec6d79c54d 100644 (file)
@@ -9,6 +9,11 @@ defmodule Pleroma.Object do
     timestamps()
   end
 
+  def create(data) do
+    Object.change(%Object{}, %{data: data})
+    |> Repo.insert
+  end
+
   def change(struct, params \\ %{}) do
     changeset = struct
     |> cast(params, [:data])