Renamed Source to AccountSource

pull/97/head
buckket 2019-05-14 04:21:14 +02:00 committed by mattn
parent 68ca31fccd
commit 636b33ad1c
2 changed files with 4 additions and 4 deletions

View File

@ -39,8 +39,8 @@ type Field struct {
VerifiedAt time.Time `json:"verified_at"` VerifiedAt time.Time `json:"verified_at"`
} }
// Source is a Mastodon account profile field // AccountSource is a Mastodon account profile field.
type Source struct { type AccountSource struct {
Privacy string `json:"privacy"` Privacy string `json:"privacy"`
Sensitive *bool `json:"sensitive"` Sensitive *bool `json:"sensitive"`
Language string `json:"language"` Language string `json:"language"`
@ -76,7 +76,7 @@ type Profile struct {
Note *string Note *string
Locked *bool Locked *bool
Fields *[]Field Fields *[]Field
Source *Source Source *AccountSource
// Set the base64 encoded character string of the image. // Set the base64 encoded character string of the image.
Avatar string Avatar string

View File

@ -96,7 +96,7 @@ func TestAccountUpdate(t *testing.T) {
} }
tbool := true tbool := true
fields := []Field{{"foo", "bar", time.Time{}}, {"dum", "baz", time.Time{}}} fields := []Field{{"foo", "bar", time.Time{}}, {"dum", "baz", time.Time{}}}
source := Source{Language: "de", Privacy: "public", Sensitive: &tbool} source := AccountSource{Language: "de", Privacy: "public", Sensitive: &tbool}
a, err := client.AccountUpdate(context.Background(), &Profile{ a, err := client.AccountUpdate(context.Background(), &Profile{
DisplayName: String("display_name"), DisplayName: String("display_name"),
Note: String("note"), Note: String("note"),