Email or username:

Password:

Forgot your password?
Top-level
infinite love ⴳ

@ta180m @caesar type arrays aren't in the ap spec, they're in the json-ld spec, it should be supported (but isn't)

the file you wanna look at github.com/mastodon/mastodon/b

14 comments

@trwnh @caesar Ah interesting. Sometimes it doesn't even matter what the AP spec says, but actually what servers do in practice, and I haven't seen any AP implementation ever that supports type arrays.

I'll take a look at the Mastodon code later and submit a PR, since for now we are focusing on Gitea<->Gitea federation.

smallcircles (Humane Tech Now)

@ta180m @trwnh @caesar

Type arrays aren't explicitly mentioned in #ActivityPub spec, but they are in #ActivityStreams in a bunch of examples.

For instance "Object that is both a Place and a Location"

w3.org/TR/activitystreams-core

Or in the text stating that vCard should be used to extend an Actor.

w3.org/TR/activitystreams-core

Most elaborate example is:

w3.org/TR/activitystreams-core

Supporting a type array is spec conformant. Not supporting it is a shortcoming of the impl.

@ta180m @trwnh @caesar

Type arrays aren't explicitly mentioned in #ActivityPub spec, but they are in #ActivityStreams in a bunch of examples.

For instance "Object that is both a Place and a Location"

w3.org/TR/activitystreams-core

Or in the text stating that vCard should be used to extend an Actor.

replied to smallcircles (Humane Tech Now)

@humanetech @trwnh @caesar Ah, interesting, so it is in the spec.

In that case, the real problem is that existing AP software don't support type arrays, so if we used the solution of type arrays, we'd also have to send PRs to Mastodon and the others.

infinite love ⴳ replied to

@ta180m @humanetech @caesar the PRs should probably happen anyway, but the type array isn't strictly necessary IMO because marking a Ticket additionally as a Note doesn't really provide any additional benefit, does it? Multi-type stuff is useful mostly for multiple vocabs/contexts.

replied to infinite love ⴳ

@trwnh @humanetech @caesar Yeah, type arrays were just an alternate solution we thought of, but for now we're going to go with sending Mastodon a PR to run the conversion logic on all types instead of just the few hardcoded ones.

marius

@ta180m

Go activitypub will support types as arrays at some point. I'm not entirely sure of how the API will look, but it will be there in some form.

In my opinion, providing a "fallback" type for certain objects can be good for interoperability with other services. Eg, an "Issue" object can have a fallback as a "Note" where a random mastodon instance will show just its text content, and minimize breakage. (if mastodon would accept array types that is :D)

@trwnh @caesar

infinite love ⴳ replied to marius

@mariusor @ta180m @caesar mastodon already has "fallback" logic for using the `context` as status text if available, and `name` if not, combined with `url`

the problem is that this fallback logic is only applied to specific types -- for whatever reason, it doesn't get applied if the type is unrecognized. imo this is a bug that should be fixed

mike replied to marius
From my recollection the the spec recommends that the first element be a common type if you are able to provide that rendering. The second one can then provide custom or implementation specific variations. If we can't display 'Blob' we're not even going to try to render a [ 'Blob', 'Note' ]. But we'll happily render a ['Note','Blob']. Anyhow that's how I interpreted it. I think we'll store and forward it regardless.
Sebastian Lasse

@trwnh @ta180m @caesar

Sorry (!) people for getting angry but this is major important and it is driving me nuts:
#ActivityPub #ActivityStreams
ANYTHING which is not “functional” IS an ARRAY BY DEFAULT !
The spec. ALSO says superclear:

“Properties marked as being "Functional" can have only one value. Items not marked as "Functional" can have multiple values.”
(How can anyone understand this sentence wrong ?)

This is anywhere in the Linked Data World, it is explicitly in the JSON-LD spec. and ActivityPub is JSON-LD.
You would really destroy a world if “type” is not an Array!
ActivityPub can't work then. Never.
The same is for RDF and the knowledge of the world.

Personally building an AP thing for Europes largest publishing house. It speaks IPTC, rNews, wikipedia and other friends
redaktor.github.io/vocab/index
and for the World's Newspapers it is common that 1 Article has maybe 5 types describing _what it is_ !

This is really superimportant to deal with different softwares and worlds !!!
1/2

/ @humanetech

@trwnh @ta180m @caesar

Sorry (!) people for getting angry but this is major important and it is driving me nuts:
#ActivityPub #ActivityStreams
ANYTHING which is not “functional” IS an ARRAY BY DEFAULT !
The spec. ALSO says superclear:

“Properties marked as being "Functional" can have only one value. Items not marked as "Functional" can have multiple values.”
(How can anyone understand this sentence wrong ?)

Sebastian Lasse

@trwnh @ta180m @caesar @humanetech

It should be pretty clear that anyone who is not supporting it, is trying to build on complete different standards.
Maybe to create a monopoly? I do not know and I am not interested.

I can only say that the Social CG will specify AS3 one day which is why we meet each 1st TUE a month. Currently, after co-organising both conferences, I can only _invite_ anyone to write Proposals for FediCamp 2022 socialhub.activitypub.rocks/t/

This is the next thing where the Community meets and such sessions would be helpful.

I will ask if we can get this sentence as a “bold h1“:

> Properties marked as being "Functional" can have only one value. Items not marked as "Functional" can have multiple values.

@trwnh @ta180m @caesar @humanetech

It should be pretty clear that anyone who is not supporting it, is trying to build on complete different standards.
Maybe to create a monopoly? I do not know and I am not interested.

I can only say that the Social CG will specify AS3 one day which is why we meet each 1st TUE a month. Currently, after co-organising both conferences, I can only _invite_ anyone to write Proposals for FediCamp 2022 socialhub.activitypub.rocks/t/

Sebastian Lasse replied to Sebastian

@trwnh @ta180m @caesar @humanetech

addendum;
the sentence is in the AS spec. as well, see
w3.org/TR/activitystreams-voca
Should be bold.

PS
Re. the Ontology, it is a Work In Progress w. bugs but any properties which have “blue icons” are Arrays and just the grey are not.

Sebastian Lasse

@trwnh @ta180m @caesar @humanetech

I just wonder where these misconceptions come from.
I mean, apart from the AP spec.:

- "id" in AP is only an Alias for JSON-LD's "@id"

- "type" in AP is only an Alias for JSON-LD's "@type"

So, "id" must be 1 URI and "type" must be a Set (or unique Array).

The idea behind that was _just_ to make it easier for JS users cause old ES versions didn't allow "@" for dot notations, see Mathias' nice tool mothereff.in/js-properties#@ty

Go Up