aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWill Pearson <uiri00@gmail.com>2018-08-31 20:59:43 -0700
committerWill Pearson <uiri00@gmail.com>2018-08-31 21:04:46 -0700
commit0c2a0e3551f26bff8fa6161356ddcefb791baccf (patch)
tree32863cd983a8d687ee7044e25d142d20ddff6ab3 /lib
parentd31bbb1cfe04ca6073a322bcf77239e7d4b79839 (diff)
downloadpleroma-0c2a0e3551f26bff8fa6161356ddcefb791baccf.tar.gz
Specify default scope in verify_credentials
Certain Mastodon/Pleroma front ends call verify_credentials to get the default scope of a new toot. Currently, Pleroma hardcodes this value to "public". This patch changes it to the user's default_scope value.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/user.ex3
-rw-r--r--lib/pleroma/web/mastodon_api/views/account_view.ex2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index fca490cb1..64c69b209 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -68,7 +68,8 @@ defmodule Pleroma.User do
following_count: length(user.following) - oneself,
note_count: user.info["note_count"] || 0,
follower_count: user.info["follower_count"] || 0,
- locked: user.info["locked"] || false
+ locked: user.info["locked"] || false,
+ default_scope: user.info["default_scope"] || "public"
}
end
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex
index 133cae3b5..7bc32e688 100644
--- a/lib/pleroma/web/mastodon_api/views/account_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/account_view.ex
@@ -46,7 +46,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
fields: [],
source: %{
note: "",
- privacy: "public",
+ privacy: user_info.default_scope,
sensitive: "false"
}
}