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

mp-syndicate-to not sent in post create request #89

Open
paulrobertlloyd opened this issue Sep 25, 2024 · 2 comments
Open

mp-syndicate-to not sent in post create request #89

paulrobertlloyd opened this issue Sep 25, 2024 · 2 comments

Comments

@paulrobertlloyd
Copy link
Contributor

paulrobertlloyd commented Sep 25, 2024

Posting from Micro.blog iOS 3.3 (319), the following values were present in the request (with syndication targets selected in settings screen):

{
  h: 'entry',
  content: 'Test from Micro.blog iOS 3.3 (319)',
  'post-status': 'published',
  'mp-destination': 'https://indiekit-sandbox.netlify.app'/
}

mp-syndicate-to is not present in the request.

Testing posting to the same endpoint from Quill, with syndication targets selected, the following values were present:

{
  h: 'entry',
  access_token: 'XXXXXX',
  content: 'Test from Quill',
  'mp-syndicate-to': [
    'https://web.archive.org/',
    'https://mastodon.social/@indiekit_sandbox'
  ]
}
@manton
Copy link
Contributor

manton commented Sep 26, 2024

Reviewing the code, I think this is the problem:

self.post_syndicates.length === self.selected_service.active_destination()?.syndicates?.length ? null : self.post_syndicates

When we added syndication targets to Micro.blog, it created an issue for older clients that didn't support them. As a work-around, if all of the targets are selected, we don't send them, and Micro.blog assumes you want it cross-posted everywhere by default.

Another way to think about it is that Micro.blog's targets are opt-out, not opt-in.

This doesn't exactly follow Micropub, though. Before I change it, does this explain what you're seeing?

@paulrobertlloyd
Copy link
Contributor Author

Ah yes, if I only check one target, mp-syndicate-to gets added which is yes, unexpected (and also reveals another bug, which I’ll create a separate PR for).

Also worth pointing to #87, in that I have my Micropub endpoint to have only one target checked, but that preference is currently not respected.

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