- $class = $attn->isGroup() ? 'group' : 'account';
- $this->pa[] = array('href' => $attn->profileurl,
- 'title' => $attn->getNickname(),
- 'class' => "addressee {$class}",
+ if ($attn->isGroup()) {
+ $class = 'group';
+ $profileurl = common_local_url('groupbyid', array('id' => $attn->getGroup()->getID()));
+ } else {
+ $class = 'account';
+ $profileurl = common_local_url('userbyid', array('id' => $attn->getID()));
+ }
+ $this->pa[] = array('href' => $profileurl,
+ 'title' => $attn->getHtmlTitle(),
+ 'class' => "addressee {$class} p-name u-url",