Show <activity:subject> in Atom group notice feed

Version 0.9.6 and below of StatusNet assume anything in <author> is a
Person. So, we include an <activity:subject> element, which will be
checked first by those versions of the code, only for group feeds.

At some point we'll take this out, but it's useful for now.
This commit is contained in:
Evan Prodromou 2010-12-29 15:33:57 -08:00
parent d3b10959f4
commit 80191b56df

View File

@ -85,9 +85,14 @@ class AtomGroupNoticeFeed extends AtomNoticeFeed
$this->setId($self); $this->setId($self);
$this->setSelfLink($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); $ao = ActivityObject::fromGroup($group);
$this->addAuthorRaw($ao->asString('author')); $this->addAuthorRaw($ao->asString('author').
$ao->asString('activity:subject'));
$this->addLink($group->homeUrl()); $this->addLink($group->homeUrl());
} }