summaryrefslogtreecommitdiff
path: root/lib/atomgroupnoticefeed.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-06-16 14:29:24 -0700
committerZach Copley <zach@status.net>2010-06-16 14:29:24 -0700
commitd3d499879c4d01bde46033a3a98f9190ea18cb63 (patch)
tree21d057a2e7d188b44239a1883a30248bfe0b2aac /lib/atomgroupnoticefeed.php
parent327ed5b87e492380bc651ed03159ae7cd3a4a493 (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.php19
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);
+ }
}