assert($this->activity instanceof Activity);
assert($this->target instanceof Profile);
- common_log(LOG_DEBUG, "Got a " . $this->activity->verb);
+ common_debug('Got a ' . $this->activity->verb);
+
try {
$options = [ 'source' => 'ostatus' ];
common_debug('Save salmon slap directly with Notice::saveActivity for actor=='.$this->actor->getID());
/**
* Add a link header for LRDD Discovery
*/
- public function onStartShowHTML($action)
+ public function onStartShowHTML(Action $action)
{
if ($action instanceof ShowstreamAction) {
- $acct = 'acct:'. $action->getTarget()->getNickname() .'@'. common_config('site', 'server');
- $url = common_local_url('webfinger') . '?resource='.$acct;
+ $resource = $action->getTarget()->getUri();
+ $url = common_local_url('webfinger') . '?resource='.urlencode($resource);
foreach (array(Discovery::JRD_MIMETYPE, Discovery::XRD_MIMETYPE) as $type) {
header('Link: <'.$url.'>; rel="'. Discovery::LRDD_REL.'"; type="'.$type.'"', false);