Open BenLubar opened 5 years ago
Thanks a ton for diving into this.
I'll try to get the JSON-LD written up and everything generated in the near future. :)
as:alsoKnownAs
- Actor IRI(s). Basically a soft version of movedTo that includes all accounts this account claims to be the same user as. Non-directional, unlike movedTo.
The documentation should include the disclaimer that a client is expected to verify bidirectionality of alsoKnownAs relationships, and reject / ignore them if the other entity is retrievable and supports AKA, but does not have this entity in the list.
https://www.w3.org/wiki/Activity_Streams_extensions#Proposed_extensions
How do we want to implement these? (Mostly not sure what the id
should be)
@riking where is alsoKnownAs defined? I can't find anything on w3.org that seems related, and there are only a few results.
movedTo seems to only be referenced here: https://www.w3.org/wiki/SocialCG/2017-11-22/minutes#movedTo
Hey @BenLubar
I got your latest PR merged. Is there more work to be done on this topic? Is there anything I can do to help?
Hey @BenLubar! Friendly bump, I'd like to cut v1.0.0 soon and would like to know your thoughts on the last missing entries in your OP.
Just a FYI: There is an ongoing discussion on SocialHub about as:alsoKnownAs
that may impact how to treat this / where it fits:
@rhiaro wrote:
Over in the Decentralized Identifiers (DID) W3C Working Group, we noticed that Mastodon uses the property
alsoKnownAs
(docs ) for account migration. It’s implemented as though it’s part of the ActivityStreams 2.0 vocabulary although it isn’t actually in there. We also want a property like this for DIDs. In the interest of not duplicating work and to help make Mastodon’s use of the term ‘legit’ we were hoping to agree on a formal definition ofalsoKnownAs
(which we can publish in the DID Core specification which is on track to become a W3C REC this year) and then add it properly as an ActivityStreams 2.0 extension (via a SocialCG resolution).
Thanks for the ping @aschrijver! We have a draft of the alsoKnownAs
definition in the DID Core spec editor's draft (this can still be tweaked, we want to make sure the broader community are happy with it). The next step is to get it added as an AS2 extension. There's no real process for that, but I've made a PR on the AS2 namespace and hope to convene a SocialCG meeting to see if there's agreement to add it. I'd suggest a similar process for other AS2-but-not-really-in-AS2-yet terms on the list - ie, define them in a spec-lookin' document somewhere, then propose addition as extension.
I will try to work w/ Mastodon folks to get a more solid schema definition for the missing entries in the OP, as I'd like for go-fed to support all of these.
just a ping to @redaktor
Did mastodon reply to you yet? Helpless with images from mastodon …
1)
Can anyone explain toot:focalPoint
?
2-element array of numbers between 0 and 1 inclusive (x and y coordinates)
Does it apply to the Profile banner too ? Why is the banner cropped already and not like the user makes it ? Are we now all forced to use the aspectRatio of 9.6 : 3 in our software ?
What is “x and y coordinates” meaning ? Does it imply a percentage value ? Since it is positive only, I assume, the starting point is bottom/right ?
2)
What is the sense of toot:blurhash
?
The native CSS blur filter has a global adoption of 96.35% and combined with MS CSS filter >99% …
Personally I am doing a responsive software, calculate different responsive image sizes and also the smallest whole pixel anyway.
Combining the smallest with CSS filter has the same effect.
My concern is performance. I would resize anyway to reduce memory allocations.
The example is const canvas = document.createElement("canvas");
- does it mean I need a headless serverside browser?
3)
Is there any way to apply as:sensitive
to a single image instead to all?
It is the reason why no one of my photojournalist friends join mastodon …
Sorry for the delayed response.
No, they did not get back to me. They did briefly mention they wanted to standardize it though. The will is there, not sure about the time/attention/energy.
Hey everyone! I'm gonna start looking at alsoKnownAs
and manuallyApprovesFollowers
for GoToSocial, because they're things we kinda need in order to federate properly with Masto instances and other software that's accepted those fields as standards.
So I'll mess around a bit with astool
and see if I can get something working :)
Referencing recent discussion on Fediverse about namespaces in Mastodon between @cjslep and @nightpool
Quoting first post:
@Gargron could Mastodon be more rigorous in creating RDF definitions of the arbitrary assortment of properties and types it's pioneered?
For example, for practical reasons I merged this: https://github.com/go-fed/activity/pull/151
But it's not accurate to say "manuallyApprovesFollowers is an ActivityStreams property".
It is why we generally only support a partial vocabulary of the "Mastodon types": https://github.com/go-fed/activity/issues/122
I think i mentioned this to @nightpool before too.
(sub-issue of #121)
I don't know how to write the specific JSON format astool wants, but I'll do the research so whoever can write the JSON can do it more easily:
See
app/lib/activitypub/adapter.rb
in Mastodon for the definition of@context
Mastodon uses.In this context, "the software" refers to what Mastodon does and expects other software to do.
as:
-prefixed types are described only for reference on what Mastodon uses them for.The
toot:
namespace ishttp://joinmastodon.org/ns#
. All other namespaces in this ticket are already used by go-fed.ActivityStreams Actor extensions:
[ ]
as:manuallyApprovesFollowers
- boolean, default false. If set to true, the software displays a lock icon on the user and shows "awaiting approval" rather than immediately showing the follow succeeding on the client side.[ ]
as:movedTo
- Actor IRI, single or none. If set, the software fades out the user's profile and displays the account described by the IRI as the new location for the user. The "follow" button is removed from the user's profile if this field is set.[ ]
as:alsoKnownAs
- Actor IRI(s). Basically a soft version of movedTo that includes all accounts this account claims to be the same user as. Non-directional, unlike movedTo.[x]
toot:featured
- Collection. A list of pinned notes.[x]
toot:discoverable
- boolean, default false. Determines whether a user is shown in the account directory.[x]
tag
- holds Emoji and Hashtag objects.[x]
attachments
- holds PropertyValue and IdentityProof objects.[x]
icon
- used for avatar.[x]
image
- used for header image.ActivityStreams Object types:
as:Hashtag
name
- string. Starts with#
, case insensitivehref
,type
- as usual.toot:Emoji
name
- string. ASCII word characters only.:someword:
andsomeword
are treated as identical. The described emoji will replace the text version of the emoji in object content with an image.icon
- ActivityStreams Image. Requires at leasturl
to be set.updated
- as usual.schema:PropertyValue
name
- as usual.value
- string. HTML allowed.toot:IdentityProof
signatureAlgorithm
- string. provider name.name
- string. username on provider.signatureValue
- string. provider-specific format.ActivityStreams Note (status) extensions:
[ ]
as:sensitive
- boolean, default false. Determines whether media attachments should be hidden by default.[ ]
ostatus:atomUri
- IRI. Generally the same asid
.[ ]
ostatus:inReplyToAtomUri
- IRI. Generally the same asinReplyTo
.[ ]
ostatus:conversation
- URI (Mastodon does not use resolvable URLs, instead using things liketag:lubar.me,2019-10-12:objectId=6708028:objectType=Conversation
). Copy from post being replied to as-is.[x]
tag
- holds Mention, Hashtag, and Emoji objects.[x]
summary
- holds content warning.ActivityStreams Question (poll status) extensions:
All Note extensions, as well as:
[x]
as:attachment
- must be empty if present.[x]
toot:votersCount
- integer. The number of unique responses. (This counts people rather than votes, which is important for multiple-choice polls.)[x]
anyOf
ORoneOf
- poll options. Exactly one of these must be present. anyOf is used for multiple-choice polls, and oneOf is used for single-choice polls. Each option consists of a Note object with the following fields:name
- string. option text.replies
- Collection. only thetotalItems
field is present, representing the number of votes for this option.ActivityStreams Document (media attachment) extensions:
[ ]
toot:focalPoint
- 2-element array of numbers between 0 and 1 inclusive (x and y coordinates)[x]
toot:blurhash
- string. See https://github.com/woltapp/blurhash for a list of implementations of the format.[x]
name
- holds alternative text for accessibility. (media description)[x]
mediaType
,url
- as usual.