Fix all compilation warnings

This commit is contained in:
Thog 2017-11-19 02:22:07 +01:00
commit 59770c3f5c
No known key found for this signature in database
GPG key ID: 0CD291558FAFDBC6
26 changed files with 89 additions and 94 deletions

View file

@ -64,7 +64,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
Inserts a full object if it is contained in an activity.
"""
def insert_full_object(%{"object" => object_data}) when is_map(object_data) do
with {:ok, object} <- Object.create(object_data) do
with {:ok, _} <- Object.create(object_data) do
:ok
end
end
@ -88,7 +88,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
@doc """
Returns an existing like if a user already liked an object
"""
def get_existing_like(actor, %{data: %{"id" => id}} = object) do
def get_existing_like(actor, %{data: %{"id" => id}}) do
query = from activity in Activity,
where: fragment("(?)->>'actor' = ?", activity.data, ^actor),
# this is to use the index
@ -201,7 +201,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
def make_create_data(params, additional) do
published = params.published || make_date()
activity = %{
%{
"type" => "Create",
"to" => params.to |> Enum.uniq,
"actor" => params.actor.ap_id,