diff options
author | Zach Copley <zach@status.net> | 2010-06-16 14:29:24 -0700 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-06-16 14:29:24 -0700 |
commit | d3d499879c4d01bde46033a3a98f9190ea18cb63 (patch) | |
tree | 21d057a2e7d188b44239a1883a30248bfe0b2aac /lib/atomgroupnoticefeed.php | |
parent | 327ed5b87e492380bc651ed03159ae7cd3a4a493 (diff) |
- More useful group info from api/statusnet/group/show
- Add statusnet:group_info tag to group Atom feeds
Diffstat (limited to 'lib/atomgroupnoticefeed.php')
-rw-r--r-- | lib/atomgroupnoticefeed.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/atomgroupnoticefeed.php b/lib/atomgroupnoticefeed.php index 7934a4f9e..761df587c 100644 --- a/lib/atomgroupnoticefeed.php +++ b/lib/atomgroupnoticefeed.php @@ -93,4 +93,23 @@ class AtomGroupNoticeFeed extends AtomNoticeFeed 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); + } } |