-
-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Description
When Fedify serializes actor attachment properties containing PropertyValue items (used by Mastodon for profile metadata fields), the resulting JSON-LD uses schema:PropertyValue as the type:
"attachment": [
{
"type": "PropertyValue",
"name": "Website",
"value": "<a href=\"https://example.com\">example.com</a>"
}
]The ActivityPub spec defines attachment as containing AS2 Object or Link types. PropertyValue is a schema.org type (https://schema.org/PropertyValue), not an ActivityStreams type. Strict validators like browser.pub reject this:
/attachment: ❌ Invalid object, Invalid link
/attachment/0/name: ✅ Valid activity property
/attachment/0/name: ✅ Valid xsd:string
/attachment/1/name: ✅ Valid activity property
/attachment/1/name: ✅ Valid xsd:string
/endpoints: ✅ Valid @id
/endpoints: ✅ Valid activity property
/endpoints: ✅ Valid single-value
/endpoints: ❌ Invalid endpoints, unknown properties: type (@type)
/endpoints/type: ❌ Type not found: as:Endpoints
/endpoints/sharedInbox: ✅ Valid @id
/endpoints/sharedInbox: ✅ Valid activity property
/endpoints/sharedInbox: ✅ Valid single-value
/endpoints/sharedInbox: ✅ Valid ordered collection
See the debug view on this page
Context
This is the same class of issue as #576 (Endpoints serializing with invalid as:Endpoints type), but for a different non-AS2 type. The PropertyValue type is used universally across the fediverse (Mastodon, Pleroma, Misskey, etc.) for profile metadata fields, so removing it would break compatibility.
The Dilemma
Unlike Endpoints, this is tricky because:
- Mastodon expects
PropertyValue— removing the type breaks profile field display across the fediverse - AS2 spec says
attachmentshould containObjectorLink—PropertyValueis neither - Every major fediverse server emits
PropertyValue— it's a de facto standard despite not being in the AS2 vocabulary
Questions
- Is this something Fedify could address (perhaps by including the schema.org context so
PropertyValueis properly defined)? - Or is this a browser.pub strictness issue where the validator should accept widely-used extensions like
PropertyValue? - Should
PropertyValuebe treated similarly to how Mastodon'stoot:namespace extensions are handled?
Environment
- Fedify: ^1.10.3 (also affects 2.0)
- Discovered via browser.pub validation of a Fedify-powered ActivityPub server