X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fatomusernoticefeed.php;h=5180725722d23dff75d5ff2315e1d9f2b3fdfdd9;hb=b0dfc70a54e5e184023ed982dfaf5439041e9708;hp=ec368f5ca1648b9c447bbea3abe01a6e800db95c;hpb=99194e03fa50b61f99164674afc949b4bbefd44a;p=quix0rs-gnu-social.git diff --git a/lib/atomusernoticefeed.php b/lib/atomusernoticefeed.php index ec368f5ca1..5180725722 100644 --- a/lib/atomusernoticefeed.php +++ b/lib/atomusernoticefeed.php @@ -59,9 +59,29 @@ class AtomUserNoticeFeed extends AtomNoticeFeed parent::__construct($cur, $indent); $this->user = $user; if (!empty($user)) { + $profile = $user->getProfile(); - $this->addAuthor($profile->nickname, $user->uri); - $this->setActivitySubject($profile->asActivityNoun('subject')); + + $ao = ActivityObject::fromProfile($profile); + + array_push($ao->extra, $profile->profileInfo($cur)); + + // XXX: For users, we generate an author _AND_ an + // This is for backward compatibility with clients (especially + // StatusNet's clients) that assume the Atom will conform to an + // older version of the Activity Streams API. Subject should be + // removed in future versions of StatusNet. + + $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( + "\n" + . $ao->asString('activity:subject') + ); } // TRANS: Title in atom user notice feed. %s is a user name. @@ -77,9 +97,7 @@ class AtomUserNoticeFeed extends AtomNoticeFeed ); $this->setSubtitle($subtitle); - $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); - $logo = ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE); - $this->setLogo($logo); + $this->setLogo($profile->avatarUrl(AVATAR_PROFILE_SIZE)); $this->setUpdated('now');