X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FRealtime%2FRealtimePlugin.php;h=287e48e48475e4cb267a3ed2ec97c8754ce30ecf;hb=b4da5f3785de138b9b7c3672d331676ea7929c16;hp=6011bbc0356424a2254ab0e44bf5d0ca035d0ebe;hpb=c751be1c0639dd02432b8f7ddd365a91504e331c;p=quix0rs-gnu-social.git diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php index 6011bbc035..287e48e484 100644 --- a/plugins/Realtime/RealtimePlugin.php +++ b/plugins/Realtime/RealtimePlugin.php @@ -172,6 +172,13 @@ class RealtimePlugin extends Plugin // Add to the author's timeline + try { + $profile = $notice->getProfile(); + } catch (Exception $e) { + $this->log(LOG_ERR, $e->getMessage()); + return true; + } + $user = User::staticGet('id', $notice->profile_id); if (!empty($user)) { @@ -181,7 +188,7 @@ class RealtimePlugin extends Plugin // Add to the public timeline if ($notice->is_local == Notice::LOCAL_PUBLIC || - ($notice->is_local == Notice::REMOTE_OMB && !common_config('public', 'localonly'))) { + ($notice->is_local == Notice::REMOTE && !common_config('public', 'localonly'))) { $paths[] = array('public', null, null); } @@ -287,9 +294,18 @@ class RealtimePlugin extends Plugin // root url from page output $action->elementStart('address'); + + if (common_config('singleuser', 'enabled')) { + $user = User::singleUser(); + $url = common_local_url('showstream', array('nickname' => $user->nickname)); + } else { + $url = common_local_url('public'); + } + $action->element('a', array('class' => 'url', - 'href' => common_local_url('public')), + 'href' => $url), ''); + $action->elementEnd('address'); $action->showContentBlock(); @@ -468,7 +484,7 @@ class RealtimePlugin extends Plugin break; case 'tag': $tag = $action->trimmed('tag'); - if (empty($tag)) { + if (!empty($tag)) { $arg1 = $tag; } else { $this->log(LOG_NOTICE, "Unexpected 'tag' action without tag argument");