]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Include <author> with actor ID and name in Activity::asString(); fixes Salmon signatu...
authorBrion Vibber <brion@pobox.com>
Wed, 24 Feb 2010 17:36:31 +0000 (17:36 +0000)
committerBrion Vibber <brion@pobox.com>
Wed, 24 Feb 2010 17:36:31 +0000 (17:36 +0000)
lib/activity.php

index 5cbab8d5f353296101c953a0baf4d14740b9b341..fa4ae02748d8d7ba29a4a6dff3760773d27b7158 100644 (file)
@@ -957,11 +957,24 @@ class Activity
         }
 
         // XXX: add context
-        // XXX: add target
 
+        $xs->elementStart('author');
+        $xs->element('uri', array(), $this->actor->id);
+        if ($this->actor->title) {
+            $xs->element('name', array(), $this->actor->title);
+        }
+        $xs->elementEnd('author');
         $xs->raw($this->actor->asString('activity:actor'));
+
         $xs->element('activity:verb', null, $this->verb);
-        $xs->raw($this->object->asString());
+
+        if ($this->object) {
+            $xs->raw($this->object->asString());
+        }
+
+        if ($this->target) {
+            $xs->raw($this->target->asString('activity:target'));
+        }
 
         $xs->elementEnd('entry');