Merge branch 'develop' into feature/configurable-blocks
authorsquidboi <squidboi@waifu.club>
Sat, 16 Jun 2018 22:37:16 +0000 (15:37 -0700)
committersquidboi <squidboi@waifu.club>
Sat, 16 Jun 2018 22:37:16 +0000 (15:37 -0700)
1  2 
config/config.exs
lib/pleroma/user.ex
lib/pleroma/web/activity_pub/activity_pub.ex

index b8dd867c486282230b905b94eb0c9499e0b16de3,5e57af87b4927a8549e3723435590b59c8aa29cb..e1a77d3e16a8dd204a15b47173071d61cb69c628
@@@ -57,13 -57,12 +57,17 @@@ config :pleroma, :instance
    public: true,
    quarantined_instances: []
  
 -config :pleroma, :activitypub, accept_blocks: true
 +config :pleroma, :activitypub,
 +  accept_blocks: true,
 +  unfollow_blocked: true,
 +  outgoing_blocks: true
 +
 +config :pleroma, :user, deny_follow_blocked: true
  
+ config :pleroma, :mrf_rejectnonpublic,
+   allow_followersonly: false,
+   allow_direct: false
  config :pleroma, :mrf_simple,
    media_removal: [],
    media_nsfw: [],
index dd645b2e5a54ca5dc8123bf3a9625d362da79e36,b27397e13956fc5ae16e638ff3e2ef69c1e21d2b..1fcec479f1cae9fb8a623d5b2ae95698371fa37d
@@@ -201,9 -197,14 +201,17 @@@ defmodule Pleroma.User d
      end
    end
  
+   def maybe_follow(%User{} = follower, %User{info: info} = followed) do
+     if not following?(follower, followed) do
+       follow(follower, followed)
+     else
+       {:ok, follower}
+     end
+   end
 +  @user_config Application.get_env(:pleroma, :user)
 +  @deny_follow_blocked Keyword.get(@user_config, :deny_follow_blocked)
 +
    def follow(%User{} = follower, %User{info: info} = followed) do
      ap_followers = followed.follower_address