diff options
author | Thog <thog92@hotmail.fr> | 2017-11-19 02:22:07 +0100 |
---|---|---|
committer | Thog <thog92@hotmail.fr> | 2017-11-19 02:22:07 +0100 |
commit | 59770c3f5c9a038dbde6b2e1cd1551a7b8f1672b (patch) | |
tree | 178c9f13d02a3a168e1755f8dcbcde0d429315f4 /lib/pleroma/user.ex | |
parent | ed3403ad8be255480d7e41f899d74fe9e5ef3f84 (diff) | |
download | pleroma-59770c3f5c9a038dbde6b2e1cd1551a7b8f1672b.tar.gz |
Fix all compilation warnings
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r-- | lib/pleroma/user.ex | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 56502e897..fbeeef003 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -5,7 +5,6 @@ defmodule Pleroma.User do alias Pleroma.{Repo, User, Object, Web, Activity, Notification} alias Comeonin.Pbkdf2 alias Pleroma.Web.{OStatus, Websub} - alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.Utils schema "users" do @@ -89,7 +88,7 @@ defmodule Pleroma.User do end def update_changeset(struct, params \\ %{}) do - changeset = struct + struct |> cast(params, [:bio, :name]) |> unique_constraint(:nickname) |> validate_format(:nickname, ~r/^[a-zA-Z\d]+$/) @@ -159,7 +158,7 @@ defmodule Pleroma.User do |> follow_changeset(%{following: following}) |> Repo.update - {:ok, followed} = update_follower_count(followed) + {:ok, _} = update_follower_count(followed) follower end @@ -214,7 +213,7 @@ defmodule Pleroma.User do with %User{} = user <- get_by_nickname(nickname) do user else _e -> - with [nick, domain] <- String.split(nickname, "@"), + with [_nick, _domain] <- String.split(nickname, "@"), {:ok, user} <- OStatus.make_user(nickname) do user else _e -> nil @@ -276,7 +275,7 @@ defmodule Pleroma.User do Repo.update(cs) end - def get_notified_from_activity(%Activity{data: %{"to" => to}} = activity) do + def get_notified_from_activity(%Activity{data: %{"to" => to}}) do query = from u in User, where: u.ap_id in ^to, where: u.local == true @@ -284,7 +283,7 @@ defmodule Pleroma.User do Repo.all(query) end - def get_recipients_from_activity(%Activity{data: %{"to" => to}} = activity) do + def get_recipients_from_activity(%Activity{data: %{"to" => to}}) do query = from u in User, where: u.local == true |