X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FNotice.php;h=b70dd97dc36f7bf8b05521607e9addc899496f17;hb=b9a07330621b8c09339e33779798af46c517b7cd;hp=a8561948b4d06cc527d243fc7a7d350c7c8c3a41;hpb=286b1e0ab76410208bdf3a6dd4fe042e1c497034;p=quix0rs-gnu-social.git diff --git a/classes/Notice.php b/classes/Notice.php index a8561948b4..b70dd97dc3 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1056,6 +1056,10 @@ class Notice extends Managed_DataObject $stored->setPref('ostatus', 'self', $self); } + if ($self && common_valid_http_url($self)) { + $stored->setPref('ostatus', 'self', $self); + } + // Only save 'attention' and metadata stuff (URLs, tags...) stuff if // the activityverb is a POST (since stuff like repeat, favorite etc. // reasonably handle notifications themselves. @@ -1958,9 +1962,11 @@ class Notice extends Managed_DataObject /** * Convert a notice into an activity for export. * - * @param Profile $scoped The currently logged in/scoped profile + * @param Profile $scoped The currently logged in/scoped profile * * @return Activity activity object representing this Notice. + * @throws ClientException + * @throws ServerException */ function asActivity(Profile $scoped=null) @@ -2216,7 +2222,7 @@ class Notice extends Managed_DataObject $object->selfLink = null; } - $object->extra[] = array('status_net', array('notice_id' => $this->id)); + $object->extra[] = array('statusnet:notice_id', null, $this->id); Event::handle('EndActivityObjectFromNotice', array($this, &$object)); }