Fix duplicate @doc entries
This commit is contained in:
parent
268f7f492a
commit
636c00037d
|
@ -242,9 +242,7 @@ def publish(%User{} = actor, %{data: %{"bcc" => bcc}} = activity)
|
|||
end)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Publishes an activity to all relevant peers.
|
||||
"""
|
||||
# Publishes an activity to all relevant peers.
|
||||
def publish(%User{} = actor, %Activity{} = activity) do
|
||||
public = is_public?(activity)
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ defp build_attachment_link(_), do: ""
|
|||
def format_input(text, format, options \\ [])
|
||||
|
||||
@doc """
|
||||
Formatting text to plain text.
|
||||
Formatting text to plain text, BBCode, HTML, or Markdown
|
||||
"""
|
||||
def format_input(text, "text/plain", options) do
|
||||
text
|
||||
|
@ -285,9 +285,6 @@ def format_input(text, "text/plain", options) do
|
|||
end).()
|
||||
end
|
||||
|
||||
@doc """
|
||||
Formatting text as BBCode.
|
||||
"""
|
||||
def format_input(text, "text/bbcode", options) do
|
||||
text
|
||||
|> String.replace(~r/\r/, "")
|
||||
|
@ -297,18 +294,12 @@ def format_input(text, "text/bbcode", options) do
|
|||
|> Formatter.linkify(options)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Formatting text to html.
|
||||
"""
|
||||
def format_input(text, "text/html", options) do
|
||||
text
|
||||
|> Formatter.html_escape("text/html")
|
||||
|> Formatter.linkify(options)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Formatting text to markdown.
|
||||
"""
|
||||
def format_input(text, "text/markdown", options) do
|
||||
text
|
||||
|> Formatter.mentions_escape(options)
|
||||
|
|
|
@ -24,7 +24,7 @@ def login(%{assigns: %{user: %User{}}} = conn, _params) do
|
|||
redirect(conn, to: local_mastodon_root_path(conn))
|
||||
end
|
||||
|
||||
@doc "Local Mastodon FE login init action"
|
||||
# Local Mastodon FE login init action
|
||||
def login(conn, %{"code" => auth_token}) do
|
||||
with {:ok, app} <- get_or_make_app(),
|
||||
{:ok, auth} <- Authorization.get_by_token(app, auth_token),
|
||||
|
@ -35,7 +35,7 @@ def login(conn, %{"code" => auth_token}) do
|
|||
end
|
||||
end
|
||||
|
||||
@doc "Local Mastodon FE callback action"
|
||||
# Local Mastodon FE callback action
|
||||
def login(conn, _) do
|
||||
with {:ok, app} <- get_or_make_app() do
|
||||
path =
|
||||
|
|
|
@ -123,9 +123,8 @@ def index(%{assigns: %{user: user}} = conn, %{ids: ids} = _params) do
|
|||
|
||||
@doc """
|
||||
POST /api/v1/statuses
|
||||
|
||||
Creates a scheduled status when `scheduled_at` param is present and it's far enough
|
||||
"""
|
||||
# Creates a scheduled status when `scheduled_at` param is present and it's far enough
|
||||
def create(
|
||||
%{
|
||||
assigns: %{user: user},
|
||||
|
@ -156,11 +155,8 @@ def create(
|
|||
end
|
||||
end
|
||||
|
||||
@doc """
|
||||
POST /api/v1/statuses
|
||||
|
||||
Creates a regular status
|
||||
"""
|
||||
# Creates a regular status
|
||||
def create(%{assigns: %{user: user}, body_params: %{status: _} = params} = conn, _) do
|
||||
params = Map.put(params, :in_reply_to_status_id, params[:in_reply_to_id])
|
||||
|
||||
|
|
Loading…
Reference in New Issue