}
/**
- * 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)
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
*