+
+ // TRANS: Title in atom group notice feed. %s is a group name.
+ $title = sprintf(_("%s timeline"), $group->nickname);
+ $this->setTitle($title);
+
+ $sitename = common_config('site', 'name');
+ $subtitle = sprintf(
+ // TRANS: Message is used as a subtitle in atom group notice feed.
+ // TRANS: %1$s is a group name, %2$s is a site name.
+ _('Updates from %1$s on %2$s!'),
+ $group->nickname,
+ $sitename
+ );
+ $this->setSubtitle($subtitle);
+
+ $avatar = $group->homepage_logo;
+ $logo = ($avatar) ? $avatar : User_group::defaultLogo(AVATAR_PROFILE_SIZE);
+ $this->setLogo($logo);
+
+ $this->setUpdated('now');
+
+ $self = common_local_url('ApiTimelineGroup',
+ array('id' => $group->id,
+ 'format' => 'atom'));
+ $this->setId($self);
+ $this->setSelfLink($self);
+
+ // For groups, we generate an author _AND_ an <activity:subject>
+ // Versions of StatusNet under 0.9.7 treat <author> as a person
+ // XXX: remove this workaround in future versions
+
+ $ao = ActivityObject::fromGroup($group);
+
+ $this->addAuthorRaw($ao->asString('author'));
+
+ $depMsg = 'Deprecation warning: activity:subject is present '
+ . 'only for backward compatibility. It will be '
+ . 'removed in the next version of StatusNet.';
+
+ $this->addAuthorRaw(
+ "<!--$depMsg-->\n"
+ . $ao->asString('activity:subject')
+ );
+
+ $this->addLink($group->homeUrl());