- # TODO: Extract to own module, align as close to Mastodon format as possible.
- def sanitize_outgoing_activity_data(data) do
- data
- |> Map.put("@context", "https://www.w3.org/ns/activitystreams")
- end
-
- def prepare_incoming(%{"type" => "Create", "object" => %{"type" => "Note"} = object} = data) do
- with {:ok, user} <- OStatus.find_or_make_user(data["actor"]) do
- {:ok, data}
- else
- _e -> :error
- end
- end
-
- def prepare_incoming(_) do
- :error
- end
-