diff options
author | Evan Prodromou <evan@status.net> | 2010-02-20 19:58:20 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-02-20 19:58:20 -0500 |
commit | 96c6019638f6407b38fbc5a45485a3797af47adb (patch) | |
tree | 68115f1d30264b8c7ba3f4403d2fd2f19daf6c8c /plugins/OStatus/classes | |
parent | f3b08461bd476d368d444d48025709fb6a111b7d (diff) |
Add support for favor and disfavor notification
Added support for favoring and disfavoring in OStatusPlugin.
Needed to represent the Notice as an activity:object, so added
some code for that in lib/activity.php.
Also, made some small changes to OStatusPlugin so it handled
having a non-default argument $object correctly.
Diffstat (limited to 'plugins/OStatus/classes')
-rw-r--r-- | plugins/OStatus/classes/Ostatus_profile.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 4dd565288..5bd899bc4 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -307,7 +307,7 @@ class Ostatus_profile extends Memcached_DataObject * * @param Profile $actor * @param $verb eg Activity::SUBSCRIBE or Activity::JOIN - * @param $object object of the action; if null, the remote entity itself is assumed + * @param string $object object of the action; if null, the remote entity itself is assumed */ public function notify($actor, $verb, $object=null) { @@ -319,7 +319,7 @@ class Ostatus_profile extends Memcached_DataObject throw new ServerException("Invalid actor passed to " . __METHOD__ . ": " . $type); } if ($object == null) { - $object = $this; + $object = $this->asActivityNoun('object'); } if ($this->salmonuri) { $text = 'update'; // @fixme @@ -345,7 +345,7 @@ class Ostatus_profile extends Memcached_DataObject $entry->element('activity:verb', null, $verb); $entry->raw($actor->asAtomAuthor()); $entry->raw($actor->asActivityActor()); - $entry->raw($object->asActivityNoun('object')); + $entry->raw($object); $entry->elementEnd('entry'); $xml = $entry->getString(); |