projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into feature/1893-remote-emoji-packs-pagination
[akkoma]
/
lib
/
mix
/
tasks
/
pleroma
/
user.ex
diff --git
a/lib/mix/tasks/pleroma/user.ex
b/lib/mix/tasks/pleroma/user.ex
index 4073fe5a474d8f7e47da69cff1df48581acf0398..e062628047b402d192a0a4be3cd41e1f5020c7ae 100644
(file)
--- a/
lib/mix/tasks/pleroma/user.ex
+++ b/
lib/mix/tasks/pleroma/user.ex
@@
-179,7
+179,7
@@
defmodule Mix.Tasks.Pleroma.User do
start_pleroma()
Pleroma.User.Query.build(%{nickname: "@#{instance}"})
start_pleroma()
Pleroma.User.Query.build(%{nickname: "@#{instance}"})
- |> Pleroma.Repo
Streamer.chunk_stream(500
)
+ |> Pleroma.Repo
.chunk_stream(500, :batches
)
|> Stream.each(fn users ->
users
|> Enum.each(fn user ->
|> Stream.each(fn users ->
users
|> Enum.each(fn user ->
@@
-370,7
+370,7
@@
defmodule Mix.Tasks.Pleroma.User do
is_admin: false,
invisible: false
})
is_admin: false,
invisible: false
})
- |> Pleroma.Repo
Streamer.chunk_stream(500
)
+ |> Pleroma.Repo
.chunk_stream(500, :batches
)
|> Stream.each(fn users ->
users
|> Enum.each(fn user -> User.need_confirmation(user, false) end)
|> Stream.each(fn users ->
users
|> Enum.each(fn user -> User.need_confirmation(user, false) end)
@@
-388,7
+388,7
@@
defmodule Mix.Tasks.Pleroma.User do
is_admin: false,
invisible: false
})
is_admin: false,
invisible: false
})
- |> Pleroma.Repo
Streamer.chunk_stream(500
)
+ |> Pleroma.Repo
.chunk_stream(500, :batches
)
|> Stream.each(fn users ->
users
|> Enum.each(fn user -> User.need_confirmation(user, true) end)
|> Stream.each(fn users ->
users
|> Enum.each(fn user -> User.need_confirmation(user, true) end)
@@
-413,7
+413,7
@@
defmodule Mix.Tasks.Pleroma.User do
start_pleroma()
Pleroma.User.Query.build(%{local: true})
start_pleroma()
Pleroma.User.Query.build(%{local: true})
- |> Pleroma.Repo
Streamer.chunk_stream(500
)
+ |> Pleroma.Repo
.chunk_stream(500, :batches
)
|> Stream.each(fn users ->
users
|> Enum.each(fn user ->
|> Stream.each(fn users ->
users
|> Enum.each(fn user ->
@@
-455,11
+455,7
@@
defmodule Mix.Tasks.Pleroma.User do
end
defp set_confirmed(user, value) do
end
defp set_confirmed(user, value) do
- {:ok, user} =
- case value do
- true -> User.need_confirmation(user, false)
- false -> User.need_confirmation(user, true)
- end
+ {:ok, user} = User.need_confirmation(user, !value)
shell_info("Confirmation pending status of #{user.nickname}: #{user.confirmation_pending}")
user
shell_info("Confirmation pending status of #{user.nickname}: #{user.confirmation_pending}")
user