]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add a user parameter to atom pub api events
authorEvan Prodromou <evan@status.net>
Tue, 28 Dec 2010 04:49:08 +0000 (20:49 -0800)
committerEvan Prodromou <evan@status.net>
Tue, 28 Dec 2010 04:49:08 +0000 (20:49 -0800)
EVENTS.txt
actions/apitimelineuser.php

index 65265cdf0f0e0fcfa450c0e2565064747e8e3952..521f568efe3e7f7d36f5380a639f06c89efd9c49 100644 (file)
@@ -969,9 +969,11 @@ EndRevokeRole: when a role has been revoked
 
 StartAtomPubNewActivity: When a new activity comes in through Atom Pub API
 - &$activity: received activity
+- $user: user publishing the entry
 
 EndAtomPubNewActivity: When a new activity comes in through Atom Pub API
 - $activity: received activity
+- $user: user publishing the entry
 - $notice: notice that was created
 
 StartXrdActionAliases: About to set aliases for the XRD object for a user
index 42988a00f6b7ed5cc78a9ecf3af98b65503521fa..1573f748972104c242da428e1fe62d5037d84d6e 100644 (file)
@@ -324,7 +324,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
 
         $activity = new Activity($dom->documentElement);
 
-        if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
+        if (Event::handle('StartAtomPubNewActivity', array(&$activity, $this->user))) {
 
             if ($activity->verb != ActivityVerb::POST) {
                 // TRANS: Client error displayed when not using the POST verb.
@@ -347,7 +347,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
 
             $saved = $this->postNote($activity);
 
-            Event::handle('EndAtomPubNewActivity', array($activity, $saved));
+            Event::handle('EndAtomPubNewActivity', array($activity, $this->user, $saved));
         }
 
         if (!empty($saved)) {