Resolve merge conflict
[akkoma] / lib / pleroma / activity.ex
index 0845233ee7109b93ad1ccfdafeb18b7c37d97c40..353f9f6cd7722d915369218576540e77c2efc89e 100644 (file)
@@ -1,7 +1,13 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
 defmodule Pleroma.Activity do
   use Ecto.Schema
   alias Pleroma.{Repo, Activity, Notification}
-  import Ecto.{Query, Changeset}
+  import Ecto.Query
+
+  @type t :: %__MODULE__{}
 
   # https://github.com/tootsuite/mastodon/blob/master/app/models/notification.rb#L19
   @mastodon_notification_types %{
@@ -103,22 +109,4 @@ defmodule Pleroma.Activity do
   end
 
   def mastodon_notification_type(%Activity{}), do: nil
-
-  def get_tombstone(%Activity{data: data}, deleted \\ DateTime.utc_now()) do
-    %{
-      id: data["id"],
-      context: data["context"],
-      type: "tombstone",
-      published: data["published"],
-      deleted: deleted
-    }
-  end
-
-  def swap_data_with_tombstone(activity) do
-    tombstone = get_tombstone(activity)
-
-    activity
-    |> change(%{data: tombstone})
-    |> Repo.update()
-  end
 end