alias Pleroma.Activity
alias Pleroma.User
+ alias Pleroma.Repo
+ alias Pleroma.Object
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.CommonAPI.Utils
test "a note with null content" do
note = insert(:note_activity)
+ note_object = Object.normalize(note.data["object"])
data =
- note.data
- |> put_in(["object", "content"], nil)
+ note_object.data
+ |> Map.put("content", nil)
- note =
- note
- |> Map.put(:data, data)
+ Object.change(note_object, %{data: data})
+ |> Repo.update()
User.get_cached_by_ap_id(note.data["actor"])