From: Ivan Tashkinov Date: Fri, 17 Apr 2020 13:23:58 +0000 (+0300) Subject: Merge remote-tracking branch 'remotes/origin/develop' into 1559-follow-request-notifi... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=6e6f95c6aed77cbde1a58edcdbb5cc4f68416bca;p=akkoma Merge remote-tracking branch 'remotes/origin/develop' into 1559-follow-request-notifications # Conflicts: # CHANGELOG.md --- 6e6f95c6aed77cbde1a58edcdbb5cc4f68416bca diff --cc CHANGELOG.md index b3b63ac54,2239a5288..3bc0bb9af --- a/CHANGELOG.md +++ b/CHANGELOG.md @@@ -15,7 -12,7 +12,8 @@@ The format is based on [Keep a Changelo - NodeInfo: `pleroma_emoji_reactions` to the `features` list. - Configuration: `:restrict_unauthenticated` setting, restrict access for unauthenticated users to timelines (public and federate), user profiles and statuses. - New HTTP adapter [gun](https://github.com/ninenines/gun). Gun adapter requires minimum OTP version of 22.2 otherwise Pleroma won’t start. For hackney OTP update is not required. + - Mix task to create trusted OAuth App. +- Notifications: Added `follow_request` notification type (configurable, see `[:notifications, :enable_follow_request_notifications]` setting).
API Changes - Mastodon API: Support for `include_types` in `/api/v1/notifications`. diff --cc lib/pleroma/user.ex index ac2594417,896bab140..bef4679cb --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@@ -699,10 -688,8 +688,10 @@@ defmodule Pleroma.User d def needs_update?(_), do: true @spec maybe_direct_follow(User.t(), User.t()) :: {:ok, User.t()} | {:error, String.t()} + + # "Locked" (self-locked) users demand explicit authorization of follow requests def maybe_direct_follow(%User{} = follower, %User{local: true, locked: true} = followed) do - follow(follower, followed, "pending") + follow(follower, followed, :follow_pending) end def maybe_direct_follow(%User{} = follower, %User{local: true} = followed) do diff --cc lib/pleroma/web/mastodon_api/views/notification_view.ex index 7001fd7b9,734ffbf39..4da1ab67f --- a/lib/pleroma/web/mastodon_api/views/notification_view.ex +++ b/lib/pleroma/web/mastodon_api/views/notification_view.ex @@@ -111,8 -114,12 +114,9 @@@ defmodule Pleroma.Web.MastodonAPI.Notif put_status(response, parent_activity_fn.(), reading_user, render_opts) "move" -> + # Note: :skip_relationships option being applied to _account_ rendering (here) put_target(response, activity, reading_user, render_opts) - "follow" -> - response - "pleroma:emoji_reaction" -> response |> put_status(parent_activity_fn.(), reading_user, render_opts)