diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-11-26 10:42:36 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-11-26 10:42:36 +0300 |
commit | c8d3c3bfeca66d16846f97b50328e0718cfe5fef (patch) | |
tree | cfe7074c79f6117443632af5f13fd33672f90732 /lib/pleroma/user.ex | |
parent | cad9b325e567c9c607c2b1d33c915cc88da716b1 (diff) | |
parent | dc9090810dbed74da91f2e94f23e5512d259e4fc (diff) | |
download | pleroma-c8d3c3bfeca66d16846f97b50328e0718cfe5fef.tar.gz |
Merge remote-tracking branch 'remotes/upstream/develop' into 1335-user-api-id-fields-relations
# Conflicts:
# lib/pleroma/web/activity_pub/activity_pub.ex
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r-- | lib/pleroma/user.ex | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 383402447..fe4aa5003 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -586,6 +586,10 @@ defmodule Pleroma.User do end end + def try_send_confirmation_email(users) do + Enum.each(users, &try_send_confirmation_email/1) + end + def needs_update?(%User{local: true}), do: false def needs_update?(%User{local: false, last_refreshed_at: nil}), do: true @@ -1704,6 +1708,11 @@ defmodule Pleroma.User do |> update_and_set_cache() end + @spec toggle_confirmation([User.t()]) :: [{:ok, User.t()} | {:error, Changeset.t()}] + def toggle_confirmation(users) do + Enum.map(users, &toggle_confirmation/1) + end + def get_mascot(%{mascot: %{} = mascot}) when not is_nil(mascot) do mascot end |