projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove Reply-To from report emails
[akkoma]
/
lib
/
pleroma
/
user.ex
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index 7acf1e53cbf8192c334d1cd01b321a52298e3fe9..974f9685253f2cb7a43c803a3f30a8c335483e12 100644
(file)
--- a/
lib/pleroma/user.ex
+++ b/
lib/pleroma/user.ex
@@
-228,6
+228,7
@@
defmodule Pleroma.User do
|> put_password_hash
end
|> put_password_hash
end
+ @spec reset_password(User.t(), map) :: {:ok, User.t()} | {:error, Ecto.Changeset.t()}
def reset_password(%User{id: user_id} = user, data) do
multi =
Multi.new()
def reset_password(%User{id: user_id} = user, data) do
multi =
Multi.new()
@@
-332,6
+333,7
@@
defmodule Pleroma.User do
def needs_update?(_), do: true
def needs_update?(_), do: true
+ @spec maybe_direct_follow(User.t(), User.t()) :: {:ok, User.t()} | {:error, String.t()}
def maybe_direct_follow(%User{} = follower, %User{local: true, info: %{locked: true}}) do
{:ok, follower}
end
def maybe_direct_follow(%User{} = follower, %User{local: true, info: %{locked: true}}) do
{:ok, follower}
end
@@
-741,7
+743,7
@@
defmodule Pleroma.User do
end
def update_follower_count(%User{} = user) do
end
def update_follower_count(%User{} = user) do
-
unless !user.local and
Pleroma.Config.get([:instance, :external_user_synchronization]) do
+
if user.local or !
Pleroma.Config.get([:instance, :external_user_synchronization]) do
follower_count_query =
User.Query.build(%{followers: user, deactivated: false})
|> select([u], %{count: count(u.id)})
follower_count_query =
User.Query.build(%{followers: user, deactivated: false})
|> select([u], %{count: count(u.id)})