]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
check for 'post' verb in microapps by default
authorEvan Prodromou <evan@status.net>
Wed, 31 Aug 2011 19:25:06 +0000 (15:25 -0400)
committerZach Copley <zach@status.net>
Wed, 31 Aug 2011 20:08:25 +0000 (13:08 -0700)
lib/microappplugin.php

index a723ecde420f805e0ace47e0ecf6244ddbe324d2..11058ad1ac80300e7ebf3d26bdec8773de9b2fd0 100644 (file)
@@ -175,7 +175,7 @@ abstract class MicroAppPlugin extends Plugin
      */
     function isMyNotice($notice) {
         $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();
         return (count($activity->objects) == 1 &&
                 ($activity->objects[0] instanceof ActivityObject) &&
+                ($activity->verb == ActivityVerb::POST) &&
                 in_array($activity->objects[0]->type, $types));
     }