summaryrefslogtreecommitdiff
path: root/lib/apiaction.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/apiaction.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/apiaction.php')
-rw-r--r--lib/apiaction.php40
1 files changed, 26 insertions, 14 deletions
diff --git a/lib/apiaction.php b/lib/apiaction.php
index 320aa0316..7cc473d51 100644
--- a/lib/apiaction.php
+++ b/lib/apiaction.php
@@ -346,20 +346,32 @@ class ApiAction extends Action
function twitterGroupArray($group)
{
- $twitter_group=array();
- $twitter_group['id']=$group->id;
- $twitter_group['url']=$group->permalink();
- $twitter_group['nickname']=$group->nickname;
- $twitter_group['fullname']=$group->fullname;
- $twitter_group['original_logo']=$group->original_logo;
- $twitter_group['homepage_logo']=$group->homepage_logo;
- $twitter_group['stream_logo']=$group->stream_logo;
- $twitter_group['mini_logo']=$group->mini_logo;
- $twitter_group['homepage']=$group->homepage;
- $twitter_group['description']=$group->description;
- $twitter_group['location']=$group->location;
- $twitter_group['created']=$this->dateTwitter($group->created);
- $twitter_group['modified']=$this->dateTwitter($group->modified);
+ $twitter_group = array();
+
+ $twitter_group['id'] = $group->id;
+ $twitter_group['url'] = $group->permalink();
+ $twitter_group['nickname'] = $group->nickname;
+ $twitter_group['fullname'] = $group->fullname;
+
+ if (isset($this->auth_user)) {
+ $twitter_group['member'] = $this->auth_user->isMember($group);
+ $twitter_group['blocked'] = Group_block::isBlocked(
+ $group,
+ $this->auth_user->getProfile()
+ );
+ }
+
+ $twitter_group['member_count'] = $group->getMemberCount();
+ $twitter_group['original_logo'] = $group->original_logo;
+ $twitter_group['homepage_logo'] = $group->homepage_logo;
+ $twitter_group['stream_logo'] = $group->stream_logo;
+ $twitter_group['mini_logo'] = $group->mini_logo;
+ $twitter_group['homepage'] = $group->homepage;
+ $twitter_group['description'] = $group->description;
+ $twitter_group['location'] = $group->location;
+ $twitter_group['created'] = $this->dateTwitter($group->created);
+ $twitter_group['modified'] = $this->dateTwitter($group->modified);
+
return $twitter_group;
}