Allow publishing non-silo replies on silos besides Twitter
slyduda opened this issue ยท comments
On a reply-to post Mastodon seems to query the reply-to url. If it does not find the post via the Mastodon API it will return a 400 error.
Here are some of the end logs from my Twitter tweet and Mastodon for the following link: https://slyduda.com/post/7c9255e6-832e-4632-b7a2-978f30a9046b/
I 2022-10-15 05:47:18.139136+00:00 [requests.head](http://requests.head/) https://slyduda.com/blog/hello-world {'headers': {}}
I 2022-10-15 05:47:18.348793+00:00 Redirected to https://slyduda.com/blog/hello-world/
I 2022-10-15 05:47:18.350224+00:00 Received 200
D 2022-10-15 05:47:18.350791+00:00 Resolved https://slyduda.com/blog/hello-world to https://slyduda.com/blog/hello-world/
D 2022-10-15 05:47:18.351880+00:00 expand_target_urls fetching field=inReplyTo, url=https://slyduda.com/blog/hello-world/
I 2022-10-15 05:47:18.352084+00:00 [requests.get](http://requests.get/) https://slyduda.com/blog/hello-world/ {'gateway': False, 'headers': {}}
I 2022-10-15 05:47:18.537535+00:00 Received 200
D 2022-10-15 05:47:18.557266+00:00 expand_target_urls found rel=syndication for url=https://slyduda.com/blog/hello-world/ : []
I 2022-10-15 05:47:18.601321+00:00 no refresh_token
I 2022-10-15 05:47:18.608152+00:00 urlopen POST
Mastodon
D 2022-10-15 05:47:19.730067+00:00 expand_target_urls fetching field=inReplyTo, url=https://slyduda.com/blog/hello-world/
I 2022-10-15 05:47:19.730283+00:00 [requests.get](http://requests.get/) https://slyduda.com/blog/hello-world/ {'gateway': False, 'headers': {}}
I 2022-10-15 05:47:19.935424+00:00 Received 200
D 2022-10-15 05:47:19.951390+00:00 expand_target_urls found rel=syndication for url=https://slyduda.com/blog/hello-world/ : []
I 2022-10-15 05:47:20.002797+00:00 no refresh_token
I 2022-10-15 05:47:20.032063+00:00 [requests.get](http://requests.get/) https://mastodon.online/api/v2/search {'params': {'q': 'https://slyduda.com/blog/hello-world', 'resolve': True}, 'headers': {'Authorization': '...'}}
I 2022-10-15 05:47:22.385279+00:00 Redirected to https://mastodon.online/api/v2/search?q=https%3A%2F%2Fslyduda.com%2Fblog%2Fhello-world&resolve=True
I 2022-10-15 05:47:22.386805+00:00 Received 200
I 2022-10-15 05:47:22.391131+00:00 publish: Could not find a Mastodon toot to reply to.
I 2022-10-15 05:47:22.547924+00:00 Returning 400: {'error': 'Could not find a Mastodon toot to reply to.', 'parsed': {'type': ['h-entry'], 'properties': {'in-reply-to': ['https://slyduda.com/blog/hello-world'], 'author': [{'type': ['h-card'], 'properties': {'url': ['https://slyduda.com/about#me'], 'photo': ['https://slyduda.com/_nuxt/me.3819ca6b.jpg'], 'name': ['Sylvester Duda']}, 'value': 'https://slyduda.com/about#me'}], 'content': [{'html': '<div><p><!--[-->Testing out a new CLI that I built with the help of <a href="https://v3.nuxtjs.org/" rel="nofollow"><!--[-->[https://v3.nuxtjs.org/<](https://v3.nuxtjs.org/%3C);!--]--></a>!<!--]--></p><p><!--[-->๐ I will be happy if this works perfectly<!--]--></p></div><a class="invisible h-0 block" href="https://sly.re/4thf0g"> [https://sly.re/4thf0g</a>](https://sly.re/4thf0g%3C/a%3E);', 'value': 'Testing out a new CLI that I built with the help of https://v3.nuxtjs.org/!\n๐ I will be happy if this works perfectly https://sly.re/4thf0g'}], 'published': ['2022-09-21T16:14:53Z']}}} {'response': <Response 1305 bytes [200 OK]>}
Is this intended behavior? If so is there anyway that I can post reply-to's on Mastodon?
Hi! Looking at https://pin13.net/mf2/?url=https://slyduda.com/post/7c9255e6-832e-4632-b7a2-978f30a9046b/ , it shows that your post has a u-in-reply-to
pointing to https://slyduda.com/blog/hello-world/ . Is that intentional? Bridgy Publish currently only supports replies to silo posts, not replies to native web posts like this. More background in #362.
(When Bridgy doesn't see a reply to a silo post, it tries hard to figure out if the native web post https://slyduda.com/blog/hello-world/ is itself POSSEd by looking at its u-syndication
URLs and searching the silo, like Mastodon. In this case, it didn't find anything.)
It was intentional. From the resources that I have been looking at over the month, I was under the impression that native web posts were common u-in-reply-to
WebMention targets.
Additionally, I thought that Bridgy was able to support posting the reply as an entirely new post in the silo if it was not found on the platform as a new thread in and of itself. If this is not intended, then I can adjust my workflow! I was just surprised that Twitter Publish behaved differently than Mastodon Publish as I was under the assumption that they had the same programmatic behavior (besides the obvious differences in semantics, API, database models, etc)
I was under the impression that native web posts were common
u-in-reply-to
WebMention targets.
Yes! This is asolutely true. But...
I thought that Bridgy was able to support posting the reply as an entirely new post in the silo if it was not found on the platform as a new thread in and of itself. If this is not intended, then I can adjust my workflow!
Right! We chose not to support this, at leastt originally. Details in #362 and https://snarfed.org/2015-11-29_keep-bridgy-publish-dumb . However...
I was just surprised that Twitter Publish behaved differently than Mastodon Publish
Great point! I totally forgot that we actually enabled this just for Twitter recently, as an experiment, and it's seemed ok so far. Background in #1063 (comment) and snarfed/granary@164a542 . I'll consider enabling it for other silos too!
Awesome! And thank you for the clarity in your replies.
Done for Mastodon! Not as clear for the other Bridgy Publish silos - Flickr doesn't have replies, and GitHub issues have their own logic - so I left them alone.