Use info.fields instead of source_data for remote users
This commit is contained in:
parent
2c35d4b0b0
commit
f7bbf99caa
10 changed files with 91 additions and 39 deletions
|
|
@ -305,7 +305,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
|
|||
user = insert(:user)
|
||||
|
||||
fields = [
|
||||
%{"name" => "<b>foo<b>", "value" => "<i>bar</i>"},
|
||||
%{"name" => "<a href=\"http://google.com\">foo</a>", "value" => "<script>bar</script>"},
|
||||
%{"name" => "link", "value" => "cofe.io"}
|
||||
]
|
||||
|
||||
|
|
@ -316,12 +316,15 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
|
|||
|> json_response(200)
|
||||
|
||||
assert account["fields"] == [
|
||||
%{"name" => "<b>foo<b>", "value" => "<i>bar</i>"},
|
||||
%{"name" => "foo", "value" => "bar"},
|
||||
%{"name" => "link", "value" => "<a href=\"http://cofe.io\">cofe.io</a>"}
|
||||
]
|
||||
|
||||
assert account["source"]["fields"] == [
|
||||
%{"name" => "<b>foo<b>", "value" => "<i>bar</i>"},
|
||||
%{
|
||||
"name" => "<a href=\"http://google.com\">foo</a>",
|
||||
"value" => "<script>bar</script>"
|
||||
},
|
||||
%{"name" => "link", "value" => "cofe.io"}
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue