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
Add WebSub push support #379
Conversation
Provide a basic pingServices() function whose job will be to call the functions which actually ping each individual service.
With the lone exception of the cron update of the RSS, since we should only ping services when we know something has actually changed (or the admin fakes it explicitly).
This page will host configuration settings for integrated services.
Provide a default WebSub hub for new sites, and simply add the setting itself without a value for upgrades so that existing users can decide whether or not to use WebSub pushes.
This adds a function to send a WebSub publish message to the configured server, and adds that function to the pingServices() function so it will be called whenever the podcast updates.
There's no point in sending WebSub messages to a hub if subscribers to the podcast cannot subscribe via the hub. Add a link in the RSS feed that points clients towards the hub that we are using for pushing update messages.
That was a dumb typo.
a2669ac
to
e01ef66
Compare
Since there aren't any other third-party integrations in place at this time, we'll keep things in pg_config.php and revert this particular commit when adding in other integrations.
3589db1
to
00a137b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far just change this minor thing please
Btw there is still one thing to note! Could you add a function_exists before a curl function and exit if it is not found? I don't want another php dependency, in this case php-curl. See: https://www.php.net/manual/en/function.function-exists.php |
Check for the curl_init function. If it exists, so do curl_setopt, curl_exec, and curl_close. curl_setopt_array exists in PHP 5.1.3 when cURL is available from PHP, but not in earlier versions; iterate the options array when this is the case.
Okay, I'm checking for the cURL module now. |
Thanks |
This PR adds functionality to announce updates to a WebSub server, and reference that server in the RSS feed so that the podcast listeners can subscribe for updates via the WebSub protocol. This also lays out infrastructure for adding additional services such as Podcast Index.
For details, see https://podnews.net/article/pubsubhubbub-for-podcasters