Remove duplicate @doc blocs

Elixir 11 notifies this a lot

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-06 15:43:38 +01:00
parent 7c11807c14
commit 44559a71ee
16 changed files with 67 additions and 113 deletions

View File

@@ -330,6 +330,12 @@ defmodule Mobilizon.Federation.ActivityPub.Utils do
end
@doc """
Return AS Link data from
* a `Plug.Upload` struct, stored an returned
* a `Picture`, directly returned
* a map containing picture information, stored, saved and returned
Save picture data from %Plug.Upload{} and return AS Link data.
"""
def make_picture_data(%Plug.Upload{} = picture, opts) do
@@ -342,16 +348,10 @@ defmodule Mobilizon.Federation.ActivityPub.Utils do
end
end
@doc """
Convert a picture model into an AS Link representation.
"""
def make_picture_data(%Picture{} = picture) do
Converter.Picture.model_to_as(picture)
end
@doc """
Save picture data from raw data and return AS Link data.
"""
def make_picture_data(picture) when is_map(picture) do
with {:ok, %{"url" => [%{"href" => url, "mediaType" => content_type}], "size" => size}} <-
Mobilizon.Web.Upload.store(picture.file),