From: Egor Kislitsyn Date: Fri, 24 May 2019 14:05:57 +0000 (+0700) Subject: Merge remote-tracking branch 'pleroma/develop' into feature/addressable-lists X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=f333041a0a2b9c2f1ef2236254b8dd3e9a55a688;p=akkoma Merge remote-tracking branch 'pleroma/develop' into feature/addressable-lists --- f333041a0a2b9c2f1ef2236254b8dd3e9a55a688 diff --cc CHANGELOG.md index c9f8ee5ab,7869e299b..b8907a23f --- a/CHANGELOG.md +++ b/CHANGELOG.md @@@ -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 diff --cc lib/pleroma/web/activity_pub/activity_pub.ex index 8a5b3b8b4,aa0229db7..48aaabe94 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@@ -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) diff --cc lib/pleroma/web/common_api/common_api.ex index a08075bc2,5a312d673..e8199200e --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@@ -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 <- diff --cc lib/pleroma/web/salmon/salmon.ex index 80c3a3190,f25d92fad..9fefdbe25 --- a/lib/pleroma/web/salmon/salmon.ex +++ b/lib/pleroma/web/salmon/salmon.ex @@@ -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)