mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 16:22:24 -05:00
[feature] Federate interaction policies + Accepts; enforce policies (#3138)
* [feature] Federate interaction policies + Accepts; enforce policies * use Acceptable type * fix index * remove appendIRIStrs * add GetAccept federatingdb function * lock on object IRI
This commit is contained in:
parent
f8d399cf6a
commit
8ab2b19a94
42 changed files with 3541 additions and 254 deletions
|
|
@ -37,7 +37,7 @@ import (
|
|||
// - OrderedCollection: 'orderedItems' property will always be made into an array.
|
||||
// - OrderedCollectionPage: 'orderedItems' property will always be made into an array.
|
||||
// - Any Accountable type: 'attachment' property will always be made into an array.
|
||||
// - Any Statusable type: 'attachment' property will always be made into an array; 'content' and 'contentMap' will be normalized.
|
||||
// - Any Statusable type: 'attachment' property will always be made into an array; 'content', 'contentMap', and 'interactionPolicy' will be normalized.
|
||||
// - Any Activityable type: any 'object's set on an activity will be custom serialized as above.
|
||||
func Serialize(t vocab.Type) (m map[string]interface{}, e error) {
|
||||
switch tn := t.GetTypeName(); {
|
||||
|
|
@ -153,6 +153,7 @@ func serializeStatusable(t vocab.Type, includeContext bool) (map[string]interfac
|
|||
|
||||
NormalizeOutgoingAttachmentProp(statusable, data)
|
||||
NormalizeOutgoingContentProp(statusable, data)
|
||||
NormalizeOutgoingInteractionPolicyProp(statusable, data)
|
||||
|
||||
return data, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue