Start/End NoticeAsActivity modifications

More 'scoped' profiles and typing to the functions.
Also, there's no need to send an object as a reference.
This commit is contained in:
Mikael Nordfeldth
2014-07-28 09:40:07 +02:00
parent eb2f93ad2b
commit 6e481d35ed
5 changed files with 29 additions and 30 deletions

View File

@@ -243,12 +243,12 @@ class EventPlugin extends MicroAppPlugin
*
* @return ActivityObject
*/
function onEndNoticeAsActivity($notice, &$act) {
switch ($notice->object_type) {
function onEndNoticeAsActivity(Notice $stored, Activity $act, Profile $scoped=null) {
switch ($stored->object_type) {
case RSVP::POSITIVE:
case RSVP::NEGATIVE:
case RSVP::POSSIBLE:
$act->verb = $notice->object_type;
$act->verb = $stored->object_type;
break;
}
return true;