- Admin API: Added moderation log
- Web response cache (currently, enabled for ActivityPub)
- Mastodon API: Added an endpoint to get multiple statuses by IDs (`GET /api/v1/statuses/?ids[]=1&ids[]=2`)
+- ActivityPub: Add ActivityPub actor's `discoverable` parameter.
### Changed
- Configuration: Filter.AnonymizeFilename added ability to retain file extension with custom text
field(:pleroma_settings_store, :map, default: %{})
field(:fields, {:array, :map}, default: nil)
field(:raw_fields, {:array, :map}, default: [])
+ field(:discoverable, :boolean, default: false)
field(:notification_settings, :map,
default: %{
:hide_follows_count,
:follower_count,
:fields,
- :following_count
+ :following_count,
+ :discoverable
])
|> validate_fields(true)
end
:hide_follows,
:fields,
:hide_followers,
+ :discoverable,
:hide_followers_count,
:hide_follows_count
])
:skip_thread_containment,
:fields,
:raw_fields,
- :pleroma_settings_store
+ :pleroma_settings_store,
+ :discoverable
])
|> validate_fields()
end
locked = data["manuallyApprovesFollowers"] || false
data = Transmogrifier.maybe_fix_user_object(data)
+ discoverable = data["discoverable"] || false
user_data = %{
ap_id: data["id"],
source_data: data,
banner: banner,
fields: fields,
- locked: locked
+ locked: locked,
+ discoverable: discoverable
},
avatar: avatar,
name: data["name"],
},
"endpoints" => endpoints,
"attachment" => fields,
- "tag" => (user.info.source_data["tag"] || []) ++ emoji_tags
+ "tag" => (user.info.source_data["tag"] || []) ++ emoji_tags,
+ "discoverable" => user.info.discoverable
}
|> Map.merge(maybe_make_image(&User.avatar_url/2, "icon", user))
|> Map.merge(maybe_make_image(&User.banner_url/2, "image", user))
:hide_follows,
:hide_favorites,
:show_role,
- :skip_thread_containment
+ :skip_thread_containment,
+ :discoverable
]
|> Enum.reduce(%{}, fn key, acc ->
add_if_present(acc, params, to_string(key), key, fn value ->
bio = HTML.filter_tags(user.bio, User.html_filter_policy(opts[:for]))
relationship = render("relationship.json", %{user: opts[:for], target: user})
+ discoverable = user.info.discoverable
+
%{
id: to_string(user.id),
username: username_from_nickname(user.nickname),
note: HTML.strip_tags((user.bio || "") |> String.replace("<br>", "\n")),
sensitive: false,
fields: raw_fields,
- pleroma: %{}
+ pleroma: %{
+ discoverable: discoverable
+ }
},
# Pleroma extension
"@id": "ostatus:conversation",
"@type": "@id"
},
+ "discoverable": "toot:discoverable",
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
"ostatus": "http://ostatus.org#",
"schema": "http://schema.org",
source: %{
note: "valid html",
sensitive: false,
- pleroma: %{},
+ pleroma: %{
+ discoverable: false
+ },
fields: []
},
pleroma: %{
source: %{
note: user.bio,
sensitive: false,
- pleroma: %{},
+ pleroma: %{
+ discoverable: false
+ },
fields: []
},
pleroma: %{
source: %{
note: user.bio,
sensitive: false,
- pleroma: %{},
+ pleroma: %{
+ discoverable: false
+ },
fields: []
},
pleroma: %{