- $notices = $this->getNoticesBetween($start, $end);
- foreach ($notices as $noticeAct) {
- try {
- $nact = $noticeAct->asActivity();
- $nact->outputTo($this, false, false);
- } catch (Exception $e) {
- // Continue
+ try {
+ $notices = $this->getNoticesBetween($start, $end);
+ foreach ($notices as $noticeAct) {
+ try {
+ $nact = $noticeAct->asActivity($this->user->getProfile());
+ if ($format == Feed::ATOM) {
+ $nact->outputTo($this, false, false);
+ } else {
+ if ($haveOne) {
+ fwrite($handle, ",");
+ }
+ fwrite($handle, json_encode($nact->asArray()));
+ $haveOne = true;
+ }
+ } catch (Exception $e) {
+ common_log(LOG_ERR, $e->getMessage());
+ continue;
+ }
+ $nact = null;
+ unset($nact);
+ }
+ } catch (Exception $e) {
+ common_log(LOG_ERR, $e->getMessage());
+ }
+ }
+
+ $notices = null;
+ unset($notices);
+
+ try {
+ if ($format == Feed::ATOM) {
+ // Only show the author sub-element if it's different from default user
+ $act->outputTo($this, false, ($act->actor->id != $this->user->getUri()));
+ } else {
+ if ($haveOne) {
+ fwrite($handle, ",");