123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?php
- if (!defined('GNUSOCIAL')) {
- exit(1);
- }
- class ConversationAction extends ManagedAction
- {
- protected $redirectAfterLogin = true;
-
- public $conv = null;
- public $page = null;
- public $notices = null;
- protected function doPreparation()
- {
- $this->conv = Conversation::getByID($this->int('id'));
- }
-
- public function title()
- {
-
- return _('Conversation');
- }
-
- public function showContent()
- {
- if (Event::handle('StartShowConversation', [$this, $this->conv, $this->scoped])) {
- $notices = $this->conv->getNotices($this->scoped);
- $nl = new FullThreadedNoticeList($notices, $this, $this->scoped);
- $cnt = $nl->show();
- }
- Event::handle('EndShowConversation', [$this, $this->conv, $this->scoped]);
- }
- public function isReadOnly($args)
- {
- return true;
- }
-
- public function getFeeds()
- {
- return [
- new Feed(Feed::JSON,
- common_local_url('apiconversation',
- ['id' => $this->conv->getID(),
- 'format' => 'as']),
-
-
- _('Conversation feed (Activity Streams JSON)')
- ),
- new Feed(Feed::RSS2,
- common_local_url('apiconversation',
- ['id' => $this->conv->getID(),
- 'format' => 'rss']),
-
-
- _('Conversation feed (RSS 2.0)')
- ),
- new Feed(Feed::ATOM,
- common_local_url('apiconversation',
- ['id' => $this->conv->getID(),
- 'format' => 'atom']),
-
-
- _('Conversation feed (Atom)')
- )
- ];
- }
- }
|