Make restoreuser use new FeedImporter queue handler

This commit is contained in:
Evan Prodromou
2010-12-17 16:27:20 -05:00
parent 044763cf06
commit 4b41d05a13
3 changed files with 42 additions and 8 deletions

View File

@@ -81,10 +81,10 @@ class ActivityImporter extends QueueHandler
common_log(LOG_WARNING, $ce->getMessage());
return true;
} catch (ServerException $se) {
common_log(LOG_ERR, $ce->getMessage());
common_log(LOG_ERR, $se->getMessage());
return false;
} catch (Exception $e) {
common_log(LOG_ERR, $ce->getMessage());
common_log(LOG_ERR, $e->getMessage());
return false;
}
return true;
@@ -95,6 +95,11 @@ class ActivityImporter extends QueueHandler
$profile = $user->getProfile();
if ($activity->objects[0]->id == $author->id) {
if (!$this->trusted) {
throw new ClientException(_("Can't force subscription for untrusted user."));
}
$other = $activity->actor;
$otherUser = User::staticGet('uri', $other->id);