mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 12:37:30 -06:00
Manually approves followers (#146)
* update go-fed * update go-fed * manuallyapprovesfollowers * serialize manuallyApprovesFollowers
This commit is contained in:
parent
4920229a3b
commit
071eca20ce
44 changed files with 931 additions and 308 deletions
|
|
@ -1274,6 +1274,7 @@ func NewTestFediPeople() map[string]ap.Accountable {
|
|||
"image/jpeg",
|
||||
URLMustParse("https://unknown-instance.com/media/some_header_filename.jpeg"),
|
||||
"image/png",
|
||||
false,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
|
@ -1416,7 +1417,8 @@ func newPerson(
|
|||
avatarURL *url.URL,
|
||||
avatarContentType string,
|
||||
headerURL *url.URL,
|
||||
headerContentType string) ap.Accountable {
|
||||
headerContentType string,
|
||||
manuallyApprovesFollowers bool) ap.Accountable {
|
||||
person := streams.NewActivityStreamsPerson()
|
||||
|
||||
// id should be the activitypub URI of this user
|
||||
|
|
@ -1489,8 +1491,9 @@ func newPerson(
|
|||
person.SetActivityStreamsUrl(urlProp)
|
||||
|
||||
// manuallyApprovesFollowers
|
||||
// Will be shown as a locked account.
|
||||
// TODO: NOT IMPLEMENTED **YET** -- this needs to be added as an activitypub extension to https://github.com/go-fed/activity, see https://github.com/go-fed/activity/tree/master/astool
|
||||
manuallyApprovesFollowersProp := streams.NewActivityStreamsManuallyApprovesFollowersProperty()
|
||||
manuallyApprovesFollowersProp.Set(manuallyApprovesFollowers)
|
||||
person.SetActivityStreamsManuallyApprovesFollowers(manuallyApprovesFollowersProp)
|
||||
|
||||
// discoverable
|
||||
// Will be shown in the profile directory.
|
||||
|
|
@ -1575,6 +1578,7 @@ func newPerson(
|
|||
headerURLProperty.AppendIRI(headerURL)
|
||||
headerImage.SetActivityStreamsUrl(headerURLProperty)
|
||||
headerProperty.AppendActivityStreamsImage(headerImage)
|
||||
person.SetActivityStreamsImage(headerProperty)
|
||||
|
||||
return person
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue