A few fixes comming from Dialyser

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-02-22 16:11:57 +01:00
parent d73f738b1b
commit d37c873b04
8 changed files with 47 additions and 15 deletions

View File

@@ -498,8 +498,10 @@ defmodule Mobilizon.Service.ActivityPub.Transmogrifier do
@spec normalize(map()) :: struct() | nil
def normalize(obj) when is_map(obj), do: get_anything_by_url(obj["id"])
@spec normalize(String.t()) :: struct() | nil
def normalize(url) when is_binary(url), do: get_anything_by_url(url)
@spec normalize(any()) :: nil
def normalize(_), do: nil