summaryrefslogtreecommitdiff
path: root/plugins/OStatus/scripts/updateostatus.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/OStatus/scripts/updateostatus.php')
-rw-r--r--plugins/OStatus/scripts/updateostatus.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/OStatus/scripts/updateostatus.php b/plugins/OStatus/scripts/updateostatus.php
index d553a7d62..315b49273 100644
--- a/plugins/OStatus/scripts/updateostatus.php
+++ b/plugins/OStatus/scripts/updateostatus.php
@@ -56,7 +56,12 @@ try {
$user = new User();
if ($user->find()) {
while ($user->fetch()) {
- updateOStatus($user);
+ try {
+ updateOStatus($user);
+ } catch (Exception $e) {
+ common_log(LOG_NOTICE, "Couldn't convert OMB subscriptions ".
+ "for {$user->nickname} to OStatus: " . $e->getMessage());
+ }
}
}
} else {
@@ -107,8 +112,8 @@ function updateOStatus($user)
if (!have_option('q', 'quiet')) {
echo "Converting...";
}
- Subscription::cancel($up, $rp);
Subscription::start($up, $op->localProfile());
+ Subscription::cancel($up, $rp);
if (!have_option('q', 'quiet')) {
echo "done.\n";
}
@@ -118,8 +123,7 @@ function updateOStatus($user)
if (!have_option('q', 'quiet')) {
echo "fail.\n";
}
- continue;
- common_log(LOG_WARNING, "Couldn't convert OMB subscription (" . $up->nickname . ", " . $rp->nickname .
+ common_log(LOG_NOTICE, "Couldn't convert OMB subscription (" . $up->nickname . ", " . $rp->nickname .
") to OStatus: " . $e->getMessage());
continue;
}