1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- defined('GNUSOCIAL') || die();
- class apNoticeAction extends ManagedAction
- {
- protected $needLogin = false;
- protected $canPost = true;
-
- protected function handle()
- {
- try {
- $notice = Notice::getByID($this->trimmed('id'));
- } catch (Exception $e) {
- ActivityPubReturn::error('Invalid Notice URI.', 404);
- }
- if (!$notice->isLocal()) {
- ActivityPubReturn::error("This is not a local notice.", 403);
- }
- $res = Activitypub_notice::notice_to_array($notice);
- ActivityPubReturn::answer($res);
- }
- }
|