From: Alex Gleason Date: Sun, 15 Nov 2020 01:48:47 +0000 (-0600) Subject: Merge remote-tracking branch 'upstream/develop' into registration-workflow X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=9546c1444c2c8c4abc9bcb35b6a8ff360ddc83af;p=akkoma Merge remote-tracking branch 'upstream/develop' into registration-workflow --- 9546c1444c2c8c4abc9bcb35b6a8ff360ddc83af diff --cc CHANGELOG.md index c546dd0bf,63a8fa942..f61ccd2c3 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@@ -12,8 -22,10 +22,10 @@@ The format is based on [Keep a Changelo ### Changed + - **Breaking** Requires `libmagic` (or `file`) to guess file types. - **Breaking:** Pleroma Admin API: emoji packs and files routes changed. - **Breaking:** Sensitive/NSFW statuses no longer disable link previews. -- **Breaking:** App metrics endpoint (`/api/pleroma/app_metrics`) is disabled by default, check `docs/API/prometheus.md` on enabling and configuring. ++- **Breaking:** App metrics endpoint (`/api/pleroma/app_metrics`) is disabled by default, check `docs/API/prometheus.md` on enabling and configuring. - Search: Users are now findable by their urls. - Renamed `:await_up_timeout` in `:connections_pool` namespace to `:connect_timeout`, old name is deprecated. - Renamed `:timeout` in `pools` namespace to `:recv_timeout`, old name is deprecated. @@@ -21,12 -33,8 +33,9 @@@ - Users with the `discoverable` field set to false will not show up in searches. - Minimum lifetime for ephmeral activities changed to 10 minutes and made configurable (`:min_lifetime` option). - Introduced optional dependencies on `ffmpeg`, `ImageMagick`, `exiftool` software packages. Please refer to `docs/installation/optional/media_graphics_packages.md`. +- Changed `mix pleroma.user toggle_confirmed` to `mix pleroma.user confirm` - - ### Added - - Media preview proxy (requires `ffmpeg` and `ImageMagick` to be installed and media proxy to be enabled; see `:media_preview_proxy` config for more details). - - Pleroma API: Importing the mutes users from CSV files. - - Experimental websocket-based federation between Pleroma instances. + - Polls now always return a `voters_count`, even if they are single-choice + - Admin Emails: The ap id is used as the user link in emails now.
API Changes diff --cc lib/pleroma/user.ex index 0dabb2a1e,8e4ec8064..f93fd7a0c --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@@ -772,21 -782,9 +782,22 @@@ defmodule Pleroma.User d end end - def post_register_action(%User{} = user) do + def post_register_action(%User{confirmation_pending: true} = user) do + with {:ok, _} <- try_send_confirmation_email(user) do + {:ok, user} + end + end + + def post_register_action(%User{approval_pending: true} = user) do + with {:ok, _} <- send_user_approval_email(user), + {:ok, _} <- send_admin_approval_emails(user) do + {:ok, user} + end + end + + def post_register_action(%User{approval_pending: false, confirmation_pending: false} = user) do with {:ok, user} <- autofollow_users(user), + {:ok, _} <- autofollowing_users(user), {:ok, user} <- set_cache(user), {:ok, _} <- send_welcome_email(user), {:ok, _} <- send_welcome_message(user),