Merge remote-tracking branch 'pleroma/develop' into feature/addressable-lists
authorEgor Kislitsyn <egor@kislitsyn.com>
Fri, 24 May 2019 14:05:57 +0000 (21:05 +0700)
committerEgor Kislitsyn <egor@kislitsyn.com>
Fri, 24 May 2019 14:05:57 +0000 (21:05 +0700)
1  2 
CHANGELOG.md
lib/pleroma/web/activity_pub/activity_pub.ex
lib/pleroma/web/common_api/common_api.ex
lib/pleroma/web/common_api/utils.ex
lib/pleroma/web/salmon/salmon.ex
test/web/activity_pub/activity_pub_test.exs

diff --cc CHANGELOG.md
index c9f8ee5ab35997bc484a639cb4decbb1809cc90c,7869e299bb293169083653f83fcba907f8af71bc..b8907a23fdd6d37e388b0ae2929121fa2851ca51
@@@ -38,7 -41,10 +41,11 @@@ The format is based on [Keep a Changelo
  - Metadata: RelMe provider
  - OAuth: added support for refresh tokens
  - Emoji packs and emoji pack manager
+ - Object pruning (`mix pleroma.database prune_objects`)
+ - OAuth: added job to clean expired access tokens
+ - MRF: Support for rejecting reports from specific instances (`mrf_simple`)
+ - MRF: Support for stripping avatars and banner images from specific instances (`mrf_simple`)
 +- Addressable lists
  
  ### Changed
  - **Breaking:** Configuration: move from Pleroma.Mailer to Pleroma.Emails.Mailer
index 8a5b3b8b47fc62788ee466adda0a0d52021501b2,aa0229db7f3e77d89620c6f329d6ed3cb2acbb0e..48aaabe942429a10fbe8dd88ebabb20d87f81e59
@@@ -846,9 -854,12 +853,10 @@@ defmodule Pleroma.Web.ActivityPub.Activ
    defp maybe_order(query, _), do: query
  
    def fetch_activities_query(recipients, opts \\ %{}) do
 -    base_query = from(activity in Activity)
 -
 -    base_query
 +    Activity
      |> maybe_preload_objects(opts)
      |> maybe_preload_bookmarks(opts)
+     |> maybe_set_thread_muted_field(opts)
      |> maybe_order(opts)
      |> restrict_recipients(recipients, opts["user"])
      |> restrict_tag(opts)
index a08075bc2c4168fa258a7e87422522256500f20e,5a312d673fe9cd793c235d0e1b018412d029cba6..e8199200eec225ad5f60c624d360094bceccd783
@@@ -160,9 -155,9 +160,10 @@@ defmodule Pleroma.Web.CommonAPI d
               visibility
             ),
           {to, cc} <- to_for_user_and_mentions(user, mentions, in_reply_to, visibility),
 +         bcc <- bcc_for_list(user, visibility),
           context <- make_context(in_reply_to),
           cw <- data["spoiler_text"] || "",
+          sensitive <- data["sensitive"] || Enum.member?(tags, {"#nsfw", "nsfw"}),
           full_payload <- String.trim(status <> cw),
           length when length in 1..limit <- String.length(full_payload),
           object <-
Simple merge
index 80c3a3190831de92121a4cd86e3ab609d02ed10e,f25d92fad0d3bef8daf63481d89c3aa86b96d706..9fefdbe2566e60d74d90a4e02280f97d5d547e8f
@@@ -242,10 -189,10 +204,10 @@@ defmodule Pleroma.Web.Salmon d
          |> :xmerl.export_simple(:xmerl_xml)
          |> to_string
  
-       {:ok, private, _} = keys_from_pem(keys)
+       {:ok, private, _} = Keys.keys_from_pem(keys)
        {:ok, feed} = encode(private, feed)
  
 -      remote_users = remote_users(activity)
 +      remote_users = remote_users(user, activity)
  
        salmon_urls = Enum.map(remote_users, & &1.info.salmon)
        reachable_urls_metadata = Instances.filter_reachable(salmon_urls)