$this->setId($self);
$this->setSelfLink($self);
- $this->addAuthorRaw($group->asAtomAuthor());
- $this->setActivitySubject($group->asActivitySubject());
+ $ao = ActivityObject::fromGroup($group);
+
+ $this->addAuthorRaw($ao->asString('author'));
$this->addLink($group->homeUrl());
}
return $this->group;
}
+ function initFeed()
+ {
+ parent::initFeed();
+
+ $attrs = array();
+
+ if (!empty($this->cur)) {
+ $attrs['member'] = $this->cur->isMember($this->group)
+ ? 'true' : 'false';
+ $attrs['blocked'] = Group_block::isBlocked(
+ $this->group,
+ $this->cur->getProfile()
+ ) ? 'true' : 'false';
+ }
+
+ $attrs['member_count'] = $this->group->getMemberCount();
+
+ $this->element('statusnet:group_info', $attrs, null);
+ }
}