]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Notice.php
[MEDIA][CORE] Add common function for converting a string with a size unit to an...
[quix0rs-gnu-social.git] / classes / Notice.php
index a8561948b4d06cc527d243fc7a7d350c7c8c3a41..b70dd97dc36f7bf8b05521607e9addc899496f17 100644 (file)
@@ -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));
         }