洪 民憙 (Hong Minhee) :nonbinary:'s avatar
洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social

So, an interesting issue came up in the repo that I've been thinking about: #629.

You know how every server uses schema:PropertyValue in actor attachment for profile metadata fields (like “Website”, “GitHub”, etc.)? Turns out, strict validators like browser.pub reject it, because the AS2 spec says attachment should only contain Object or Link—and PropertyValue is a schema.org type, not an Activity Streams 2.0 type.

The thing is, we can't just drop the type like we did with Endpoints (#576), because Mastodon and others rely on seeing "type": "PropertyValue" to render profile fields. But at the same time, it's technically not spec-compliant.

I'm leaning towards writing a to formalize this existing practice rather than trying to invent a new type (like toot:PropertyValue extending Object), which would be a nightmare to migrate across the whole fediverse.

What do you all think? Has anyone else run into this? Would love to hear thoughts from implementers and spec folks.

🫧 socialcoding..'s avatar
🫧 socialcoding..

@smallcircles@social.coop · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee

Something to cc @trwnh and @evan on. And @steve who wrote an ontology for the `toot` namespace (is this elsewhere defined differently?) ..

github.com/steve-bate/activity

Options:

- Break spec compliance with a pragmatic FEP hack. Acknowledging that the installed base creates the protocol and/or app (as the delineation is unclear) specs on-the-fly i.e. by means of follow the leader post-facto interoperability.

- Create a type that extends `Object`. What is the best-practice here? In what ways is this done already?

- Go multi-type, type property as a set. There are examples in AS2 specs, but it is unclear to me and I think never clearly defined how this works. Plus multi-type isn't widely supported on fedi either atm, I think.

For last option see e.g. Example 103 in AS2 Vocab spec:

`"type": ["Activity", "http://www.verbs.example/Check"]`

In this example btw, the "result" property, defined as Object or Link is of type "http://www.types.example/flightstatus"

Steve Bate's avatar
Steve Bate

@steve@social.technoetic.com · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee Lots of interesting issues here. (Note that the schema.org JSON-LD namespace for PropertyValue is incorrect too.) I think brower.pub is arguably being too strict. One must be careful to think about AS2 like data types in a strongly-type programming language. Mastodon could document that PropertyValue is an "extension type" of Object. Implicitly, it is anyway. The type property for an Object is optional and so are all the rest of the properties. A {} is a valid Object.