mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-22 10:07:29 -06:00
[feature] Enable federation in/out of profile PropertyValue fields (#1722)
Co-authored-by: kim <grufwub@gmail.com> Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>
This commit is contained in:
parent
cbb9e2d3f0
commit
0e29f1f5bb
180 changed files with 9278 additions and 1550 deletions
|
|
@ -32,6 +32,7 @@ import (
|
|||
"github.com/superseriousbusiness/activity/pub"
|
||||
"github.com/superseriousbusiness/activity/streams"
|
||||
"github.com/superseriousbusiness/activity/streams/vocab"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/ap"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/api/activitypub/users"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
|
|
@ -76,7 +77,7 @@ func (suite *InboxPostTestSuite) TestPostBlock() {
|
|||
targetURI := testrig.URLMustParse(blockedAccount.InboxURI)
|
||||
|
||||
signature, digestHeader, dateHeader := testrig.GetSignatureForActivity(block, blockingAccount.PublicKeyURI, blockingAccount.PrivateKey, targetURI)
|
||||
bodyI, err := streams.Serialize(block)
|
||||
bodyI, err := ap.Serialize(block)
|
||||
suite.NoError(err)
|
||||
|
||||
bodyJson, err := json.Marshal(bodyI)
|
||||
|
|
@ -177,7 +178,7 @@ func (suite *InboxPostTestSuite) TestPostUnblock() {
|
|||
targetURI := testrig.URLMustParse(blockedAccount.InboxURI)
|
||||
|
||||
signature, digestHeader, dateHeader := testrig.GetSignatureForActivity(undo, blockingAccount.PublicKeyURI, blockingAccount.PrivateKey, targetURI)
|
||||
bodyI, err := streams.Serialize(undo)
|
||||
bodyI, err := ap.Serialize(undo)
|
||||
suite.NoError(err)
|
||||
|
||||
bodyJson, err := json.Marshal(bodyI)
|
||||
|
|
@ -275,7 +276,7 @@ func (suite *InboxPostTestSuite) TestPostUpdate() {
|
|||
targetURI := testrig.URLMustParse(receivingAccount.InboxURI)
|
||||
|
||||
signature, digestHeader, dateHeader := testrig.GetSignatureForActivity(update, updatedAccount.PublicKeyURI, updatedAccount.PrivateKey, targetURI)
|
||||
bodyI, err := streams.Serialize(update)
|
||||
bodyI, err := ap.Serialize(update)
|
||||
suite.NoError(err)
|
||||
|
||||
bodyJson, err := json.Marshal(bodyI)
|
||||
|
|
@ -412,7 +413,7 @@ func (suite *InboxPostTestSuite) TestPostDelete() {
|
|||
targetURI := testrig.URLMustParse(receivingAccount.InboxURI)
|
||||
|
||||
signature, digestHeader, dateHeader := testrig.GetSignatureForActivity(delete, deletedAccount.PublicKeyURI, deletedAccount.PrivateKey, targetURI)
|
||||
bodyI, err := streams.Serialize(delete)
|
||||
bodyI, err := ap.Serialize(delete)
|
||||
suite.NoError(err)
|
||||
|
||||
bodyJson, err := json.Marshal(bodyI)
|
||||
|
|
|
|||
|
|
@ -224,7 +224,18 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() {
|
|||
"statuses_count": 7,
|
||||
"last_status_at": "2021-10-20T10:40:37.000Z",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"fields": [
|
||||
{
|
||||
"name": "should you follow me?",
|
||||
"value": "maybe!",
|
||||
"verified_at": null
|
||||
},
|
||||
{
|
||||
"name": "age",
|
||||
"value": "120",
|
||||
"verified_at": null
|
||||
}
|
||||
],
|
||||
"role": {
|
||||
"name": "user"
|
||||
}
|
||||
|
|
@ -374,7 +385,18 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() {
|
|||
"statuses_count": 7,
|
||||
"last_status_at": "2021-10-20T10:40:37.000Z",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"fields": [
|
||||
{
|
||||
"name": "should you follow me?",
|
||||
"value": "maybe!",
|
||||
"verified_at": null
|
||||
},
|
||||
{
|
||||
"name": "age",
|
||||
"value": "120",
|
||||
"verified_at": null
|
||||
}
|
||||
],
|
||||
"role": {
|
||||
"name": "user"
|
||||
}
|
||||
|
|
@ -575,7 +597,18 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() {
|
|||
"statuses_count": 7,
|
||||
"last_status_at": "2021-10-20T10:40:37.000Z",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"fields": [
|
||||
{
|
||||
"name": "should you follow me?",
|
||||
"value": "maybe!",
|
||||
"verified_at": null
|
||||
},
|
||||
{
|
||||
"name": "age",
|
||||
"value": "120",
|
||||
"verified_at": null
|
||||
}
|
||||
],
|
||||
"role": {
|
||||
"name": "user"
|
||||
}
|
||||
|
|
@ -776,7 +809,18 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() {
|
|||
"statuses_count": 7,
|
||||
"last_status_at": "2021-10-20T10:40:37.000Z",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"fields": [
|
||||
{
|
||||
"name": "should you follow me?",
|
||||
"value": "maybe!",
|
||||
"verified_at": null
|
||||
},
|
||||
{
|
||||
"name": "age",
|
||||
"value": "120",
|
||||
"verified_at": null
|
||||
}
|
||||
],
|
||||
"role": {
|
||||
"name": "user"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,5 +29,5 @@ type Field struct {
|
|||
Value string `json:"value"`
|
||||
// If this field has been verified, when did this occur? (ISO 8601 Datetime).
|
||||
// example: 2021-07-30T09:20:25+00:00
|
||||
VerifiedAt string `json:"verified_at,omitempty"`
|
||||
VerifiedAt *string `json:"verified_at"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue