def get_tombstone(%Object{data: data}, deleted \\ DateTime.utc_now()) do
%{
id: data["id"],
- type: "tombstone",
+ type: "Tombstone",
deleted: deleted
}
end
assert Pleroma.Activity.get_tombstone(activity, deleted) == %{
id: activity.data["object"]["id"],
context: activity.data["context"],
- type: "tombstone",
+ type: "Tombstone",
published: activity.data["published"],
deleted: deleted
}
activity = insert(:note_activity)
{:ok, deleted} = Pleroma.Activity.swap_data_with_tombstone(activity)
- assert deleted.data.type == "tombstone"
+ assert deleted.data.type == "Tombstone"
found_activity = Repo.get(Activity, activity.id)
# TODO: Remove favorites, repeats, delete activities.
- assert Repo.get(Activity, activity.id).data["type"] == "tombstone"
+ assert Repo.get(Activity, activity.id).data["type"] == "Tombstone"
end
test "get_public_key_for_ap_id fetches a user that's not in the db" do
assert Repo.get(Activity, delete.id) != nil
- assert Repo.get(Object, object.id).data["type"] == "tombstone"
+ assert Repo.get(Object, object.id).data["type"] == "Tombstone"
end
end
{:ok, %Activity{local: false}} = Transmogrifier.handle_incoming(data)
- assert Repo.get(Activity, activity.id).data["type"] == "tombstone"
+ assert Repo.get(Activity, activity.id).data["type"] == "Tombstone"
end
test "it fails for incoming deletes with spoofed origin" do
assert %{} = json_response(conn, 200)
- assert Repo.get(Activity, activity.id).data["type"] == "tombstone"
+ assert Repo.get(Activity, activity.id).data["type"] == "Tombstone"
end
test "when you didn't create it", %{conn: conn} do