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";