X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Fconversation.php;h=aa2539d213d4a49fcbc07e54480db4d9a78610c4;hb=b3bf036975593db27c6e7e653f18160d086f7b2d;hp=f33d267d35c02df306e9b211535c976b68b3f049;hpb=cb183359e23ae7a5cfb483fa06c6c4b7a8b05fff;p=quix0rs-gnu-social.git diff --git a/actions/conversation.php b/actions/conversation.php index f33d267d35..aa2539d213 100644 --- a/actions/conversation.php +++ b/actions/conversation.php @@ -123,13 +123,49 @@ class ConversationAction extends Action */ function showContent() { - $tnl = new FullThreadedNoticeList($this->notices, $this, $this->userProfile); + $user = common_current_user(); - $cnt = $tnl->show(); + if (!empty($user) && $user->conversationTree()) { + $nl = new ConversationTree($this->notices, $this); + } else { + $nl = new FullThreadedNoticeList($this->notices, $this, $this->userProfile); + } + + $cnt = $nl->show(); } function isReadOnly() { return true; } + + function getFeeds() + { + + return array(new Feed(Feed::JSON, + common_local_url('apiconversation', + array( + 'id' => $this->id, + 'format' => 'as')), + // TRANS: Title for link to notice feed. + // TRANS: %s is a user nickname. + _('Conversation feed (Activity Streams JSON)')), + new Feed(Feed::RSS2, + common_local_url('apiconversation', + array( + 'id' => $this->id, + 'format' => 'rss')), + // TRANS: Title for link to notice feed. + // TRANS: %s is a user nickname. + _('Conversation feed (RSS 2.0)')), + new Feed(Feed::ATOM, + common_local_url('apiconversation', + array( + 'id' => $this->id, + 'format' => 'atom')), + // TRANS: Title for link to notice feed. + // TRANS: %s is a user nickname. + _('Conversation feed (Activity Streams JSON)'))); + } } +