Merge branch 'develop' into feature/delivery-tracking

This commit is contained in:
rinpatch 2019-09-13 19:42:53 +03:00
commit ba70a8cae6
25 changed files with 3452 additions and 990 deletions

View file

@ -1221,7 +1221,7 @@ defmodule Pleroma.User do
def delete_user_activities(%User{ap_id: ap_id} = user) do
ap_id
|> Activity.query_by_actor()
|> Activity.Queries.by_actor()
|> RepoStreamer.chunk_stream(50)
|> Stream.each(fn activities ->
Enum.each(activities, &delete_activity(&1))
@ -1638,4 +1638,13 @@ defmodule Pleroma.User do
)
|> Repo.all()
end
def change_email(user, email) do
user
|> cast(%{email: email}, [:email])
|> validate_required([:email])
|> unique_constraint(:email)
|> validate_format(:email, @email_regex)
|> update_and_set_cache()
end
end