summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-03-18 15:21:43 -0500
committerEvan Prodromou <evan@status.net>2010-03-18 15:21:43 -0500
commitdbd44e51a2a9c5c63a6211002e5dd3b14483fb60 (patch)
tree56344401c6a541eca0b45ec01201faa9c52ce3f9 /plugins
parent2ccd5187ccd509f3f579629186a7087720e5f94a (diff)
parentf1b3d84b7d55cc7c466982a95815ba1ddf130418 (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'plugins')
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php2
-rw-r--r--plugins/OStatus/scripts/updateostatus.php14
2 files changed, 10 insertions, 6 deletions
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index 73f5d2322..f8fda4162 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -1464,7 +1464,7 @@ class Ostatus_profile extends Memcached_DataObject
if (array_key_exists('profileurl', $hints)) {
try {
common_log(LOG_INFO, "Discovery on acct:$addr with profile URL $profileUrl");
- $oprofile = self::ensureProfile($hints['profileurl'], $hints);
+ $oprofile = self::ensureProfileURL($hints['profileurl'], $hints);
self::cacheSet(sprintf('ostatus_profile:webfinger:%s', $addr), $oprofile->uri);
return $oprofile;
} catch (Exception $e) {
diff --git a/plugins/OStatus/scripts/updateostatus.php b/plugins/OStatus/scripts/updateostatus.php
index d553a7d62..622ded56a 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 {
@@ -98,7 +103,7 @@ function updateOStatus($user)
echo "Checking {$rp->nickname}...";
}
- $op = Ostatus_profile::ensureProfile($rp->profileurl);
+ $op = Ostatus_profile::ensureProfileURL($rp->profileurl);
if (empty($op)) {
echo "can't convert.\n";
@@ -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;
}