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

Error on check #1

Closed
gRegorLove opened this issue Jun 18, 2019 · 4 comments
Closed

Error on check #1

gRegorLove opened this issue Jun 18, 2019 · 4 comments

Comments

@gRegorLove
Copy link

URL: https://gregorlove.com/2019/06/jealous/
Status: 200
Error: No webmentions found on 1 discovered entries

Tantek's URL advertises webmention endpoint:
<link rel="webmention" href="//webmention.io/tantek.com/webmention" />

@remy
Copy link
Owner

remy commented Jun 18, 2019

Interesting. The code spots that you're using microformats, so tries to extract the microformat h-entry, but there's no link in the content of the entry: http://pin13.net/mf2/?url=https%3A%2F%2Fgregorlove.com%2F2019%2F06%2Fjealous%2F

I could attempt a non-microformat parse, but I wonder if that's the right thing to do.

Do you have any thoughts on what's right here?

@gRegorLove
Copy link
Author

A common pattern for reply posts is displaying the reply context with an in-reply-to property. The reply context usually appears outside the e-content since it is not part of the author's content. This can either be just the URL that is being replied to, or a nested h-cite if you're quoting / showing the author that is being replied to.

I realized my example is a bit odd and I should probably tweak my microformats. I should use u-in-reply-to instead of p-in-reply-to. That would make the value of the embedded h-cite the URL. That makes it easier to consume without drilling down into the h-cite's properties.

These are the two main patterns that you might consider handling for replies:

u-in-reply-to

<div class="h-entry">
In reply to <a href="https://example.com/post" class="u-in-reply-to">https://example.com/post</a>:
<div class="e-content">Lorem ipsum</div>
</div>

Parsed as (truncated to just the items):

"items": [
    {
        "type": [
            "h-entry"
        ],
        "properties": {
            "in-reply-to": [
                "https://example.com/post"
            ],
            "content": [
                {
                    "html": "Lorem ipsum",
                    "value": "Lorem ipsum"
                }
            ]
        }
    }
]

u-in-reply-to h-cite

<div class="h-entry">
<div class="u-in-reply-to h-cite">
  <a href="https://example.com/author" class="p-author h-card">John Doe</a>
  <a href="https://example.com/post" class="u-url">https://example.com/post</a>
  <span class="p-content">Quoted post</span>
</div>
<div class="e-content">Lorem ipsum</div>
</div>

Parsed as (truncated to just the items):

"items": [
    {
        "type": [
            "h-entry"
        ],
        "properties": {
            "content": [
                {
                    "html": "Lorem ipsum",
                    "value": "Lorem ipsum"
                }
            ],
            "in-reply-to": [
                {
                    "type": [
                        "h-cite"
                    ],
                    "properties": {
                        "content": [
                            "Quoted post"
                        ],
                        "url": [
                            "https://example.com/post"
                        ],
                        "author": [
                            {
                                "type": [
                                    "h-card"
                                ],
                                "properties": {
                                    "name": [
                                        "John Doe"
                                    ],
                                    "url": [
                                        "https://example.com/author"
                                    ]
                                },
                                "value": "John Doe"
                            }
                        ]
                    },
                    "value": "https://example.com/post"
                }
            ]
        }
    }
]

The logic could be: for each in-reply-to, if it is an object, use its value as a URL; otherwise use the string as a URL. Note that it's possible to have multi-reply posts, too.

@remy
Copy link
Owner

remy commented Jun 18, 2019

Okay, I think I can see what I need to do to handle this.

I might park off multi-reply for another day / when folks need/want it!

I'm going to pick this up tomorrow and bake another release and pingback here once ready 👍

remy added a commit that referenced this issue Jun 18, 2019
@remy
Copy link
Owner

remy commented Aug 7, 2019

This should be fixed and live! Thanks for waiting!

@remy remy closed this as completed Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants