Commit b925eeec authored by Zach Copley's avatar Zach Copley

Fix errors thrown by code trying to broadcast profiles via OMB when the OMB plugin isn't installed

parent e530a086
......@@ -1501,16 +1501,18 @@ function common_enqueue_notice($notice)
}
/**
* Broadcast profile updates to remote subscribers.
* Legacy function to broadcast profile updates to OMB remote subscribers.
*
* XXX: This probably needs killing, but there are several bits of code
* that broadcast profile changes that need to be dealt with. AFAIK
* this function is only used for OMB. -z
*
* Since this may be slow with a lot of subscribers or bad remote sites,
* this is run through the background queues if possible.
*/
function common_broadcast_profile(Profile $profile)
{
$qm = QueueManager::get();
$qm->enqueue($profile, "profile");
return true;
Event::handle('BroadcastProfile', array($profile));
}
function common_profile_url($nickname)
......
......@@ -369,6 +369,18 @@ class OMBPlugin extends Plugin
return true;
}
/**
* Broadcast a profile over OMB
*
* @param Profile $profile to broadcast
* @return false
*/
function onBroadcastProfile($profile) {
$qm = QueueManager::get();
$qm->enqueue($profile, "profile");
return true;
}
/**
* Plugin version info
*
......
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