X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Futil.php;h=f4c9824fd53021253ffa509e7c0890e538801544;hb=cad040ce4e00ea66c062fefa744e3b540c29ae27;hp=e3f2555babd5eb27b1602955824ed31b6016e916;hpb=c382a1d8cce0942b3d522b1edc499efdf4a52c44;p=quix0rs-gnu-social.git diff --git a/lib/util.php b/lib/util.php index e3f2555bab..f4c9824fd5 100644 --- a/lib/util.php +++ b/lib/util.php @@ -754,17 +754,19 @@ function common_find_mentions($text, $notice) foreach ($hmatches[1] as $hmatch) { $tag = common_canonical_tag($hmatch[0]); - - $tagged = Profile_tag::getTagged($sender->id, $tag); - - $url = common_local_url('subscriptions', - array('nickname' => $sender->nickname, - 'tag' => $tag)); - - $mentions[] = array('mentioned' => $tagged, - 'text' => $hmatch[0], - 'position' => $hmatch[1], - 'url' => $url); + $plist = Profile_list::getByTaggerAndTag($sender->id, $tag); + if (!empty($plist) && !$plist->private) { + $tagged = $sender->getTaggedSubscribers($tag); + + $url = common_local_url('showprofiletag', + array('tagger' => $sender->nickname, + 'tag' => $tag)); + + $mentions[] = array('mentioned' => $tagged, + 'text' => $hmatch[0], + 'position' => $hmatch[1], + 'url' => $url); + } } Event::handle('EndFindMentions', array($sender, $text, &$mentions));