Merge branch 'develop' into issue/941
authorMaksim Pechnikov <parallel588@gmail.com>
Tue, 4 Jun 2019 06:49:08 +0000 (09:49 +0300)
committerMaksim Pechnikov <parallel588@gmail.com>
Tue, 4 Jun 2019 06:49:08 +0000 (09:49 +0300)
12 files changed:
1  2 
CHANGELOG.md
config/config.exs
docs/api/differences_in_mastoapi_responses.md
docs/config.md
lib/pleroma/user/info.ex
lib/pleroma/web/activity_pub/activity_pub.ex
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
lib/pleroma/web/mastodon_api/views/account_view.ex
lib/pleroma/web/twitter_api/views/user_view.ex
test/web/mastodon_api/account_view_test.exs
test/web/mastodon_api/mastodon_api_controller_test.exs
test/web/twitter_api/views/user_view_test.exs

diff --cc CHANGELOG.md
index 419dcf3b7d14ee91d5275071e25255172f8c8d90,8586ea8a0fcf3668cbed0ceb81415f7004c879fd..2fa9bd1e7a14aca8f1439bbccccbc9909039a7cf
@@@ -45,7 -49,7 +49,8 @@@ The format is based on [Keep a Changelo
  - 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`)
+ - MRF: Support for running subchains.
 +- Configuration: `skip_thread_containment` option
  
  ### Changed
  - **Breaking:** Configuration: move from Pleroma.Mailer to Pleroma.Emails.Mailer
Simple merge
index ed156836d6ccc328a73fa205690dd2d3717bb94f,21c1b76e58064ea4f81d490bcb509db7735b6ef2..88a43de383e0f9ccb215a972ca602f70c8ab26b1
@@@ -80,8 -81,15 +81,17 @@@ Additional parameters can be added to t
  - `hide_favorites` - if true, user's favorites timeline will be hidden
  - `show_role` - if true, user's role (e.g admin, moderator) will be exposed to anyone in the API
  - `default_scope` - the scope returned under `privacy` key in Source subentity
+ - `pleroma_settings_store` - Opaque user settings to be saved on the backend.
 +- `skip_thread_containment` - if true, skip filtering out broken threads
  
+ ### Pleroma Settings Store
+ Pleroma has mechanism that allows frontends to save blobs of json for each user on the backend. This can be used to save frontend-specific settings for a user that the backend does not need to know about.
+ The parameter should have a form of `{frontend_name: {...}}`, with `frontend_name` identifying your type of client, e.g. `pleroma_fe`. It will overwrite everything under this property, but will not overwrite other frontend's settings.
+ This information is returned in the `verify_credentials` endpoint.
++>>>>>>> develop
  ## Authentication
  
  *Pleroma supports refreshing tokens.
diff --cc docs/config.md
Simple merge
index d1fb4fe75c6d3f1493d761656535043124c6d321,fb9ab92ab851c0db79339296e9a5bc2d2e6cd058..08e43ff0fb9129e90cf1eceb7a6616207e3a5d1b
@@@ -44,13 -44,17 +44,19 @@@ defmodule Pleroma.User.Info d
      field(:pinned_activities, {:array, :string}, default: [])
      field(:mascot, :map, default: nil)
      field(:emoji, {:array, :map}, default: [])
+     field(:pleroma_settings_store, :map, default: %{})
  
      field(:notification_settings, :map,
-       default: %{"remote" => true, "local" => true, "followers" => true, "follows" => true}
+       default: %{
+         "followers" => true,
+         "follows" => true,
+         "non_follows" => true,
+         "non_followers" => true
+       }
      )
  
 +    field(:skip_thread_containment, :boolean, default: false)
 +
      # Found in the wild
      # ap_id -> Where is this used?
      # bio -> Where is this used?
        :hide_favorites,
        :background,
        :show_role,
-       :skip_thread_containment
++      :skip_thread_containment,
+       :pleroma_settings_store
      ])
    end
  
index 84875613a50f8aa168017eaed64d65c465a7bbc7,550f35f5f796f688213279b3e4400c018813bc49..8d88920685f8cd03dfe37ba72ec10cab932c3a5c
@@@ -118,10 -118,10 +118,11 @@@ defmodule Pleroma.Web.TwitterAPI.UserVi
          "pleroma" =>
            %{
              "confirmation_pending" => user_info.confirmation_pending,
 -            "tags" => user.tags
 +            "tags" => user.tags,
 +            "skip_thread_containment" => user.info.skip_thread_containment
            }
            |> maybe_with_activation_status(user, for_user)
+           |> with_notification_settings(user, for_user)
        }
        |> maybe_with_user_settings(user, for_user)
        |> maybe_with_role(user, for_user)