IndieAuth and Micropub fixes - #160
Conversation
…o starting to use fench() more.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69c304fcc5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const post_success = self.selected_service.type === "xmlrpc" ? | ||
| yield XMLRPCApi.send_post(self.selected_service.service_object(), self.post_text, self.post_title, self.post_assets, self.post_categories, self.post_status) | ||
| : yield MicroPubApi.send_post(self.selected_service.service_object(), self.post_text, self.post_title, self.post_assets, self.post_categories, self.post_status, self.post_syndicates.length === self.selected_service.active_destination()?.syndicates?.length ? null : self.post_syndicates, self.summary) | ||
| : yield MicroPubApi.send_post(self.selected_service.service_object(), self.post_text, self.post_title, self.post_assets, self.post_categories, self.post_status, self.selected_service.is_microblog && self.post_syndicates.length === self.selected_service.active_destination()?.syndicates?.length ? null : self.post_syndicates, self.summary) |
There was a problem hiding this comment.
Omit syndication when no targets exist
For a third-party service that advertises no syndication targets, both post_syndicates and active_destination().syndicates are empty, but this new is_microblog condition passes [] instead of null. MicroPubApi.send_post converts that empty array into an mp-syndicate-to parameter with a blank value, so every normal post to such a service explicitly sends an invalid/empty syndication target; strict Micropub servers can reject the create request, and servers with implicit syndication defaults may interpret it as an opt-out. Preserve omission when no targets were discovered, while still sending explicit selections for third-party services that actually advertise targets.
Useful? React with 👍 / 👎.
For non-Micro.blog servers mostly.