summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-24 17:36:31 +0000
committerBrion Vibber <brion@pobox.com>2010-02-24 17:36:31 +0000
commit5cabb63e4eaf7cd3642bf7a0c4beb3fef2e1ba07 (patch)
tree7c76df989fc0a360e161f67c2a6c4110456fd434 /lib
parent959171acac5abc3716119f7d5a7918e7497fdbfd (diff)
Include <author> with actor ID and name in Activity::asString(); fixes Salmon signature on OStatus unsub pings
Diffstat (limited to 'lib')
-rw-r--r--lib/activity.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/activity.php b/lib/activity.php
index 5cbab8d5f..fa4ae0274 100644
--- a/lib/activity.php
+++ b/lib/activity.php
@@ -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');