Commit 89833ce1 authored by Brion Vibber's avatar Brion Vibber

Set up subscription to for admin user on new installation,...

Set up subscription to for admin user on new installation, if OStatus is set up and working. (Will fail gracefully on a behind-the-firewall site.)
parent 4d3f90ed
......@@ -865,6 +865,19 @@ function registerInitialUser($nickname, $password, $email)
// Attempt to do a remote subscribe to
// Will fail if instance is on a private network.
if (class_exists('Ostatus_profile')) {
try {
$oprofile = Ostatus_profile::ensureProfile('');
Subscription::start($user->getProfile(), $oprofile->localProfile());
updateStatus("Set up subscription to <a href=''></a>.");
} catch (Exception $e) {
updateStatus("Could not set up subscription to <a href=''></a>.");
return true;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment