snarfed / bridgy-fed

🌉 A bridge between decentralized social network protocols

Home Page:https://fed.brid.gy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webmentions author data differs from bridgy

jk-na opened this issue · comments

Having just set up a mastodon account I can perform a few tests with bridgy fed and compare against bridgy I currently use for replies\shares etc. on posts syndicated to pleroma.

I've just replied to a post by my bridgyfed account @jk.nipponalba.scot@jk.nipponalba.scot from my mastodon account @jk_na@mastodon.scot and the webmentions responses are mismatched. Also I received two webmentions for the one reply, on with a target of the note that I was replying to and one with a target of my website URL.

In the bridgy response webmention the author name and photo are correctly populated, however in the case of the bridgy fed webmention the name is the same as the URL and there is no photo.

I use the webmentions.io webhook for saving webmentions to json files.

Example of bridgy webmention:

{"type":"entry",
  "author":
       {"type":"card",
        "name":"Jkp🏴󠁧󠁢󠁳󠁣󠁴󠁿🇪🇺",
        "photo":"https://webmention.io/avatar/media.mastodon.scot/69c7e212eeb99cf382e80d671da393c92c41f643715a2e0e9a88b48de97c2dd2.jpg",
        "url":"https://mastodon.scot/@Jkp"},
    "url":"https://social.nipponalba.scot/notice/A4yZ46f3l5AHkTx4xk#favorited-by-9qEkWb1d76feMQOdRw",
    "published":null,
    "wm-received":"2021-03-09T20:35:55Z",
    "wm-id":1063173,
    "wm-source":"https://brid.gy/like/mastodon/@jk@social.nipponalba.scot/A4yZ46f3l5AHkTx4xk/9qEkWb1d76feMQOdRw",
    "wm-target":"https://jk.nipponalba.scot/note/60452443/",
    "like-of":"https://jk.nipponalba.scot/note/60452443/",
    "wm-property":"like-of",
    "wm-private":false
}

Example of bridgy fed webmention 1 - wm-target being the note I was replying to:

{"type":"entry",
 "author":
      {"type":"card",
       "name":"https://mastodon.scot/users/jk_na",
       "photo":"",
       "url":"https://mastodon.scot/users/jk_na"},
 "url":"https://mastodon.scot/@jk_na/105870901259631820","published":"2021-03-11T11:22:30",
 "wm-received":"2021-03-11T11:22:34Z",
 "wm-id":1066528,
 "wm-source":"https://fed.brid.gy/render?source=https%3A%2F%2Fmastodon.scot%2F%40jk_na%2F105870901259631820&target=https%3A%2F%2Fjk.nipponalba.scot%2Fnote%2F6049fa28%2F",
 "wm-target":"https://jk.nipponalba.scot/note/6049fa28/",
 "content":{
       "html":"<p><span class=\"h-card\"><a href=\"https://fed.brid.gy/r/https://jk.nipponalba.scot\" class=\"u-url\">@<span>jk.nipponalba.scot</span></a></span> test reply</p>\n<a class=\"u-mention\" href=\"https://jk.nipponalba.scot/\"></a>",
      "text":"@jk.nipponalba.scot test reply"},
 "in-reply-to":"https://jk.nipponalba.scot/note/6049fa28/",
 "wm-property":"in-reply-to",
 "wm-private":false
}

Example of bridgy fed webmention 2 - wm-target being to the website URI

{"type":"entry",
 "author":{
       "type":"card",
       "name":"https://mastodon.scot/users/jk_na",
       "photo":"","url":
       "https://mastodon.scot/users/jk_na"},
 "url":"https://mastodon.scot/@jk_na/105870901259631820",
 "published":"2021-03-11T11:22:30",
 "wm-received":"2021-03-11T11:22:34Z",
 "wm-id":1066527,
 "wm-source":"https://fed.brid.gy/render?source=https%3A%2F%2Fmastodon.scot%2F%40jk_na%2F105870901259631820&target=https%3A%2F%2Fjk.nipponalba.scot%2F",
 "wm-target":"https://jk.nipponalba.scot/",
 "content":{
       "html":"<p><span class=\"h-card\"><a href=\"https://fed.brid.gy/r/https://jk.nipponalba.scot\" class=\"u-url\">@<span>jk.nipponalba.scot</span></a></span> test reply</p>\n<a class=\"u-mention\" href=\"https://jk.nipponalba.scot/\"></a>",
       "text":"@jk.nipponalba.scot test reply"},
 "in-reply-to":"https://jk.nipponalba.scot/",
 "wm-property":"in-reply-to",
 "wm-private":false
}

Thanks for filing! I see the problem here, should be straightforward to fix.

Fixed! You can see the new rendered HTML+mf2 in https://fed.brid.gy/render?source=https%3A%2F%2Fmastodon.scot%2F%40jk_na%2F105870901259631820&target=https%3A%2F%2Fjk.nipponalba.scot%2Fnote%2F6049fa28%2F , it now includes your name and profile picture correctly.

confirmed, nice one, thank you!