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

change AP as:Hashtag text property key to 'name' #328

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

asdfzdfj
Copy link
Contributor

@asdfzdfj asdfzdfj commented Dec 4, 2023

changed the property of as:Hashtag object that contains tag's label from tag to name to be more consistent with other software

compared to how other software (specifically, mastodon and akkoma) does tags in AP representation, they use name property to put the tag's label in but mbin/kbin was using tag property for some reason, and from what I could see from git blame, it switched between name and tag a few times

@nobodyatroot
Copy link
Member

Is there any concern or impact to Lemmy compatibility with this change or is it irrelevant/not used there?

@asdfzdfj
Copy link
Contributor Author

asdfzdfj commented Dec 5, 2023

Is there any concern or impact to Lemmy compatibility with this change or is it irrelevant/not used there?

doesn't look like lemmy is using hashtags in any way, so this shouldn't cause problems for them. this one is more on the microblog side

generally, as:Hashtag tend to look like this:

{
  "@context": [/* snipped */],
  "type": "Note", 
  "tag": [
    {
      "type": "Hashtag",
      "href": "https://instance.tld/tags/art",
      "name": "#art"
    }
  ]
}

but for some reason, mbin outputs what looks like this, which doesn't line up with other places:

{
  "@context": [/* snipped */],
  "type": "Note", 
  "tag": [
    {
      "type": "Hashtag",
      "href": "https://mbin.instance/tags/art",
      /* v- should be "name" here*/
      "tag": "#art"
    }
  ]
}

changed the property of as:Hashtag object that contains tag's label from
`tag` to `name`

compared to how other (specifically, mastodon and akkoma) does tags in
AP representation, they uses `name` property to put the tag's label in
but mbin/kbin was using `tag` property for some reason, and from what I
could see from git blame, it switched between `name` and `tag` a few times
@asdfzdfj asdfzdfj merged commit d8207ba into MbinOrg:main Dec 5, 2023
7 checks passed
@melroy89 melroy89 added enhancement New feature or request activitypub ActivityPub related issues labels Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub ActivityPub related issues enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants