check for 'post' verb in microapps by default

This commit is contained in:
Evan Prodromou 2011-08-31 15:25:06 -04:00
parent 00be58829c
commit 7dd532b63f

View File

@ -175,7 +175,7 @@ abstract class MicroAppPlugin extends Plugin
*/ */
function isMyNotice($notice) { function isMyNotice($notice) {
$types = $this->types(); $types = $this->types();
return in_array($notice->object_type, $types); return ($notice->verb == ActivityVerb::POST) && in_array($notice->object_type, $types);
} }
/** /**
@ -194,6 +194,7 @@ abstract class MicroAppPlugin extends Plugin
$types = $this->types(); $types = $this->types();
return (count($activity->objects) == 1 && return (count($activity->objects) == 1 &&
($activity->objects[0] instanceof ActivityObject) && ($activity->objects[0] instanceof ActivityObject) &&
($activity->verb == ActivityVerb::POST) &&
in_array($activity->objects[0]->type, $types)); in_array($activity->objects[0]->type, $types));
} }