-
Notifications
You must be signed in to change notification settings - Fork 44
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
Handle Hubzilla Like
s better
#941
Comments
HTML from https://ap.brid.gy/convert/web/https://authorship.studio/activity/143b8b1d-0bf8-46ab-b0bf-065e689120cd : <article class="h-entry">
<span class="p-uid">https://ap.brid.gy/convert/web/https://authorship.studio/activity/143b8b1d-0bf8-46ab-b0bf-065e689120cd</span>
<time class="dt-published" datetime="2024-04-07T16:31:35+00:00">2024-04-07T16:31:35+00:00</time>
<span class="p-author h-card">
<data class="p-uid" value="https://authorship.studio/channel/scott"></data>
<a class="p-name u-url" href="https://authorship.studio/channel/scott">Scott M. Stolz</a>
<span class="p-nickname">scott</span>
<img class="u-photo" src="https://authorship.studio/photo/profile/l/4?rev=1701617226" alt="" />
<img class="u-photo" src="https://authorship.studio/photo/72d44b5e-3c8e-414f-965b-70f2c0da81ec-7" alt="" />
</span>
<div class="e-content p-name">
Likes <a href="https://snarfed.org/2024-04-07_52743">a post</a> by <span class="h-card">
<data class="p-uid" value="https://snarfed.org/"></data>
<a class="u-url" href="https://snarfed.org/">snarfed.org</a>
</span>
One of our cats purrs so loudly that it’s a running joke in our family. It makes her fur vibrate. We have to turn the TV volume up when she sits with us. Once, she was in another room, and I heard her purr through the wall. No joke.
</div>
<a class="u-in-reply-to" href="https://snarfed.org/2024-04-07_52743"></a>
<article class="u-like-of h-cite">
<span class="p-uid">https://snarfed.org/2024-04-07_52743</span>
<time class="dt-published" datetime="2024-04-07T16:07:49+00:00">2024-04-07T16:07:49+00:00</time>
<a title="snarfed.org/2024-04-07_52743" class="u-url" href="https://snarfed.org/2024-04-07_52743">snarfed.org/2024-04-07_527...</a>
<div class="e-content p-name">
One of our cats purrs so loudly that it’s a running joke in our family. It makes her fur vibrate. We have to turn the TV volume up when she sits with us. Once, she was in another room, and I heard her purr through the wall. No joke.
</div>
</article> Parsed mf2 (pruned), https://pin13.net/mf2/?url=https://ap.brid.gy/convert/web/https://authorship.studio/activity/143b8b1d-0bf8-46ab-b0bf-065e689120cd : {
"items": [
{
"type": ["h-entry"],
"properties": {
"uid": ["https://ap.brid.gy/convert/web/https://authorship.studio/activity/143b8b1d-0bf8-46ab-b0bf-065e689120cd"],
"name": ["Likes a post by snarfed.org One of our cats purrs so loudly that it\u2019s a running joke in our family. It makes her fur vibrate. We have to turn the TV volume up when she sits with us. Once, she was in another room, and I heard her purr through the wall. No joke."],
"in-reply-to": ["https://snarfed.org/2024-04-07_52743"],
"published": ["2024-04-07T16:31:35+00:00"],
"content": [{
"html": "Likes <a href=\"https://snarfed.org/2024-04-07_52743\">a post</a> by <span class=\"h-card\">\n <data class=\"p-uid\" value=\"https://snarfed.org/\"></data>\n <a class=\"u-url\" href=\"https://snarfed.org/\">snarfed.org</a>\n \n \n </span>\nOne of our cats purrs so loudly that it’s a running joke in our family. It makes her fur vibrate. We have to turn the TV volume up when she sits with us. Once, she was in another room, and I heard her purr through the wall. No joke.",
"value": "Likes a post by snarfed.org One of our cats purrs so loudly that it\u2019s a running joke in our family. It makes her fur vibrate. We have to turn the TV volume up when she sits with us. Once, she was in another room, and I heard her purr through the wall. No joke."
}
],
"like-of": [{
"type": ["h-cite"],
"properties": {
"uid": ["https://snarfed.org/2024-04-07_52743"],
"name": ["One of our cats purrs so loudly that it\u2019s a running joke in our family. It makes her fur vibrate. We have to turn the TV volume up when she sits with us. Once, she was in another room, and I heard her purr through the wall. No joke."],
"url": ["https://snarfed.org/2024-04-07_52743"],
"published": ["2024-04-07T16:07:49+00:00"],
"content": [{
"html": "One of our cats purrs so loudly that it’s a running joke in our family. It makes her fur vibrate. We have to turn the TV volume up when she sits with us. Once, she was in another room, and I heard her purr through the wall. No joke.",
"value": "One of our cats purrs so loudly that it\u2019s a running joke in our family. It makes her fur vibrate. We have to turn the TV volume up when she sits with us. Once, she was in another room, and I heard her purr through the wall. No joke."
}]
},
"value": "https://snarfed.org/2024-04-07_52743"
}
]
},
"author": [{
"type": ["h-card"],
"properties": {
"uid": ["https://authorship.studio/channel/scott"],
"name": ["Scott M. Stolz"],
"nickname": ["scott"],
"url": ["https://authorship.studio/channel/scott"],
"photo": [{
"value": "https://authorship.studio/photo/profile/l/4?rev=1701617226",
}]
},
"value": "Scott M. Stolz"
}],
}
],
} |
It's probably best to go by the |
Good point! |
Oh yeah, I remember now. The difficulty here is that mf2 itself is basically untyped, at least for all of the types we care about here. They're all So the brute force way to fix this is, for each AS2 |
I took the minimal approach here and just removed |
when we include both like-of and in-reply-to (or repost-of and in-reply-to, etc) in mf2, it confuses consumers like webmention receivers. for snarfed/bridgy-fed#941
We don't currently translate Hubzilla
Like
activities to mf2 HTML very well. They have bothobject
andinReplyTo
, which arguably they shouldn't, but probably isn't technically wrong. We convert them to a combined reply and like as mf2, which webmention receivers like the WordPress plugin (cc @dshanske) interpret as a reply over a like. (Which is probably right!)For AS2
Like
s, we should prioritize the like and remove the reply when converting to AS1 and/or mf2.Example: https://authorship.studio/activity/143b8b1d-0bf8-46ab-b0bf-065e689120cd . Pruned AS2:
The text was updated successfully, but these errors were encountered: