ShowstreamAction tidying up

Lots of these changes mean that we're requiring certain values to
either by typed properly or return the expected value. If it doesn't
there should be a fatal exception thrown which we can followup in the
logs and won't go silently suppressed.
This commit is contained in:
Mikael Nordfeldth
2015-07-10 13:44:47 +02:00
parent f8877e015b
commit 9a92b58057
8 changed files with 88 additions and 70 deletions

View File

@@ -144,7 +144,7 @@ class WebFingerPlugin extends Plugin
public function onStartShowHTML($action)
{
if ($action instanceof ShowstreamAction) {
$acct = 'acct:'. $action->profile->nickname .'@'. common_config('site', 'server');
$acct = 'acct:'. $action->getTarget()->getNickname() .'@'. common_config('site', 'server');
$url = common_local_url('webfinger') . '?resource='.$acct;
foreach (array(Discovery::JRD_MIMETYPE, Discovery::XRD_MIMETYPE) as $type) {