forked from AkkomaGang/akkoma
fix format
This commit is contained in:
parent
db4badc6aa
commit
46bd5c1d87
1 changed files with 6 additions and 6 deletions
|
@ -1150,7 +1150,6 @@ defmodule Pleroma.User do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def deactivate_async(user, status \\ true) do
|
def deactivate_async(user, status \\ true) do
|
||||||
PleromaJobQueue.enqueue(:user, __MODULE__, [:deactivate_async, user, status])
|
PleromaJobQueue.enqueue(:user, __MODULE__, [:deactivate_async, user, status])
|
||||||
end
|
end
|
||||||
|
@ -1160,11 +1159,12 @@ defmodule Pleroma.User do
|
||||||
def deactivate(%User{} = user, status \\ true) do
|
def deactivate(%User{} = user, status \\ true) do
|
||||||
info_cng = User.Info.set_activation_status(user.info, status)
|
info_cng = User.Info.set_activation_status(user.info, status)
|
||||||
|
|
||||||
with {:ok, user} <- user
|
with {:ok, user} <-
|
||||||
|> change()
|
user
|
||||||
|> put_embed(:info, info_cng)
|
|> change()
|
||||||
|> update_and_set_cache(),
|
|> put_embed(:info, info_cng)
|
||||||
{:ok, friends} <- User.get_friends(user) do
|
|> update_and_set_cache(),
|
||||||
|
{:ok, friends} <- User.get_friends(user) do
|
||||||
Enum.each(friends, &update_follower_count(&1))
|
Enum.each(friends, &update_follower_count(&1))
|
||||||
{:ok, user}
|
{:ok, user}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue