X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fatomusernoticefeed.php;h=fb0ac5f8313c88cd80504cfca650fb393d4a8d8d;hb=2dbdb0f185cb9b98097ce2f20bbd9430ab715203;hp=5ca089b859a85d753f7af13903e598e9eb876d95;hpb=ab92496ddc7d333d6bda84e4e4ac8266f88138cc;p=quix0rs-gnu-social.git diff --git a/lib/atomusernoticefeed.php b/lib/atomusernoticefeed.php index 5ca089b859..fb0ac5f831 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(); + $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.