From: Maksim Pechnikov Date: Tue, 4 Jun 2019 06:49:08 +0000 (+0300) Subject: Merge branch 'develop' into issue/941 X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=4f2e359687b8866a26130314315415a787678881;p=akkoma Merge branch 'develop' into issue/941 --- 4f2e359687b8866a26130314315415a787678881 diff --cc CHANGELOG.md index 419dcf3b7,8586ea8a0..2fa9bd1e7 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@@ -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 diff --cc docs/api/differences_in_mastoapi_responses.md index ed156836d,21c1b76e5..88a43de38 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@@ -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 lib/pleroma/user/info.ex index d1fb4fe75,fb9ab92ab..08e43ff0f --- a/lib/pleroma/user/info.ex +++ b/lib/pleroma/user/info.ex @@@ -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? @@@ -211,7 -220,7 +222,8 @@@ :hide_favorites, :background, :show_role, - :skip_thread_containment ++ :skip_thread_containment, + :pleroma_settings_store ]) end diff --cc lib/pleroma/web/twitter_api/views/user_view.ex index 84875613a,550f35f5f..8d8892068 --- a/lib/pleroma/web/twitter_api/views/user_view.ex +++ b/lib/pleroma/web/twitter_api/views/user_view.ex @@@ -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)