Merge branch 'develop' into refactor/notification_settings
authorMark Felder <feld@FreeBSD.org>
Thu, 25 Jun 2020 19:16:28 +0000 (14:16 -0500)
committerMark Felder <feld@FreeBSD.org>
Thu, 25 Jun 2020 19:26:21 +0000 (14:26 -0500)
1  2 
CHANGELOG.md
docs/API/pleroma_api.md
lib/pleroma/notification.ex
test/notification_test.exs
test/web/mastodon_api/views/account_view_test.exs

diff --cc CHANGELOG.md
index fba2366088ea11e786827996da25b5047a289b30,71963d206e7a3bac5ef1e0cbd03c0fd487932383..82915dcfbd5caf2a3b60a76fd2213028e952cf0c
@@@ -6,14 -6,27 +6,30 @@@ The format is based on [Keep a Changelo
  ## [unreleased]
  
  ### Changed
+ - **Breaking:** Elixir >=1.9 is now required (was >= 1.8)
+ - In Conversations, return only direct messages as `last_status`
+ - Using the `only_media` filter on timelines will now exclude reblog media
+ - MFR policy to set global expiration for all local Create activities
+ - OGP rich media parser merged with TwitterCard
+ - Configuration: `:instance, rewrite_policy` moved to `:mrf, policies`, `:instance, :mrf_transparency` moved to `:mrf, :transparency`, `:instance, :mrf_transparency_exclusions` moved to `:mrf, :transparency_exclusions`. Old config namespace is deprecated.
  <details>
    <summary>API Changes</summary>
  - **Breaking:** Emoji API: changed methods and renamed routes.
 +- **Breaking:** Notification Settings API for suppressing notification
 +  now supports the following controls: `from_followers`, `from_following`,
 +  and `from_strangers`.
  </details>
  
+ <details>
+   <summary>Admin API Changes</summary>
+ - Status visibility stats: now can return stats per instance.
+ - Mix task to refresh counter cache (`mix pleroma.refresh_counter_cache`)
+ </details>
  ### Removed
  - **Breaking:** removed `with_move` parameter from notifications timeline.
  
Simple merge
index ca556f0bbc5d4498cd8afbe0b9a6fcd32f88f70e,9ee9606becb9fd9bf779d81b6b72a01c5b4595ac..9d09cf0821020922a2d3b1f5791962a5486d431d
@@@ -459,9 -549,11 +549,10 @@@ defmodule Pleroma.Notification d
    def skip?(%Activity{} = activity, %User{} = user) do
      [
        :self,
 -      :followers,
 -      :follows,
 -      :non_followers,
 -      :non_follows,
+       :invisible,
 +      :from_followers,
 +      :from_following,
 +      :from_strangers,
        :recently_followed
      ]
      |> Enum.find(&skip?(&1, activity, user))
      activity.data["actor"] == user.ap_id
    end
  
+   def skip?(:invisible, %Activity{} = activity, _) do
+     actor = activity.data["actor"]
+     user = User.get_cached_by_ap_id(actor)
+     User.invisible?(user)
+   end
    def skip?(
 -        :followers,
 +        :from_followers,
          %Activity{} = activity,
 -        %User{notification_settings: %{followers: false}} = user
 +        %User{notification_settings: %{from_followers: false}} = user
        ) do
      actor = activity.data["actor"]
      follower = User.get_cached_by_ap_id(actor)
Simple merge