X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOStatus%2Fscripts%2Fresub-feed.php;h=a08d837993df35e3746c60cd670bc86213d0bc5c;hb=641018e95051b029dcd57a4eb304ee545230136a;hp=8803c0118b89ff20d12d27aac6af9b6203dfb8d3;hpb=5dee862b2cb9cbcb0e73842802dc2387c8e84825;p=quix0rs-gnu-social.git diff --git a/plugins/OStatus/scripts/resub-feed.php b/plugins/OStatus/scripts/resub-feed.php index 8803c0118b..a08d837993 100644 --- a/plugins/OStatus/scripts/resub-feed.php +++ b/plugins/OStatus/scripts/resub-feed.php @@ -20,11 +20,17 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); +$longoptions = array('unsub'); +$shortoptions = 'u'; + $helptext = <<huburi with new subscription for $sub->uri\n"; -$ok = $sub->subscribe(); + +if (have_option('u') || have_option('--unsub')) { + print "Pinging hub $sub->huburi with unsubscription for $sub->uri\n"; + $ok = $sub->unsubscribe(); +} else { + print "Pinging hub $sub->huburi with new subscription for $sub->uri\n"; + $ok = $sub->subscribe(); +} if ($ok) { print "ok\n";