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.
This commit is contained in:
parent
d31bbb1cfe
commit
0c2a0e3551
3 changed files with 28 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
|
|||
fields: [],
|
||||
source: %{
|
||||
note: "",
|
||||
privacy: "public",
|
||||
privacy: user_info.default_scope,
|
||||
sensitive: "false"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue