Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add toot vocabulary #122

Open
22 of 34 tasks
BenLubar opened this issue Oct 12, 2019 · 15 comments
Open
22 of 34 tasks

add toot vocabulary #122

BenLubar opened this issue Oct 12, 2019 · 15 comments
Labels
feature request New request for novel functionality

Comments

@BenLubar
Copy link
Contributor

BenLubar commented Oct 12, 2019

(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 is http://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.

  • toot:featured - Collection. A list of pinned notes.

  • toot:discoverable - boolean, default false. Determines whether a user is shown in the account directory.

  • tag - holds Emoji and Hashtag objects.

  • attachments - holds PropertyValue and IdentityProof objects.

  • icon - used for avatar.

  • image - used for header image.

ActivityStreams Object types:

as:Hashtag

  • name - string. Starts with #, case insensitive
  • href, type - as usual.

toot:Emoji

  • name - string. ASCII word characters only. :someword: and someword 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 least url 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 as id.

  • ostatus:inReplyToAtomUri - IRI. Generally the same as inReplyTo.

  • ostatus:conversation - URI (Mastodon does not use resolvable URLs, instead using things like tag:lubar.me,2019-10-12:objectId=6708028:objectType=Conversation). Copy from post being replied to as-is.

  • tag - holds Mention, Hashtag, and Emoji objects.

  • summary - holds content warning.

ActivityStreams Question (poll status) extensions:

All Note extensions, as well as:

  • as:attachment - must be empty if present.

  • toot:votersCount - integer. The number of unique responses. (This counts people rather than votes, which is important for multiple-choice polls.)

  • anyOf OR oneOf - 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 the totalItems 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)

  • toot:blurhash - string. See https://github.com/woltapp/blurhash for a list of implementations of the format.

  • name - holds alternative text for accessibility. (media description)

  • mediaType, url - as usual.

@cjslep cjslep added the feature request New request for novel functionality label Oct 12, 2019
@cjslep
Copy link
Member

cjslep commented Oct 12, 2019

Thanks a ton for diving into this.

I'll try to get the JSON-LD written up and everything generated in the near future. :)

@riking
Copy link

riking commented Oct 14, 2019

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.

BenLubar added a commit to BenLubar-PR/go-fed-activity that referenced this issue Nov 1, 2019
@BenLubar
Copy link
Contributor Author

BenLubar commented Nov 1, 2019

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)

@BenLubar
Copy link
Contributor Author

BenLubar commented Nov 1, 2019

@riking where is alsoKnownAs defined? I can't find anything on w3.org that seems related, and there are only a few results.

@BenLubar
Copy link
Contributor Author

BenLubar commented Nov 1, 2019

movedTo seems to only be referenced here: https://www.w3.org/wiki/SocialCG/2017-11-22/minutes#movedTo

BenLubar added a commit to BenLubar-PR/go-fed-activity that referenced this issue Dec 4, 2019
@cjslep
Copy link
Member

cjslep commented May 26, 2020

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?

@cjslep
Copy link
Member

cjslep commented Jul 5, 2020

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.

@aschrijver
Copy link

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 of alsoKnownAs (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).

@rhiaro
Copy link

rhiaro commented Oct 1, 2020

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.

@cjslep
Copy link
Member

cjslep commented Oct 16, 2020

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.

@sebilasse
Copy link

just a ping to @redaktor

@sebilasse
Copy link

Did mastodon reply to you yet?
Helpless with images from mastodon …

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 ?

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?

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 …

@cjslep
Copy link
Member

cjslep commented Apr 26, 2021

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.

@tsmethurst
Copy link
Contributor

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 :)

@aschrijver
Copy link

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: #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": #122

I think i mentioned this to @nightpool before too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New request for novel functionality
Projects
None yet
Development

No branches or pull requests

7 participants